Learning to Fix Build Errors with Graph2Diff Neural Networks
By Daniel Tarlow, Subhodeep Moitra, Andrew Colin Rice, Zimin Chen, Pierre-Antoine Manzagol, Charles Sutton, Edward Aftandilian. 2019
70 citations recorded by the source corpus.
Professional software developers spend a significant amount of time fixing builds, but this has received little attention as a problem in automatic program repair. We present a new deep learning architecture, called Graph2Diff, for automatically localizing and fixing build errors. We represent source code, build configuration files, and compiler diagnostic messages as a graph, and then use a Graph Neural Network model to predict a diff. A diff specifies how to modify the code's abstract syntax tree, represented in the neural network as a sequence of tokens and of pointers to code locations. Our network is an instance of a more general abstraction that we call Graph2Tocopo, which is potentially useful in any development tool for predicting source code changes. We evaluate the model on a dataset of over 500k real build errors and their resolutions from professional developers. Compared to the approach of DeepDelta (Mesbah et al., 2019), our approach tackles the harder task of predicting a more precise diff but still achieves over double the accuracy.
Subfields: Computer Networks and Communications, Information Systems, Software, Natural Language Processing
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
- Charles Sutton
- Maxwell Nye
- Prem Devanbu
- Marie-Anne Lachaux
- Mark Harman
- Shaked Brody
In Information Systems
- Charles Sutton
- Miltiadis Allamanis
- Vincent J. Hellendoorn
- Uri Alon
- Eran Yahav
- Baishakhi Ray
- Percy Liang
- Prem Devanbu
In Software
- Charles Sutton
- Vincent J. Hellendoorn
- Baishakhi Ray
- Prem Devanbu
- Uri Alon
- Percy Liang
- Michihiro Yasunaga
- David Bieber
In Natural Language Processing
- Percy Liang
- Luke S. Zettlemoyer
- Graham Neubig
- Quoc V. Le
- Uri Alon
- Omer Levy
- Eran Yahav
- Miltiadis Allamanis
Citations in the corpus
- Program Synthesis with Large Language Models (2021, methodology): “Many learning methods have been proposed for program repair [Allamanis et al., 2018b, Tarlow et al., 2019, Hellendoorn et al., 2019, Dinella et al., 2019, Yasunaga and Liang, 2020, Chen et al., 2019b, Pradel and Sen, 2018].”
- Break-It-Fix-It: Unsupervised Learning for Program Repair (2021, background): “Several works learn to repair code from labeled datasets of source code edits made by programmers, e.g., error resolution records (Just et al., 2014; Chen et al., 2019; Mesbah et al., 2019; Bader et al., 2019; Tarlow et al., 2020; Ding et al., 2020).”
- Graph-based, Self-Supervised Program Repair from Diagnostic Feedback (2020, methodology): “Tarlow et al. (2019) generalize it to more diverse error types, and Graph-based, Self-Supervised Program Repair from Diagnostic Feedback propose a repair model that uses the graph structure of AST.”
- Code Llama: Open Foundation Models for Code (2023, background): “…et al., 2020; 2021; Szafraniec et al., 2023) fixing bugs (Yasunaga & Liang, 2021; Zhang et al., 2022a; Prenner et al., 2022), fixing build errors (Tarlow et al., 2020) or generating unit tests (Tufano et al., 2020; Li et al., 2022; Chen et al., 2023a), as well as solving math problems as…”
- DOBF: A Deobfuscation Pre-Training Objective for Programming Languages (2021, methodology): “Model Architecture We consider a seq2seq model with attention, composed of an encoder and a decoder using a transformer architecture Vaswani et al. [2017]. We train models with the same architecture and tokenizer as CodeBERT Feng et al.”
- A syntax-guided edit decoder for neural program repair (2021, methodology): “Several existing DL-based approaches also use the idea of generating edits on programs [4, 5, 9, 65, 74].”
- Neural Edit Completion (2020, methodology): “Tarlow et al. [2019] follows the encoder-decoder paradigm, using an encoder that consists of a graph neural network (GNN), which encodes a multi-graph that is built from the AST and the compilation error log messages.”
- Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks (2020, background): “GNNs have been applied a variety of program representations and static analysis tasks [2, 8, 13, 21, 23, 25, 28].”
- Patching as Translation: the Data and the Metaphor (2020, methodology): “On the other hand, our results shed light on the feasibility of another competing approach: repairing bugs by synthesizing edits of code conditional on the buggy context [8, 29, 31].”
- Leveraging Automated Unit Tests for Unsupervised Code Translation (2021, methodology): “In recent years, deep learning methods have been used to tackle various tasks in software engineering, with a particular interest in bug detection and repair (Wang et al., 2018; Chen et al., 2019; Allamanis et al., 2018; Tarlow et al., 2020; Murali et al., 2021; Dinella et al., 2020; Yasunaga & Lian”