Identification of software program fault locations
AssigneeFujitsu Limited
InventorsRipon K. Saha, Mukul R. Prasad, Indradeep Ghosh
Life of this patent
Estimating the term…
Abstract
A method may include obtaining multiple lines of programming code of a program, and obtaining multiple test cases for testing the program, where each of the test cases includes an assertion upon which a result of a respective test case is based. The method may also include executing the program for each of the test cases, and identifying affected lines of programming code that influence the assertions. The method may additionally include calculating a risk score for at least one of the lines of programming code based on the affected lines of programming code and the assertion, the risk score indicative of a likelihood that the at least one of the lines of programming code includes a fault.
Claims20
A method, comprising:
- obtaining a plurality of lines of programming code of a program;
- obtaining a plurality of test cases for testing the program, each of the test cases including an assertion upon which a result of a respective test case is based;
- executing the program for each of the test cases;
- identifying affected lines of programming code that influence the assertions;
- and
- calculating a risk score for at least one of the plurality of lines of programming code based on the affected lines of programming code and the assertion, the risk score indicative of a likelihood of the at least one of the plurality of lines of programming code including a fault, the risk score calculated for a given line of code based at least on factors comprising:
- a first number of the assertions that pass and are affected by the given line of code;
- a second number of assertions that pass and are unaffected by the given line of code;
- a third number of the assertions that fail and are affected by the given line of code;
- and
- a fourth number of assertions that fail and are unaffected by the given line of code.
A non-transitory computer-readable medium containing instructions which, in response to being executed by one or more processors, cause a system to perform operations, the operations comprising:
- obtaining a plurality of lines of programming code of a program;
- obtaining a plurality of test cases for testing the program, each of the test cases including an assertion upon which a result of a respective test case is based;
- executing the program for each of the test cases;
- identifying affected lines of programming code that influence the assertions;
- and
- calculating a risk score for at least one of the plurality of lines of programming code based on the affected lines of programming code and the assertion, the risk score indicative of a likelihood of the at least one of the plurality of lines of programming code including a fault, the risk score calculated for a given line of code based at least on factors comprising:
- a first number of the assertions that pass and are affected by the given line of code;
- a second number of assertions that pass and are unaffected by the given line of code;
- a third number of the assertions that fail and are affected by the given line of code;
- and
- a fourth number of assertions that fail and are unaffected by the given line of code.
A system comprising:
- one or more processors;
- one or more non-transitory computer-readable media containing instructions which, when executed by the one or more processors, causes the system to perform operations, the operations comprising:
- obtaining a plurality of lines of programming code of a program;
- obtaining a plurality of test cases for testing the program, each of the test cases including an assertion upon which a result of a respective test case is based;
- executing the program for each of the test cases;
- identifying affected lines of programming code that influence the assertions;
- and
- calculating a risk score for at least one of the plurality of lines of programming code based on the affected lines of programming code and the assertion, the risk score indicative of a likelihood of the at least one of the plurality of lines of programming code including a fault, the risk score calculated for a given line of code based at least on factors comprising:
- a first number of the assertions that pass and are affected by the given line of code;
- a second number of assertions that pass and are unaffected by the given line of code;
- a third number of the assertions that fail and are affected by the given line of code;
- and
- a fourth number of assertions that fail and are unaffected by the given line of code.
Dependencies are inferred from the claim text.