paperbot · PL 论文追踪

全部论文 待读 收藏

P2 When Code Completion Fails: A Case Study on Real-World Completions

当代码补全失败:一项真实世界补全的案例研究
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)2019匹配度 4/10 · 该论文研究代码补全工具的基准真实性,揭示合成基准高估真实场景性能,属于开发者工具与ML+PL的实证研究;但它不涉及静态分析、Agentic程序、浮点程序分析或贝叶斯程序分析,与用户当前核心方向交叉有限。引用 89 inbox
Vincent J. Hellendoorn, Sebastian Proksch, Harald C. Gall, Alberto Bacchelli
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:通过 15,000 次真实开发者补全案例研究,揭示合成基准高估代码补全性能,高耗时补全准确率不足 20%。

代码补全已集成到主流 IDE,但现有工具多依赖合成基准评估,这些基准能否反映真实开发场景尚不明确。本文对 66 名真实开发者实际应用的 15,000 次代码补全进行案例研究,并与人工构造的补全进行对比。结果显示,合成基准在多个方面未能反映真实补全:被评测工具在真实数据上的准确率远低于基准表现;在开发者耗时最多的少数补全上,预测准确率不足 20%,而这一现象在合成基准中不可见。作者据此呼吁基准应覆盖开发者最常用的补全(如项目内 API),模型应适应项目内数据,并强调真实开发者试验对衡量最难预测、最耗时且更典型的补全性能至关重要。

问题
现有代码补全评测主要基于合成基准,其能否代表真实开发场景中的补全尚不明确,导致对工具实际效能与开发者需求的理解不足。
方法
对 66 名真实开发者实际应用的 15,000 次补全进行案例研究,并与人工构造的合成补全进行对比。
评估
通过真实补全与合成基准的准确率对比,尤其分析高耗时补全的预测性能,揭示基准偏差和真实场景准确率低的问题。
原文摘要(Abstract)

Code completion is commonly used by software developers and is integrated into all major IDE's. Good completion tools can not only save time and effort but may also help avoid incorrect API usage. Many proposed completion tools have shown promising results on synthetic benchmarks, but these benchmarks make no claims about the realism of the completions they test. This lack of grounding in real-world data could hinder our scientific understanding of developer needs and of the efficacy of completion models. This paper presents a case study on 15,000 code completions that were applied by 66 real developers, which we study and contrast with artificial completions to inform future research and tools in this area. We find that synthetic benchmarks misrepresent many aspects of real-world completions; tested completion tools were far less accurate on real-world data. Worse, on the few completions that consumed most of the developers' time, prediction accuracy was less than 20% -- an effect that is invisible in synthetic benchmarks. Our findings have ramifications for future benchmarks, tool design and real-world efficacy: Benchmarks must account for completions that developers use most, such as intra-project APIs; models should be designed to be amenable to intra-project data; and real-world developer trials are essential to quantifying performance on the least predictable completions, which are both most time-consuming and far more typical than artificial data suggests. We publicly release our preprint [https://doi.org/10.5281/zenodo.2565673] and replication data and materials [https://doi.org/10.5281/zenodo.2562249].

链接与引用

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

BibTeX
@inproceedings{HellendoornPGB19,
  title = {When Code Completion Fails: A Case Study on Real-World Completions},
  author = {Vincent J. Hellendoorn and Sebastian Proksch and Harald C. Gall and Alberto Bacchelli},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse.2019.00101}
}