DeepFix: Fixing Common C Language Errors by Deep Learning
By Rahul Gupta, Soham Pal, Aditya Kanade, Shirish K. Shevade. 2017
549 citations recorded by the source corpus.
The problem of automatically fixing programming errors is a very active research topic in software engineering. This is a challenging problem as fixing even a single error may require analysis of the entire program. In practice, a number of errors arise due to programmer's inexperience with the programming language or lack of attention to detail. We call these common programming errors. These are analogous to grammatical errors in natural languages. Compilers detect such errors, but their error messages are usually inaccurate. In this work, we present an end-to-end solution, called DeepFix, that can fix multiple such errors in a program without relying on any external tool to locate or fix them. At the heart of DeepFix is a multi-layered sequence-to-sequence neural network with attention which is trained to predict erroneous program locations along with the required correct statements. On a set of 6971 erroneous C programs written by students for 93 programming tasks, DeepFix could fix 1881 (27%) programs completely and 1338 (19%) programs partially.
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
- Rishabh Singh
- Percy Liang
- Michael Pradel
- Michihiro Yasunaga
- Pushmeet Kohli
- Koushik Sen
- Charles Sutton
- Tien Nhut Nguyen
In Information Systems
- Charles Sutton
- Percy Liang
- Rishabh Singh
- Miltiadis Allamanis
- Michael Pradel
- Michihiro Yasunaga
- Koushik Sen
- Tien Nhut Nguyen
In Software
- Michael Pradel
- Rishabh Singh
- Koushik Sen
- Charles Sutton
- Percy Liang
- Michihiro Yasunaga
- Miltiadis Allamanis
- Lingming Zhang
In Program Analysis & Verification
- Charles Sutton
- Michael Pradel
- Aditya Kanade
- Rishabh Singh
- Petros Maniatis
- Percy Liang
- Miltiadis Allamanis
- Michihiro Yasunaga
Citations in the corpus
- PaLM: Scaling Language Modeling with Pathways (2022, methodology): “DeepFix Code Repair The PaLM-Coder 540B model demonstrates impressive performance on the DeepFix code repair task, reaching a compile rate of 82.1%, compared to 71.7% achieved by prior work (Yasunaga & Liang, 2021).”
- Break-It-Fix-It: Unsupervised Learning for Program Repair (2021, methodology): “Note that f0 here corresponds to the fixer learned in prior works (e.g., Gupta et al. (2017); Yasunaga & Liang (2020)).”
- Graph-based, Self-Supervised Program Repair from Diagnostic Feedback (2020, methodology): “While prior works in program repair purely apply sequence-to-sequence (seq2seq) models to programs (Gupta et al., 2017; Hajipour et al., 2019) or rely on the program’s Abstract Syntax Tree (AST) representations (Mesbah et al.”
- SPoC: Search-based Pseudocode to Code (2019, methodology): “In contrast to previous error correction models [12], our model also uses the error message and pseudocode for prediction.”
- InCoder: A Generative Model for Code Infilling and Synthesis (2022, methodology): “This includes methods to infer variable types [50, 66], generate unit tests [25], repair programs [30, 70, 20, 71], and verify program correctness [55].”
- CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation (2021, background): “• code-code (clone detection [65, 84, 46, 80, 9, 89, 86], defect detection [91, 55, 51, 42, 78, 79], cloze test [15], code completion [57, 1, 56, 66, 67, 8, 27, 7], code repair [69, 4, 23, 26, 71, 73], and code-to-code translation [48, 37, 10, 41]) • text-code (natural language code search [32, 20, ”
- TypeWriter: neural type prediction with search-based validation (2019, neutral): “on 3 migrations ever 5Instagram Engineering Blog: Introducing open source MonkeyType TypeWriter: Neural Type Prediction with Search-based Validation Conference’17, July 2017, Washington, DC, USA bugs [5, 10]. TypeWriter contributes a novel model for predicting types and a search-based combination of”
- Unsupervised Translation of Programming Languages (2020, background): “Another line of work studied the applications of neural networks to code suggestion [2, 11, 34], or error detection [13, 18, 47].”
- SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair (2018, methodology): “DeepFix is a program repair tool for fixing compiler errors in introductory programming courses [27].”
- DeepBugs: a learning approach to name-based bug detection (2018, methodology): “s, including code completion based on probabilistic models of code [Bielik et al. 2016; Raychev et al. 2016a, 2014], predicting fixes of compilation errors via neural networks [Bhatia and Singh 2016; Gupta et al. 2017], and the generation of inputs for fuzz testing via probabilistic, generative lang”
- Big Code != Big Vocabulary: Open-Vocabulary Models for Source Code (2020, background): “code have the potential to enable new tools for aiding code readability [2], program repair [13, 18, 40, 75], program synthesis [39] and translation between programming languages [54, 66].”
- Neural Program Repair by Jointly Learning to Localize and Repair (2019, methodology): “DeepFix (Gupta et al., 2017) and SynFix (Bhatia et al., 2018) repair syntax errors in programs using neural program representations.”
- Learning to Fix Build Errors with Graph2Diff Neural Networks (2019, background): “hin reach. However, there is only a small literature on repairing build errors. Previous work on syntax errors has been very successful generating repairs resolving missing delimiters and parentheses [10, 15]. In contrast,inourcorpusofprofessionalbuilderrors(Table1),fixesare more subtle, often requi”
- L2CEval: Evaluating Language-to-Code Generation Capabilities of Large Language Models (2023, methodology): “Besides Besides code understanding, there have been other tasks such as code translation (Roziere et al., 2020) and program repair (Gupta et al., 2017).”
- 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.”
- NL-EDIT: Correcting Semantic Parse Errors through Natural Language Interaction (2021, methodology): “Only using the question and the explanation, the model is able to learn about a set of systematic errors that parsers make and how they can be corrected (Gupta et al., 2017; Yin and Neubig, 2019).”
- Compilation Error Repair: For the Student Programs, From the Student Programs (2018, methodology): “Existing works often choose to avoid this issue by, for example, expecting a neural network to jointly perform error localization and error correction [7].”
- RepairAgent: An Autonomous, LLM-Based Agent for Program Repair (2024, unknown): “…the challenge of automatically fixing bugs [1], including techniques based on manually designed [2], [3] and (semi-)automatically extracted [4], [5], [6] fix patterns, based on symbolic constraints [7], [8], [9], and various machine learning-based approaches [10], [11], [12], [13], [14], [15], [16].”