[论文解读] Practitioners' Expectations on Code Completion
该论文通过访谈和大规模调查对从业者对代码完成功具的期望进行实证研究,并将这些期望与2012–2022年的现有研究文献进行比较,以识别差距和未来工作的方向。
Code completion has become a common practice for programmers during their daily programming activities. It aims at automatically predicting the next tokens or lines that the programmers tend to use. A good code completion tool can substantially save keystrokes and improve the programming efficiency for programmers. Recently, various techniques for code completion have been proposed for usage in practice. However, it is still unclear what are practitioners' expectations on code completion and whether existing research has met their demands. To fill the gap, we perform an empirical study by first interviewing 15 practitioners and then surveying 599 practitioners from 18 IT companies about their expectations on code completion. We then compare the practitioners' demands with current research via conducting a literature review of papers on code completion published in premier publication venues from 2012 to 2022. Based on the comparison, we highlight the directions desirable for researchers to invest efforts towards developing code completion techniques for meeting practitioners' expectations.
研究动机与目标
- 调查从业者当前的代码完成实践状况。
- 识别实际开发中对代码完成的問題及其感知重要性。
- 阐明从业者在令牌级和语句级粒度上的期望。
- 评估当前研究与从业者需求的契合程度,并揭示未来工作的差距。
提出的方法
- 对15名从业者进行半结构化访谈,以探讨实践与期望。
- 通过在线调查对来自18家IT公司599名从业者进行定量验证。
- 对顶级期刊/会议(2012–2022) 的代码完成研究进行文献综述并与从业者期望进行比较。
实验结果
研究问题
- RQ1RQ1: 从业者的代码完成实践状态是什么(工具与使用场景)?
- RQ2RQ2: 代码完成对从业者重要吗,他们面临哪些问题?
- RQ3RQ3: 从业者在令牌级和语句级代码完成工具上的期望是什么(使用、指标、访问、有效性、效率,以及一般工具因素)?
- RQ4RQ4: 现有研究在多大程度上满足从业者的需求,存在哪些差距?
主要发现
- IDE 内置代码完成是最常用的工具(96%),第三方插件如 Copilot 和 IntelliCode 的使用率约为 13%。
- 令牌级完成更受欢迎(81%)远高于语句级完成(32%),标识符完成和 API 推荐是最常使用的子场景(约 85%)。
- 88% 的从业者认为代码完成重要,但只有 36% 认为当前工具令其满意;主要问题包括错误完成(56%)、安装困难(58%)、排序差(34%)。
- 对于令牌级完成,超过 80% 期望标识符完成、API 推荐和路径完成;约 79% 希望前3个候选的准确度,85% 期望在 200 ms 内得到结果。
- 对于语句级完成,最期望的是骨架预测、当前编辑行完成以及 API 参数推荐;首选延迟 ≤2 秒,评价指标强调语法正确性与可读性。
- 研究与从业者需求之间存在显著差距:大多数令牌级工作侧重于 API/标识符完成,较少涉及路径完成;语句级工作强调下一行完成而非骨架或 API-参数预测;常用评估指标如重叠 n-gram 和编辑相似度不太受从业者青睐。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。