Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs

by Jifeng Xuan, Matias Martinez, Favio Demarco, Maxime Clément, Sebastian Lamelas, Thomas Durieux, Daniel Le Berre and Martin Monperrus
Abstract: 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 6 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.
 View PDF
Open-access (on archives-ouvertes.fr)
Publisher version (via DOI)
Citations: [citations]
Other publications of Martin Monperrus

Cite it:

Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs (, , , , , , and ), In IEEE Transactions on Software Engineering, Institute of Electrical and Electronics Engineers, volume 43, .
Jifeng Xuan, Matias Martinez, Favio Demarco, Maxime Clément, Sebastian Lamelas, Thomas Durieux, Daniel Le Berre and Martin Monperrus, "Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs", In IEEE Transactions on Software Engineering, Institute of Electrical and Electronics Engineers, vol. 43, no. 1, pp. 34-55, 2017.

Bibtex Entry:

@article{xuan:hal-01285008,
 title = {{Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs}},
 author = {Xuan, Jifeng and Martinez, Matias and Demarco, Favio and Cl{\'e}ment, Maxime and Lamelas, Sebastian and Durieux, Thomas and Le Berre, Daniel and Monperrus, Martin},
 url = {https://hal.archives-ouvertes.fr/hal-01285008/file/nopol.pdf},
 journal = {{IEEE Transactions on Software Engineering}},
 publisher = {{Institute of Electrical and Electronics Engineers}},
 volume = {43},
 number = {1},
 pages = {34-55},
 year = {2017},
 doi = {10.1109/TSE.2016.2560811},
}
Powered by bibtexbrowser
Tagged as: