Interactive software program repair
First Claim
1. A method to interactively repair a software program, the method comprising:
- identifying a fault location in a software program in which the fault location includes a fault of the software program;
generating a potential repair at the fault location based on a repair candidate that modifies the software program at the fault location;
automatically generating a first test to test efficacy of the potential repair with respect to correction of the fault;
generating a first query that relates to an expected result of the first test in which obtaining the expected result of the first test in response to executing the first test indicates that the fault has been corrected;
obtaining a response to the first query from a human, the response including an indication of the expected result of the first test;
generating an augmented first test by adding, as indicated by the response to the first query, the expected result of the first test with the first test as a test oracle to the first test;
augmenting a test suite to include the augmented first test;
testing the efficacy of the potential repair with respect to correction of the fault using the augmented test suite by determining whether the expected result of the augmented first test is obtained from execution of the potential repair; and
in response to a passing result of the augmented test suite accepting the potential repair as a proper repair of the fault.
1 Assignment
0 Petitions
Accused Products
Abstract
In some examples, a method to interactively repair a software program using one or more automatically generated tests with human-provided test oracles may include identifying a fault location in a software program, generating a potential repair at the fault location based on a repair candidate, automatically generating a first test to test the potential repair, and generating a first query for a first test oracle based on the first test. The method may also include obtaining a response to the first query from a human, generating a first human-provided test oracle based on the first query and the obtained response to the first query, augmenting a test suite to include the first automatically generated test with the first human-provided test oracle, and testing the potential repair using the augmented test suite including the first automatically generated test with the first human-provided test oracle.
18 Citations
17 Claims
-
1. A method to interactively repair a software program, the method comprising:
-
identifying a fault location in a software program in which the fault location includes a fault of the software program; generating a potential repair at the fault location based on a repair candidate that modifies the software program at the fault location; automatically generating a first test to test efficacy of the potential repair with respect to correction of the fault; generating a first query that relates to an expected result of the first test in which obtaining the expected result of the first test in response to executing the first test indicates that the fault has been corrected; obtaining a response to the first query from a human, the response including an indication of the expected result of the first test; generating an augmented first test by adding, as indicated by the response to the first query, the expected result of the first test with the first test as a test oracle to the first test; augmenting a test suite to include the augmented first test; testing the efficacy of the potential repair with respect to correction of the fault using the augmented test suite by determining whether the expected result of the augmented first test is obtained from execution of the potential repair; and in response to a passing result of the augmented test suite accepting the potential repair as a proper repair of the fault. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method to interactively generate repairs to a software program, the method comprising:
-
automatically generating a test to test efficacy of a first potential repair with respect to correction of a fault of a software program, wherein the potential repair modifies a software program at a fault location, the fault location including the fault in the software program, the first potential repair being based on a first repair candidate; generating a query that relates to an expected result of the test in which obtaining the expected result in response to executing the test indicates that the fault has been corrected; obtaining a response to the query from a human, the response including an indication of the expected result of the test; generating an augmented test by adding, as indicated by the response to the query, the expected result with the test as a test oracle to the test; augmenting a test suite to include the augmented test; and testing the efficacy of the first potential repair with respect to correction of the fault using the augmented test suite including the augmented test by determining whether the expected result of the augmented test is obtained from execution of the potential repair. - View Dependent Claims (7, 8, 9)
-
-
10. A system configured to interactively repair a software program, the system comprising:
-
one or more non-transitory computer-readable storage media configured to store instructions; and one or more processors configured to execute the instructions, wherein execution of the instructions causes the system to perform operations comprising; identify a fault location in a software program in which the fault location includes a fault of the software program; generate a first potential repair at the fault location based on a first repair candidate that modifies the software program at the fault location; generate a first test to test efficacy of the first potential repair with respect to correction of the fault; generate a first query that relates to an expected result of the first test in which obtaining the expected result of the first test in response to executing the first test indicates that the fault has been corrected; obtain a response to the first query from a human, the response including an indication of the expected result of the first test; generate an augmented first test by adding, as indicated by the response to the first query, the expected result of the first test with the first test as a test oracle to the first test; augment a test suite to include the augmented first test; and test the efficacy of the first potential repair with respect to correction of the fault using the augmented test suite including the augmented first test by determining whether the expected result of the augmented first test is obtained from execution of the first potential repair. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
Specification