paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Siri, Write the Next Method

Siri,写出下一个方法
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 2/10 · 该论文研究 IDE 中基于检索的下一个完整方法推荐,属于代码补全/开发者工具方向,与用户关注的静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析及 LLM 与 PL 交叉等核心问题基本无关。虽然涉及机器学习与程序语言交叉,但不涉及静态分析、形式化验证或 LLM/Agent 工具。引用 20 inbox
Fengcai Wen, Emad Aghajani, Csaba Nagy, Michele Lanza, Gabriele Bavota
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出检索式方法 FeaRS,根据 IDE 中当前代码推荐下一个完整方法(签名与实现)。

现有代码补全通常只能推荐接下来几个 token 或若干 API,无法帮助开发者写出完整方法。本文提出 FeaRS,一种基于检索的方法:给定开发者在 IDE 中正在编写的代码,推荐其接下来可能实现的完整方法(包括签名与方法体)。FeaRS 通过挖掘数千个开源项目学习“实现模式”,即通常在同一任务中一起实现的方法组,并将其应用于 Android 应用场景。作者在超过 2 万个应用上进行了大规模实证评估,初步结果令人鼓舞,同时也揭示了未来需要克服的挑战。

问题
现有代码补全技术局限于推荐接下来几个 token 或若干 API,无法推荐开发者接下来可能编写的完整方法。
方法
FeaRS 通过挖掘数千个开源项目学习“实现模式”(同一任务中通常一起实现的方法组),并基于检索为 IDE 中当前代码推荐下一个完整的方法签名与方法体;作者将其实例化到 Android 应用场景。
评估
在超过 2 万个 Android 应用上进行大规模实证评估,初步结果令人鼓舞,但也指出了未来需要解决的挑战。
原文摘要(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.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{WenA0LB21,
  title = {Siri, Write the Next Method},
  author = {Fengcai Wen and Emad Aghajani and Csaba Nagy and Michele Lanza and Gabriele Bavota},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00025}
}