DeepDelta: learning to repair compilation errors
By Ali Mesbah, Andrew Colin Rice, Emily Johnston, Nick Glorioso, Edward Aftandilian. 2019
116 citations recorded by the source corpus.
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.
Subfields: Computer Networks and Communications, Information Systems, Software, Program Analysis & Verification
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Computer Networks and Communications
- Michihiro Yasunaga
- Percy Liang
- Armando Solar-Lezama
- Uri Alon
- Eran Yahav
- Shaked Brody
- Denys Poshyvanyk
- Daniel Tarlow
In Information Systems
- Uri Alon
- Eran Yahav
- Charles Sutton
- Percy Liang
- Miltiadis Allamanis
- Michihiro Yasunaga
- Shaked Brody
- Michele Tufano
In Software
- Percy Liang
- Michihiro Yasunaga
- Uri Alon
- Charles Sutton
- Armando Solar-Lezama
- Eran Yahav
- Gabriele Bavota
- Michele Tufano
In Program Analysis & Verification
- Eran Yahav
- Uri Alon
- Shaked Brody
- Armando Solar-Lezama
- Percy Liang
- Denys Poshyvanyk
- Daniel Tarlow
- Gabriele Bavota
Citations in the corpus
- Break-It-Fix-It: Unsupervised Learning for Program Repair (2021, background): “Development of an automatic code fixer is thus a key to enhancing programming productivity (Seo et al., 2014) and is an active area of research (Mesbah et al., 2019; Ding et al., 2020; Dinella et al., 2020).”
- Learning to Fix Build Errors with Graph2Diff Neural Networks (2019, methodology): “for fixing build errors?We compare to the most closely related work, which is DeepDelta [23].”
- Demystifying GPT Self-Repair for Code Generation (2023, background): “Statistical and learning-based techniques for code repair have a rich history in both the programming languages and machine learning communities, although they have traditionally been used predominantly to repair human-written code [3, 8, 19, 22, 24, 33, 35].”
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks (2021, methodology): “[2], while compilation failures are addressed in [3]).”
- Learning to Synthesize Programs as Interpretable and Generalizable Policies (2021, background): “[118] Ali Mesbah, Andrew Rice, Emily Johnston, Nick Glorioso, and Edward Aftandilian.”
- On Learning Meaningful Assert Statements for Unit Test Cases (2020, methodology): “has become an important tool for supporting software-related tasks such as bug-fixing [7, 12, 20, 36], code changes [35], code migration [21, 22], code summarization [18, 19, 39], pseudo-code generation [23], code deobfuscation [13, 38] and mutation analysis [37].”
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair (2020, methodology): “Deep learning has also been used to detect and repair small syntax [73] and compilation [23, 60] issues (e.”
- Neural Edit Completion (2020, methodology): “DeepDelta [Mesbah et al. 2019] used an NMT model where the input consists of compilation errors and an AST path from the problematic symbol in the code to the root of the tree.”