English

Siri, Write the Next Method

Software Engineering 2021-03-09 v1

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.

Keywords

Cite

@article{arxiv.2103.04586,
  title  = {Siri, Write the Next Method},
  author = {Fengcai Wen and Emad Aghajani and Csaba Nagy and Michele Lanza and Gabriele Bavota},
  journal= {arXiv preprint arXiv:2103.04586},
  year   = {2021}
}

Comments

Accepted to the 43rd International Conference on Software Engineering (ICSE 2021)

R2 v1 2026-06-23T23:51:54.472Z