arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.13668cs.SE
收藏

软件工厂何时应实现无人化?在缺陷检测任务上对代码审查智能体进行基准测试

(When) Should a Software Factory be Lights-off? Benchmarking Code Review Agents on Bug Detection

Carnegie Mellon University(卡内基梅隆大学);Microsoft(微软);Microsoft Research(微软研究院)

Chenyang Yang, Hao He, Ti-Chung Cheng, Jenna Butler, Emerson Murphy-Hill, Carmen Badea, Christian Bird

AI总结:

该研究构建了CRBugBench基准,测试发现SOTA审查智能体在缺陷检测上有提升但复杂场景表现差,还给出了开发人员采用审查智能体的具体指导。

摘要:

随着编码智能体的发展,软件开发人员在代码审查上花费的时间已超过编写代码的时间。由于人工审查速度落后于智能体代码生成速度,人们很想构建自动化审查智能体,以实现几乎无需人工监督的“无人化”软件工厂未来。为评估这种完全自主软件工厂的可行性,我们构建了CRBugBench——一个用于评估审查智能体是否能检测到经人工验证的缺陷的新基准。我们搭建了一个数据管道,从代码仓库历史中挖掘缺陷,并将每个缺陷与其对应的引入缺陷的PR配对,形成审查任务。CRBugBench包含来自98个开源GitHub仓库的1000个审查任务,以及来自某大型公司专有行业仓库的800个额外任务。随后,我们利用该基准研究智能体的审查质量:我们发现,当前最优(SOTA)审查智能体表现良好,最优模型claude-opus-5搭配copilot-cli在其前5条评论中能捕获71.9%的缺陷,较5个月前opus-4.6的47.7%有所提升。然而,智能体在复杂变更和需要非局部推理的缺陷上效果仍较差,在更需要项目上下文的专有行业仓库中性能大幅下降。为提升缺陷检测效果,我们发现通过提示调整来扩展计算资源最有效:探索引导型提示在成本仅增加10%的情况下,性能提升可达5.8%。基于这些发现,我们为开发人员采用审查智能体提供了具体指导:根据PR复杂度调整审查工作量、按项目优先级引导智能体、提供代码仓库知识、根据PR特性分配模型,以及随着模型演变监控质量。

英文摘要:

With the advances of coding agents, software developers are spending more time reviewing code than writing code. As human review velocity falls behind agentic code generation, it is tempting to build automated review agents towards a future of "lights-off" software factory with little to no human supervision. To assess the practicality of such a fully autonomous software factory, we construct CRBugBench, a new benchmark that evaluates whether review agents detect human-verified bugs. We build a data pipeline that mines bugs from repository history, and pair each bug with its introducing PR to form a review task. CRBugBench consists of 1,000 review tasks across 98 open-source GitHub repositories, and 800 additional tasks from proprietary industry repositories at one large company. We then use the benchmark to study agent review quality: We found that SOTA review agents do well: the best (claude-opus-5 with copilot-cli) catches 71.9% of bugs within its top-5 comments, up from 47.7% (opus-4.6) in five months of model evolution. Yet agents remain less effective on complex changes and bugs requiring non-local reasoning, with sharp performance drops on proprietary industry repositories where project context is more often needed. To improve bug detection, we found scaling compute helps most through prompt changes: exploration-nudging prompts gain up to 5.8% performance at 10% higher cost. From these findings, we derive concrete guidance for developers to adopt review agents - scaling review effort to PR complexity, steering agents by project priorities, supplying repository knowledge, dispatching models by PR characteristics, and monitoring quality as models evolve.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