Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs
By Jifeng Xuan, Matias Martinez, F. Demarco, Maxime Clément, Sebastian R. Lamelas Marcote, Thomas Durieux, Daniel Le Berre, Monperrus Martin. IEEE Transactions on Software Engineering, 2018
475 citations recorded by the source corpus.
We propose Nopol, an approach to automatic repair of buggy conditional statements (i.e., if-then-else statements). This approach takes a buggy program as well as a test suite as input and generates a patch with a conditional expression as output. The test suite is required to contain passing test cases to model the expected behavior of the program and at least one failing test case that reveals the bug to be repaired. The process of Nopol consists of three major phases. First, Nopol employs angelic fix localization to identify expected values of a condition during the test execution. Second, runtime trace collection is used to collect variables and their actual values, including primitive data types and objected-oriented features (e.g., nullness checks), to serve as building blocks for patch generation. Third, Nopol encodes these collected data into an instance of a Satisfiability Modulo Theory (SMT) problem; then a feasible solution to the SMT instance is translated back into a code patch. We evaluate Nopol on 22 real-world bugs (16 bugs with buggy if conditions and six bugs with missing preconditions) on two large open-source projects, namely Apache Commons Math and Apache Commons Lang. Empirical analysis on these bugs shows that our approach can effectively fix bugs with buggy if conditions and missing preconditions. We illustrate the capabilities and limitations of Nopol using case studies of real bug fixes.
Subfields: Information Systems, Software
View Paper: https://www.semanticscholar.org/paper/c0f0b2eac4390e49cfe8b601a81535e2e08f5faa
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
- Michele Tufano
- Gabriele Bavota
- Michael Pradel
- Lin Tan
- Thibaud Lutellier
- Lingming Zhang
- Chun Xia
- Denys Poshyvanyk
In Software
- Lingming Zhang
- Chun Xia
- Gabriele Bavota
- Michael Pradel
- Michele Tufano
- Denys Poshyvanyk
- Lin Tan
- Thibaud Lutellier
Citations in the corpus
- An Analysis of the Automatic Bug Fixing Performance of ChatGPT (2023, methodology): “In order to compare the results of ChatGPT with the standard APR methods, we take the results from a comprehensive study from the literature [13] that reports the performance of ten different methods (Arja [16], Cardumen [17], Dynamoth [18], JGenProg [19], JKali [19], JMutRepair [19], Nopol [20], NP”
- A syntax-guided edit decoder for neural program repair (2021, methodology): “For QuixBugs and IntroClassJava, we directly choosed the APR tools used in RepairThemAll [10] and DL-based APR tools which have experimented on these two benchmarks as baselines: jGenProg [35], RSRepair [55], Nopol [73], and CoCoNuT [44].”
- An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation (2018, methodology): “e avoid over-fitting patches to test cases. A complementary set of repair techniques leverage program analysis and program synthesis to repair programs by constructing code with particular properties [36,41,52,53,61,64,78,93]. Some approaches perform automated program repair by searching the fix amo”
- TBar: revisiting template-based automated program repair (2019, methodology): “The GZoltar framework for fault localization is also widely used in the literature of APR [18, 24, 34, 38, 39, 49, 69, 74, 76, 77], allowing for a fair assessment of TBar’s performance against the state-of-the-art.”
- Software Testing With Large Language Models: Survey, Landscape, and Vision (2023, unknown): “There have been template-based [143], heuristic-based [144], and constraint-based [145], [146] automatic program repair techniques.”
- Precise Condition Synthesis for Program Repair (2016, methodology): “Some recent publications [21], [16], [33] have made thorough survey about the field, and we discuss only the approaches that are related to condition synthesis and patch ranking.”
- Can OpenAI's Codex Fix Bugs?: An evaluation on QuixBugs (2022, methodology): “This includes, for example, tools like Nopol [27], Angelix [20] or SemFix [21].”
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair (2020, methodology): “One of the main approaches for automatic program repair is the G&V method [17, 38, 52, 69, 88, 89].”
- Automated program repair (2019, background): “Techniques that work on enumerating possible angelic values without adopting symbolic execution [21, 22] typically try to repair conditional statements exclusively, where the angelic values are exhaustively enumerated until all failing test cases pass.”
- 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].”