scispace - formally typeset
Open AccessJournal ArticleDOI

Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs

TLDR
Empirical analysis on Nopol shows that the approach can effectively fix bugs with buggy if conditions and missing preconditions on two large open-source projects, namely Apache Commons Math and Apache Commons Lang.
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.

read more

Citations
More filters
Proceedings ArticleDOI

Context-aware patch generation for better automated program repair

TL;DR: This paper proposes CapGen, a context-aware patch generation technique that achieves a high precision of 84.00% and can prioritize the correct patches before 98.78% of the incorrect plausible ones, and studies the use of AST nodes' context information to estimate the likelihood.
Proceedings ArticleDOI

Automatic software repair: a survey

TL;DR: A new class of approaches, namely program repair techniques, whose key idea is to try to automatically repair software systems by producing an actual fix that can be validated by the testers before it is finally accepted, or that is adapted to properly fit the system.
Proceedings ArticleDOI

Precise condition synthesis for program repair

TL;DR: In this article, the authors focus on condition synthesis, which was shown to be able to repair more than half of the defects in existing approaches, including weak test suites or overfitting.
Journal ArticleDOI

Automated program repair

TL;DR: This research presents a meta-modelling system that automates the very labor-intensive and therefore time-heavy and therefore expensive and expensive process of manually fixing programming mistakes.
Proceedings ArticleDOI

ASTOR: a program repair library for Java (demo)

TL;DR: Astor is a publicly available program repair library that includes the implementation of three notable repair approaches (jGenProg, jKali and jMutRepair) and is envision that the research community will use Astor for setting up comparative evaluations and explore the design space of automatic repair for Java.
References
More filters
Book ChapterDOI

Z3: an efficient SMT solver

TL;DR: Z3 is a new and efficient SMT Solver freely available from Microsoft Research that is used in various software verification and analysis applications.
Book

A complexity measure

TL;DR: In this paper, a graph-theoretic complexity measure for managing and controlling program complexity is presented. But the complexity is independent of physical size, and complexity depends only on the decision structure of a program.
Journal ArticleDOI

A Complexity Measure

TL;DR: Several properties of the graph-theoretic complexity are proved which show, for example, that complexity is independent of physical size and complexity depends only on the decision structure of a program.
Proceedings ArticleDOI

Visualization of test information to assist fault localization

TL;DR: A new technique that uses color to visually map the participation of each program statement in the outcome of the execution of the program with a test suite, consisting of both passed and failed test cases is presented.
Proceedings ArticleDOI

Defects4J: a database of existing faults to enable controlled testing studies for Java programs

TL;DR: Defects4J, a database and extensible framework providing real bugs to enable reproducible studies in software testing research, and provides a high-level interface to common tasks in softwareTesting research, making it easy to con- duct and reproduce empirical studies.
Related Papers (5)