PofoliaShared via Pofolia

IEEE Transactions on Software Engineering· 2016Q1

Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs

Jifeng Xuan, Matías Martínez, Favio DeMarco, Maxime Clément et al.

Short summary

Nopol automatically repairs bugs in Java conditional statements (if-then-else) by generating patches using SMT solvers, successfully fixing 22 real-world bugs in Apache Commons projects.

AI-generated from the title and abstract; the full text is not read.

Key points

  • Nopol automatically repairs bugs in Java conditional statements (if-then-else).
  • The approach uses a test suite with passing and failing cases to guide the repair.
  • It identifies expected condition values and collects runtime data for patch generation.
  • A Satisfiability Modulo Theory (SMT) solver is used to find a feasible patch.
  • Nopol successfully repaired 22 real-world bugs in Apache Commons Math and Lang.

AI-generated from the title and abstract; the full text is not read.

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 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.

The authors' abstract, as published at the source. IEEE Transactions on Software Engineering, 2016 · DOI ↗

TakeawaysPremium
Ask the paperFree account

Continue with a free account

Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.

Continue free on the web

Sign in with Google or Apple; no card needed. You come back to this paper.

On your phone:

Field: Software

SoftwareComputer Science