paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DeepDelta: learning to repair compilation errors

DeepDelta:学习修复编译错误
FSE Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2019匹配度 4/10 · 论文用 NMT 学习 Java 编译错误修复,属于 ML for PL 与自动程序修复,且有 Google 工业数据,与“AI→PL”有边缘关联;但它不涉及静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,也未使用 LLM/Agent,因此与用户核心研究方向匹配度有限。引用 107 inbox
Ali Mesbah, Andrew Rice, Emily Johnston, Nick Glorioso, Edward Aftandilian
crossref: 2026-09-12

AI 速览

一句话:提出 DeepDelta,用 NMT 从 Google 构建数据学习编译错误修复模式,为缺失符号和方法签名不匹配生成修复。

程序员需花费大量时间手动修复无法编译的代码,而同一类编译错误的修复往往遵循高度机械的模式。本文提出 DeepDelta:在 Google 收集所有构建错误及使失败构建转为成功的人类代码修改,从文本修改生成 AST diff,并转换为领域特定语言 Delta 来表示使代码通过编译所需的变化;随后将编译器诊断信息作为源、解决该诊断的 Delta 变化作为目标,训练神经机器翻译网络。针对 Java 中最常见且代价最高的两类编译错误——缺失符号和方法签名不匹配,DeepDelta 对 38,788 个未见错误中的 19,314 个(50%)生成正确修复变化,平均 86% 的情况下正确变化出现在前三个建议中。

问题
研究问题是如何自动修复构建时编译失败,特别是为缺失符号和方法签名不匹配等高频高代价错误生成机械式代码修复。
方法
方法是在 Google 收集构建错误和导致失败构建转为成功的人工修改,生成 AST diff 并转换为 DSL Delta,再将编译器诊断与 Delta 分别作为源和目标训练 NMT 模型。
评估
在 Java 的两类主要编译错误上评估:对 38,788 个未见错误中的 19,314 个(50%)生成正确修复,平均 86% 的情况下正确修复位于前三个建议中。
原文摘要(Abstract)

Programmers spend a substantial amount of time manually repairing code that does not compile. We observe that the repairs for any particular error class typically follow a pattern and are highly mechanical. We propose a novel approach that automatically learns these patterns with a deep neural network and suggests program repairs for the most costly classes of build-time compilation failures. We describe how we collect all build errors and the human-authored, in-progress code changes that cause those failing builds to transition to successful builds at Google. We generate an AST diff from the textual code changes and transform it into a domain-specific language called Delta that encodes the change that must be made to make the code compile. We then feed the compiler diagnostic information (as source) and the Delta changes that resolved the diagnostic (as target) into a Neural Machine Translation network for training. For the two most prevalent and costly classes of Java compilation errors, namely missing symbols and mismatched method signatures, our system called DeepDelta, generates the correct repair changes for 19,314 out of 38,788 (50%) of unseen compilation errors. The correct changes are in the top three suggested fixes 86% of the time on average.

链接与引用

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

BibTeX
@inproceedings{paperbot5089,
  title = {DeepDelta: learning to repair compilation errors},
  author = {Ali Mesbah and Andrew Rice and Emily Johnston and Nick Glorioso and Edward Aftandilian},
  booktitle = {FSE},
  year = {2019},
  doi = {10.1145/3338906.3340455}
}