Automatic Repair of Buggy If Conditions and Missing Preconditions with SMT
This addresses the issue of manual debugging for developers by automating code repair, though it is incremental as it builds on existing SMT-based techniques.
The paper tackles the problem of automatically repairing buggy if conditions and missing preconditions in programs by introducing Nopol, which uses SMT solving to generate patches from test suite data, resulting in a tool that can fix object-oriented code with specific checks and method calls.
We present Nopol, an approach for automatically repairing buggy if conditions and missing preconditions. As input, it takes a program and a test suite which contains passing test cases modeling the expected behavior of the program and at least one failing test case embodying the bug to be repaired. It consists of collecting data from multiple instrumented test suite executions, transforming this data into a Satisfiability Modulo Theory (SMT) problem, and translating the SMT result -- if there exists one -- into a source code patch. Nopol repairs object oriented code and allows the patches to contain nullness checks as well as specific method calls.