Automatic patch generation by learning correct code
By Fan Long, Martin C. Rinard. 2016
604 citations recorded by the source corpus.
We present Prophet, a novel patch generation system that works with a set of successful human patches obtained from open- source software repositories to learn a probabilistic, application-independent model of correct code. It generates a space of candidate patches, uses the model to rank the candidate patches in order of likely correctness, and validates the ranked patches against a suite of test cases to find correct patches. Experimental results show that, on a benchmark set of 69 real-world defects drawn from eight open-source projects, Prophet significantly outperforms the previous state-of-the-art patch generation system.
Subfields: Information Systems, Software
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Information Systems
- Michael Pradel
- Rishabh Singh
- Charles Sutton
- Michele Tufano
- Aditya Kanade
- Denys Poshyvanyk
- Miltiadis Allamanis
- Koushik Sen
In Software
- Rishabh Singh
- Michael Pradel
- Pushmeet Kohli
- Aditya Kanade
- Lingming Zhang
- Chun Xia
- Michele Tufano
- Tien Nhut Nguyen
Citations in the corpus
- Program Synthesis with Large Language Models (2021, neutral): “Program repair is the problem of automatically fixing bugs in programs, often based on a test suite [Le Goues et al., 2012, Long and Rinard, 2016].”
- An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation (2018, positive): “Another approach that identifies patches from past fixes is Prophet [47], which, after having localized the likely faulty code by running test cases, generates patches from correct code using a probabilistic model.”
- Context-Aware Patch Generation for Better Automated Program Repair (2018, methodology): “In order to generate high-quality patches, many approaches propose to rank the patches based on their likelihood to be correct recently [7, 19, 25, 31, 53, 55].”
- Software Vulnerability Analysis and Discovery Using Machine-Learning and Data-Mining Techniques (2017, methodology): “An example of recent research on feature engineering is the work by Long and Rinard (2016) on automatic patch generation for self-correcting software; where a system named Prophet is proposed, which learns a probabilistic model of correct code based on a novel set of features for capturing deep…”
- Semantic Code Repair using Neuro-Symbolic Transformation Networks (2017, background): “Prophet [13] learns a probabilistic model to rank patches for null pointer exceptions and array out-of-bounds errors.”
- Automated program repair (2019, background): “One line of work [24] learns from a corpus of code a model of correct code, which indicates how likely a given piece of code is w.”
- A syntax-guided edit decoder for neural program repair (2021, neutral): “A typical way is to learn from existing software repositories, such as learning patterns from existing patches [2, 23, 24, 28, 40, 42, 58], and using program code to guide the patch generation [24, 43, 60, 71, 72].”
- DLFix: Context-based Code Transformation Learning for Automated Program Repair (2020, methodology): “Long and Rinard proposed Prophet [24], that learns code correctness models from a set of successful hu man patches.”
- Repairing Bugs in Python Assignments Using Large Language Models (2022, background): “Existing approaches have applied a variety of technical ideas, including formal program logic [5], [31], [32], search-based techniques [33] like genetic programming [2], [34], [35], and machine learning [3], [4], [36].”
- Precise Condition Synthesis for Program Repair (2016, background): “For example, Prophet [16] always assigns the same priority to lcm!=50 and lcm==Integer.”
- TBar: revisiting template-based automated program repair (2019, methodology): “…[5, 49], there is a momentum in minimizing the time-to-fix intervals by APR. Recently, various APR approaches [7, 8, 13, 14, 17, 19, 21, 22, 25, 27, 33, 34, 36, 37, 39, 45, 48, 61, 63, 71, 72] have been proposed, aiming at reducing manual debugging efforts through automatically generating patches.”
- PHOG: Probabilistic Model for Code (2016, background): “The learned context often includes traversing to one or more positions in the AST that are similar to the position being predicted.”
- Baldur: Whole-Proof Generation and Repair with Large Language Models (2023, methodology): “The automated program repair field studies the task of taking a program with a bug, evidenced by one or more failing tests, and automatically producing a modified version of the program that passes all the tests [50].”
- Shaping program repair space with existing patches and similar code (2018, methodology): “Moreover, Prophet does not utilize similar code.”
- DeepFix: Fixing Common C Language Errors by Deep Learning (2017, background): “Long and Rinard (2016) learn a probabilistic model using explicitly designed code features to rank repair candidates.”
- Learning to Repair Software Vulnerabilities with Generative Adversarial Networks (2018, methodology): “Two successful recent approaches are that of Le et al. [11] and Long and Rinard [12].”