paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RepoMasterEval: Evaluating Code Completion via Real-World Repositories

RepoMasterEval:通过真实世界代码仓库评估代码补全
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 论文聚焦代码补全模型在真实仓库场景下的评测基准,并结合变异测试增强测试套件;与用户核心方向(ML/Agentic 程序的静态分析、LLM 改进静态分析/形式化验证、浮点或贝叶斯程序分析)没有直接交集。引用 1 inbox
Qinyun Wu, Chao Peng, Pengfei Gao, Ruida Hu, Haoyu Gan, Bo Jiang, Jinhe Tang, Zhiwen Deng, Zhanming Guan, Cuiyun Gao, Xia Liu, Ping Yang
crossref: 2026-09-12

AI 速览

一句话:提出基于真实仓库、用变异测试增强测试套件的代码补全评测基准 RepoMasterEval。

现有代码补全评测基准多聚焦函数或类级别,并依赖文本描述提示,但真实开发中常无此类描述,补全可发生在函数或代码块中间,导致基准与实用场景错位。本文提出 RepoMasterEval:从带测试套件的真实仓库中遮盖代码片段(ground truth)构造评测数据,并用变异测试度量测试用例有效性,对低变异分数套件手工补充用例,以提升对模型生成代码的测试准确性。对 10 个先进模型的实证评估表明,测试增强对基准准确性至关重要,该基准能反映真实场景下的模型性能差异;部署还显示其可为训练提供准确反馈,且得分与实际表现高度相关。

问题
现有代码补全基准多面向函数或类级别且依赖文本描述提示,未覆盖真实仓库中缺少描述、在函数或代码块中间补全等场景。
方法
从真实仓库中遮盖代码片段,结合现有测试套件与变异测试,并手工增强低变异分数套件的测试用例来构造基准。
评估
在 10 个先进代码补全模型上实证评估,验证测试增强对基准准确性的作用,并考察得分与实际表现及训练反馈的相关性。
原文摘要(Abstract)

With the growing reliance on automated code completion tools in software development, the need for comprehensive evaluation benchmarks has become critical. Existing benchmarks focus more on code completion in function and class level by pro-viding text descriptions to prompt the model. By contrast, such descriptive prompt is commonly unavailable in real development and code completion can occur in wider range of situations such as in the middle of a function or a code block. These limitations makes existing evaluation benchmarks poorly align with the practical scenarios of code completion tools. In this paper, we propose RepoMasterEval, a novel benchmark for evaluating code completion models constructed from real-world repositories. Each benchmark datum is generated by masking a code snippet (ground truth) from one source code file with existing test suites. To improve test accuracy of model generated code, we employ mutation testing to measure the effectiveness of the test cases and we manually crafted new test cases for those test suites with low mutation score. Our empirical evaluation on 10 state-of-the-art models shows that test argumentation is critical in improving the accuracy of the benchmark and RepoMasterEval is able to report variance in model performance in real-world scenarios. The deployment of RepoMasterEval also revealed that the benchmark is useful to give accurate feedback during model training and the score is in high correlation with the model’s performance in practice.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9559,
  title = {RepoMasterEval: Evaluating Code Completion via Real-World Repositories},
  author = {Qinyun Wu and Chao Peng and Pengfei Gao and Ruida Hu and Haoyu Gan and Bo Jiang and Jinhe Tang and Zhiwen Deng and Zhanming Guan and Cuiyun Gao and Xia Liu and Ping Yang},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00304}
}