IP Library › Granted Patent US 9,846,637
Granted Patent B2
US 9,846,637 · App. 14/957,529 · Granted Dec 19, 2017

Machine learning based software program repair

Inventors: Hiroaki Yoshida (Cupertino, UT); Divya Gopinath (Santa Clara, CA); Mukul R. Prasad (San Jose, CA)
Assignee: FUJITSU LIMITED
G06F11/3692G06F11/3688G06N99/005
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,846,637
App. No.
14/957,529
Granted
Dec 19, 2017
Kind
B2
Abstract

According to an aspect of an embodiment, a method may include identifying a fault location in a software program using a test suite. The method may further include determining, using machine learning, a repair effectiveness indication that indicates a potential effectiveness of performing a potential repair operation at the fault location. In addition, the method may include prioritizing implementing a repair at the fault location based on the repair effectiveness indication. The method may further include performing repair operations with respect to the software program based on the prioritization of the fault location.

Claims (58)

1. A method comprising:

identifying a fault location in a software program using a test suite;

determining, using machine learning, a repair effectiveness indication that indicates a potential effectiveness of performing a potential repair operation at the fault location;

prioritizing implementing a repair at the fault location based on the repair effectiveness indication satisfying a threshold;

generating, using machine learning, a repair oracle for the fault location in response to the repair effectiveness indication satisfying the threshold and based on program states that correspond to states of the software program at the fault location that pass or fail one or more test executions of tests from the test suite; and

performing repair operations with respect to the fault location of the software program using the repair oracle based on the prioritization of the fault location.

2. The method of claim 1 , wherein determining the repair effectiveness indication includes:

determining a failing state expression that indicates failing program states at the fault location, the failing program states corresponding to states of the software program at the fault location that fail one or more test executions of tests from the test suite;

determining a compactness of the potential repair at the fault location based on the failing state expression; and

determining the repair effectiveness indication based on the compactness of the potential repair.

3. The method of claim 2 , further comprising determining the failing state expression using decision tree learning.

4. The method of claim 1 , wherein determining the repair effectiveness indication includes:

determining whether an observable difference between passing program states and failing program states at the fault location is identified, the passing program states corresponding to states of the software program at the fault location that pass one or more test executions of tests from the test suite and the failing program states corresponding to states of the software program at the fault location that fail one or more test executions of tests from the test suite; and

determining the repair effectiveness indication based on the observable difference determination.

5. The method of claim 4 , further comprising performing the observable difference determination based on a failing state expression that indicates failing program states at the fault location.

6. The method of claim 1 , wherein determining the repair effectiveness indication includes:

determining a diversity between passing test executions of tests of the test suite that lead to taking a “THEN” branch associated with a condition statement at the fault location and passing test executions of tests of the test suite that lead to taking an “ELSE” branch associated with the condition statement; and

determining the repair effectiveness indication based on the diversity determination.

7. The method of claim 1 , wherein generating the repair oracle includes:

determining a failing state expression that indicates failing program states at the fault location, the failing program states corresponding to states of the software program at the fault location that fail one or more test executions of tests from the test suite; and

generating the repair oracle based on the failing state expression.

8. The method of claim 1 , wherein generating the repair oracle includes:

determining a hyperplane with respect to a condition statement at the fault location; and

generating, based on the hyperplane, the repair oracle based on passing program states that lead to taking a “THEN” branch associated with the condition statement, as indicated by the hyperplane, and passing program states that lead to taking an “ELSE” branch associated with the condition statement, as indicated by the hyperplane, the passing program states corresponding to states of the software program at the fault location that pass one or more test executions of tests from the test suite.

9. The method of claim 1 , further comprising generating a repair at the fault location based on the repair oracle.

10. One or more non-transitory computer-readable storage media including computer-executable instructions configured to, in response to execution by one or more processors, cause a system to perform operations, the operations comprising:

identifying a fault location in a software program using a test suite;

determining, using machine learning, a repair effectiveness indication that indicates a potential effectiveness of performing a potential repair operation at the fault location;

