Lune

ICSE2021Top-tier venue

Siri, Write the Next Method

Fengcai Wen, Emad Aghajani, Csaba Nagy, Michele Lanza, Gabriele Bavota

Abstract

Code completion is one of the killer features of Integrated Development Environments (IDEs), and researchers have proposed different methods to improve its accuracy. While these techniques are valuable to speed up code writing, they are limited to recommendations related to the next few tokens a developer is likely to type given the current context. In the best case, they can recommend a few APIs that a developer is likely to use next. We present FeaRS, a novel retrieval-based approach that, given the current code a developer is writing in the IDE, can recommend the next complete method (i.e., signature and method body) that the developer is likely to implement. To do this, FeaRS exploits "implementation patterns" (i.e., groups of methods usually implemented within the same task) learned by mining thousands of open source projects. We instantiated our approach to the specific context of Android apps. A large-scale empirical evaluation we performed across more than 20k apps shows encouraging preliminary results, but also highlights future challenges to overcome.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • How Practitioners Expect Code Completion? cites CodeFill: Multi-token Code Completion by Jointly learning from Structure and Naming Sequences
  • Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial Network cites How Practitioners Expect Code Completion?
  • RLCoder: Reinforcement Learning for Repository-Level Code Completion cites CodeFill: Multi-token Code Completion by Jointly learning from Structure and Naming Sequences
  • RLCoder: Reinforcement Learning for Repository-Level Code Completion cites How Practitioners Expect Code Completion?
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. On the Robustness of Code Generation Techniques: An Empirical Study on GitHub CopilotAntonio Mastropaolo, Luca Pascarella, Emanuela Guglielmi, Matteo Ciniselli et al.ICSE 2023 · 124 citations
  2. CodeFill: Multi-token Code Completion by Jointly learning from Structure and Naming SequencesMaliheh Izadi, Roberta Gismondi, Georgios GousiosICSE 2022 · 79 citations
  3. How Practitioners Expect Code Completion?Chaozheng Wang, Junhao Hu, Cuiyun Gao, Yu Jin et al.FSE 2023 · 24 citations
  4. Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial NetworkShangwen Wang, Bo Lin, Zhensu Sun, Ming Wen et al.OOPSLA 2023 · 21 citations
  5. RLCoder: Reinforcement Learning for Repository-Level Code CompletionYanlin Wang, Yanli Wang, Daya Guo, Jiachi Chen et al.ICSE 2025 · 13 citations

Related papers

  1. DroidCoder: Enhanced Android Code Completion with Context-Enriched Retrieval-Augmented GenerationXinran Yu, Chun Li, Minxue Pan, Xuandong LiASE 2024 · 1 citation
  2. API method recommendation via explicit matching of functionality verb phrasesWenkai Xie, Xin Peng, Mingwei Liu, Christoph Treude et al.FSE 2020 · 33 citations
  3. Source Code Recommender Systems: The Practitioners' PerspectiveMatteo Ciniselli, Luca Pascarella, Emad Aghajani, Simone Scalabrino et al.ICSE 2023 · 6 citations
  4. Suggesting natural method names to check name consistenciesSon Nguyen, Hung Phan, Trinh Le, Tien N. NguyenICSE 2020 · 64 citations
  5. Code Search is All You Need? Improving Code Suggestions with Code SearchJunkai Chen, Xing Hu, Zhenhao Li, Cuiyun Gao et al.ICSE 2024 · 31 citations
Dusk over the sea between two cliffs drawn in fine vertical lines