paperbot · PL 论文追踪

全部论文 待读 收藏

P1 AI-Assisted Fixes to Code Review Comments at Scale

大规模代码评审评论的AI辅助修复
FSE Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering2026匹配度 5/10 · 论文属于 LLM 辅助代码修复与工业落地,涉及代码评审评论到补丁的生成,与 PL+AI 的工程落地兴趣有交集;但其核心不是静态分析、形式化验证、浮点或贝叶斯程序分析,也不是 agentic 程序分析,因此不命中用户最核心的追踪问题。引用 2 inbox
Chandra Maddila, Negar Ghorbani, James Saindon, Parth Thakkar, Vijayaraghavan Murali, Rui Abreu, Jingyue Shen, Brian Zhou, Nachiappan Nagappan, Peter C Rigby
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:为代码评审评论生成修复补丁的MetaMateCR系统,通过微调Llama实现离线68%精确匹配,并借助安全试验成功落地生产。

Meta每周产生数万条代码评审评论。本文提出MetaMateCR,为评审意见提供AI辅助修复。作者构建了包含64k条〈评审评论, 补丁〉的内部基准,微调Llama模型,并将离线表现与GPT-4o对比。离线结果显示,LargeLSFT模型生成的补丁有68%与人工修复完全一致,超出GPT-4o九个百分点,且更倾向于使用现代Hack函数而非GPT-4o建议的PHP函数。为确保AI不拖慢评审速度,作者开展随机对照安全试验,发现直接向评审者展示AI补丁会使评审时间增加5%以上;改为仅向作者展示后,时间回归无显著差异。最终在生产环境中,LargeLSFT的ActionableToApplied率达到19.7%,比GPT-4o高9.2个百分点。该工作强调了安全试验在AI辅助工程工具落地中的关键作用。

问题
大规模代码评审中,回应评审评论并生成修复补丁耗费工程师大量时间,需要可扩展且不损害评审效率的AI辅助方案。
方法
构建64k条〈评审评论, 补丁〉基准微调Llama模型,离线与GPT-4o对比,并通过随机对照安全试验及全量生产实验验证。
评估
离线精确匹配率与函数现代化程度、随机对照试验中的评审时长变化,以及生产环境的ActionableToApplied率。
原文摘要(Abstract)

Aim. There are 10s of thousands of code review comments each week at Meta. We developed Metamate for Code Review (MetaMateCR) that provides AI-assisted fixes for reviewer comments in production at scale. Method. We developed an internal benchmark of 64k ⟨review_comment, patch⟩ data points to fine-tune Llama models. Once our models achieve reasonable offline results, we roll them into production. To ensure that our AI-assisted fixes do not negatively impact the time it takes to do code reviews, we conduct randomized controlled safety trials as well as full production experiments. Offline Results. As a baseline, we compare GPT-4o to our small and large Llama models. In offline results, our LargeLSFT model creates an exact match patch 68% of the time outperforming GPT-4o by 9 percentage points (pp). The internal models also use more modern Hack functions when compared to the PHP functions suggested by GPT-4o. Safety Trial. When we roll MetaMateCR into production in a safety trial that compares no AI patches with AI patch suggestions, we see a large regression with reviewers taking over 5% longer to conduct reviews. After investigation, we modify the UX to only show authors the AI patches, and see no regressions in the time for reviews. Production. When we roll LargeLSFT into production, we see an ActionableToApplied rate of 19.7%, which is a 9.2pp improvement over GPT-4o. Our results illustrate the importance of safety trials in ensuring that AI does not inadvertently slow down engineers, and a successful review comment to AI patch product running at scale.

链接与引用

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

BibTeX
@inproceedings{abs-2507-13499,
  title = {AI-Assisted Fixes to Code Review Comments at Scale},
  author = {Chandra Maddila and Negar Ghorbani and James Saindon and Parth Thakkar and Vijayaraghavan Murali and Rui Abreu and Jingyue Shen and Brian Zhou and Nachiappan Nagappan and Peter C Rigby},
  booktitle = {FSE},
  year = {2026},
  doi = {10.1145/3803437.3805217}
}