prioritizing implementing a repair at the fault location based on the repair effectiveness indication satisfying a threshold;

generating, using machine learning, a repair oracle for the fault location in response to the repair effectiveness indication satisfying the threshold and based on program states that correspond to states of the software program at the fault location that pass or fail one or more test executions of tests from the test suite; and

performing repair operations with respect to the fault location of the software program using the repair oracle based on the prioritization of the fault location.

11. The one or more non-transitory computer-readable storage media of claim 10 , wherein determining the repair effectiveness indication includes:

determining a failing state expression that indicates failing program states at the fault location, the failing program states corresponding to states of the software program at the fault location that fail one or more test executions of tests from the test suite;

determining a compactness of the potential repair at the fault location based on the failing state expression; and

determining the repair effectiveness indication based on the compactness of the potential repair.

12. The one or more non-transitory computer-readable storage media of claim 11 , wherein the operations further comprise determining the failing state expression using decision tree learning.

13. The one or more non-transitory computer-readable storage media of claim 10 , wherein determining the repair effectiveness indication includes:

determining whether an observable difference between passing program states and failing program states at the fault location is identified, the passing program states corresponding to states of the software program at the fault location that pass one or more test executions of tests from the test suite and the failing program states corresponding to states of the software program at the fault location that fail one or more test executions of tests from the test suite; and

determining the repair effectiveness indication based on the observable difference determination.

14. The one or more non-transitory computer-readable storage media of claim 13 , wherein the operations further comprise performing the observable difference determination based on a failing state expression that indicates failing program states at the fault location.

15. The one or more non-transitory computer-readable storage media of claim 10 , wherein determining the repair effectiveness indication includes:

determining a diversity between passing test executions of tests of the test suite that lead to taking a “THEN” branch associated with a condition statement at the fault location and passing test executions of tests of the test suite that lead to taking an “ELSE” branch associated with the condition statement; and

determining the repair effectiveness indication based on the diversity determination.

16. The one or more non-transitory computer-readable storage media of claim 10 , wherein generating the repair oracle includes:

determining a failing state expression that indicates failing program states at the fault location, the failing program states corresponding to states of the software program at the fault location that fail one or more test executions of tests from the test suite; and

generating the repair oracle based on the failing state expression.

17. The one or more non-transitory computer-readable storage media of claim 10 , wherein generating the repair oracle includes:

determining a hyperplane with respect to a condition statement at the fault location; and

generating, based on the hyperplane, the repair oracle based on passing program states that lead to taking a “THEN” branch associated with the condition statement, as indicated by the hyperplane, and passing program states that lead to taking an “ELSE” branch associated with the condition statement, as indicated by the hyperplane, the passing program states corresponding to states of the software program at the fault location that pass one or more test executions of tests from the test suite.

18. The one or more non-transitory computer-readable storage media of claim 10 , wherein the operations further comprise generating a repair at the fault location based on the repair oracle.

19. A system comprising:

one or more non-transitory computer-readable storage media including computer-executable instructions;

one or more processors communicatively coupled to the one or more computer-readable storage media and configured to, in response to executing the computer-executable instructions, cause the system to perform operations, the operations comprising:

identifying a fault location in a software program using a test suite;

determining, using machine learning, a repair effectiveness indication that indicates a potential effectiveness of performing a potential repair operation at the fault location;

prioritizing implementing a repair at the fault location based on the repair effectiveness indication satisfying a threshold;

generating, using machine learning, a repair oracle for the fault location in response to the repair effectiveness indication satisfying the threshold and based on program states that correspond to states of the software program at the fault location that pass or fail one or more test executions of tests from the test suite; and

performing repair operations with respect to the fault location of the software program using the repair oracle based on the prioritization of the fault location.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 4, 2015
From: YOSHIDA, HIROAKI; GOPINATH, DIVYA; PRASAD, MUKUL R.
To: FUJITSU LIMITED
Reel/Frame 037217/0582 →
Continuity (1)
Related Publication 20170161182A1 · Jun 8, 2017