paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair

副驾驶的副驾驶:融合大语言模型与补全引擎的自动程序修复
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 4/10 · 论文将编程语言的语义约束(补全引擎)与 LLM 生成融合以提升补丁有效性,属于 PL 与 LLM 的交叉,与画像中 AI↔PL 的交叉主题有间接关联;但其核心任务是自动程序修复(APR),并非画像重点关注的静态分析、浮点程序分析、贝叶斯程序分析或 Agentic 程序,也未涉及用 LLM 改进静态分析本身。引用 168 inbox
Yuxiang Wei, Chunqiu Steven Xia, Lingming Zhang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 Repilot,用补全引擎引导 LLM 生成补丁,在 APR 中提升补丁有效性与修复数。

自动程序修复(APR)难以为通用语言真实系统合成正确补丁。近期大语言模型(LLM)可作为编程“副驾驶”直接生成补丁,但它们通常将程序视为 token 序列,忽略目标语言的语义约束,导致大量静态无效补丁,影响实用性。为此,作者提出 Repilot 框架,用补全引擎进一步“副驾驶”LLM。其核心洞见是 LLM 自回归逐 token 生成类似人类写程序,可由补全引擎显著增强和引导。Repilot 让 LLM 与补全引擎交互合成候选补丁:剪除 LLM 建议的不可行 token,并根据补全引擎建议主动补全 token。在 Defects4j 1.2 与 2.0 子集上,Repilot 分别修复 66 和 50 个缺陷,比最佳基线多修 14 和 16 个;相同生成预算下能产生更多有效且正确的补丁。

问题
APR 中 LLM 生成的补丁常因忽略编程语言语义约束而静态无效,难以实用。
方法
提出 Repilot,让 LLM 与补全引擎协同:剪除不可行 token,并据补全引擎建议主动补全 token 以合成更有效补丁。
评估
在 Defects4j 1.2/2.0 子集评估,分别修复 66/50 个缺陷,较最佳基线多 14/16 个,且同预算下生成更多有效正确补丁。
原文摘要(Abstract)

During Automated Program Repair (APR), it can be challenging to synthesize correct patches for real-world systems in general-purpose programming languages. Recent Large Language Models (LLMs) have been shown to be helpful “copilots” in assisting developers with various coding tasks, and have also been directly applied for patch synthesis. However, most LLMs treat programs as sequences of tokens, meaning that they are ignorant of the underlying semantics constraints of the target programming language. This results in plenty of statically invalid generated patches, impeding the practicality of the technique. Therefore, we propose Repilot, a framework to further copilot the AI “copilots” (i.e., LLMs) by synthesizing more valid patches during the repair process. Our key insight is that many LLMs produce outputs autoregressively (i.e., token by token), resembling human writing programs, which can be significantly boosted and guided through a Completion Engine. Repilot synergistically synthesizes a candidate patch through the interaction between an LLM and a Completion Engine, which 1) prunes away infeasible tokens suggested by the LLM and 2) proactively completes the token based on the suggestions provided by the Completion Engine. Our evaluation on a subset of the widely-used Defects4j 1.2 and 2.0 datasets shows that Repilot fixes 66 and 50 bugs, respectively, surpassing the best-performing baseline by 14 and 16 bugs fixed. More importantly, Repilot is capable of producing more valid and correct patches than the base LLM when given the same generation budget.

链接与引用

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

BibTeX
@inproceedings{abs-2309-00608,
  title = {Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair},
  author = {Yuxiang Wei and Chunqiu Steven Xia and Lingming Zhang},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616271}
}