# US 2023/0057720 A1 · Identifying root causes of software defects

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0057720 A1
- Document ID: US20230057720A1
- Status: Published application
- Kind: A1
- Application number: 17/401,446
- Filed: 2021-08-13
- Published: 2023-02-23
- Earliest claimed: 2021-08-13
- Assignees: Kyndryl, Inc.
- Applicants: Kyndryl, Inc.
- Inventors: Siddalinga ARADHYA; Manu SHIVANNA; Rajesh GANJI; Abdul Kareem A. LAKKUNDI; Abdul Karimulla Shakhadari MOHAMMED
- Web page: https://patentgrep.com/patent/US20230057720A1

## CPC

- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 11/0706: {the processing taking place on a specific hardware platform or in a specific software environment}
- G06F 11/0709: {in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems}
- G06F 11/0772: {Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers}
- G06F 11/079: {Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36)}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/362: Debugging of software
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Root cause identification of a software defect includes identifying, in program code of a software feature, hedge code of the software feature based on errors induced from temporarily substituting program code of the software feature with substitute program code and obtaining an error graph for the hedge code, obtaining error logs of an application that incorporates the software feature, the error logs indicating errors with the software feature of the application, automatically generating an application error graph reflective of the errors with the software feature of the application, mapping the application error graph to the error graph for the hedge code, and based on the mapping aligning one of more errors reflected in the application error graph to error(s) reflected in the error graph for the hedge code, identifying the hedge code as inducing a root error identified in the application error graph.

## Claims

### Claim 1

A computer-implemented method comprising:
identifying, in program code of a software feature, hedge code of the software feature based on errors induced from temporarily substituting program code of the software feature with substitute program code, and obtaining an error graph for the hedge code, the error graph for the hedge code reflecting cause-and-effect relationships between errors induced from changes to the hedge code of the software feature;
obtaining error logs of an application that incorporates the software feature, the error logs indicating errors with the software feature of the application;
automatically generating an application error graph reflective of the errors with the software feature of the application;
mapping the application error graph to the error graph for the hedge code; and
based on the mapping aligning one of more errors reflected in the application error graph to one or more errors reflected in the error graph for the hedge code, identifying the hedge code as inducing a root error identified in the application error graph.

### Claim 2 (depends on 1)

The method of claim 1, wherein the error graph for the hedge code comprises a root node indicating a root cause to which the candidate hedge code corresponds, wherein the root error identified in the application error graph has, as a root cause, the root cause corresponding to the candidate hedge code.

### Claim 3 (depends on 1)

The method of claim 1, wherein the method further comprises electronically providing to a developer the program code of the software feature, an indication of the hedge code of the software feature, and a code revision history of that hedge code of the software feature to facilitate developer revision of the program code of the software feature.

### Claim 4 (depends on 1)

The method of claim 1, wherein the identifying the hedge code of the software feature comprises evaluating a candidate hedge code of the program code of the software feature, the evaluating comprising:
substituting the candidate hedge code with a substitute code segment;
testing the software feature with the substitute code segment substituting for the candidate hedge code, the testing generating one or more errors induced from the substituting and testing; and
generating an error graph for the candidate hedge code, the error graph for the candidate hedge code reflecting cause-and-effect relationships between errors induced from changes to the candidate hedge code.

### Claim 5 (depends on 4)

The method of claim 4, wherein the evaluating the candidate hedge code further comprises generating an error graph corresponding to the substitute code segment, wherein the substitute code segment is a first substitute code segment, of a plurality of substitute code segments, for the candidate hedge code, and wherein the evaluating the candidate hedge code further comprises: repeating, for each other substitute code segment of the plurality of substitute code segments, the substituting with the other substitute code segment, the testing with the other substitute code segment, and the generating an error graph corresponding the other substitute code segment, wherein the repeating produces a plurality of generated error graphs corresponding to the plurality of substitute code segments.

### Claim 6 (depends on 5)

The method of claim 5, wherein the generated error graph for the candidate hedge code comprises an aggregate error graph incorporating errors induced from the substituting and testing across the plurality of substitute code segments.

### Claim 7 (depends on 4)

The method of claim 4, wherein the substitute code segment is predefined within the program code of the software feature by a developer.

### Claim 8 (depends on 4)

The method of claim 4, wherein the candidate hedge code is a first candidate hedge code, of a plurality of candidate hedge codes, of the program code of the software feature, and wherein the identifying the hedge code of the software feature further comprises:
repeating, for each other candidate hedge code of the plurality of candidate hedge codes, to generate an error graph for each other candidate hedge code, wherein the repeating produces a plurality of error graphs for the candidate hedge codes;
comparing the plurality of error graphs for the candidate hedge codes to identify which of the candidate hedge codes most extensively induced errors; and
selecting, as the identified hedge code of the software feature, the candidate hedge code that most extensively induced errors, wherein the obtained error graph for the hedge code is the error graph generated for the selected candidate hedge code by the evaluating of the selected candidate hedge code.

### Claim 9 (depends on 1)

The method of claim 1, wherein the software feature is one feature of a plurality of software features of a software product, and wherein the method further comprises:
repeating, for each other software feature of the software product, the identifying the hedge code of the other software feature based on errors induced from temporarily substituting program code of the other software feature with substitute program code, and obtaining an error graph for the hedge code of the other software feature, wherein the repeating produces a plurality of error graphs for the plurality of software features; and
performing a comparison comprising one selected from the group consisting of:
comparing the application error graph to the plurality of error graphs and identifying which error graph of the plurality of error graphs is a best fit to the application error graph, wherein the mapping maps the application error graph to the best fit error graph and identifies the software feature, of the plurality of software features, and hedge code thereof that induces a root error identified in the application error graph; and
comparing the application error graph to an aggregate error graph for the software product, the aggregate error graph for the software product being aggregated from the plurality of error graphs, and identifying a portion, of the aggregate error graph for the software product, to which the application error graph fits, wherein the mapping maps the application error graph to the portion of the aggregate error graph for the software product and that portion reflects the error graph for the hedge code of the software feature and the mapping identifies the software feature, of the plurality of software features, and hedge code thereof that induces a root error identified in the application error graph.

### Claim 10 (depends on 9)

The method of claim 9, wherein the method further comprises automatically generating, based on the error logs, one or more other application error graphs reflective of other errors with one or more other software features of the application, and, for each of the one or more other application error graphs, performing the comparison using the other application error graph.

### Claim 11

A computer system comprising:
a memory; and
a processor in communication with the memory, wherein the computer system is configured to perform a method comprising:
identifying, in program code of a software feature, hedge code of the software feature based on errors induced from temporarily substituting program code of the software feature with substitute program code, and obtaining an error graph for the hedge code, the error graph for the hedge code reflecting cause-and-effect relationships between errors induced from changes to the hedge code of the software feature;
obtaining error logs of an application that incorporates the software feature, the error logs indicating errors with the software feature of the application;
automatically generating an application error graph reflective of the errors with the software feature of the application;
mapping the application error graph to the error graph for the hedge code; and
based on the mapping aligning one of more errors reflected in the application error graph to one or more errors reflected in the error graph for the hedge code, identifying the hedge code as inducing a root error identified in the application error graph.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein the error graph for the hedge code comprises a root node indicating a root cause to which the candidate hedge code corresponds, wherein the root error identified in the application error graph has, as a root cause, the root cause corresponding to the candidate hedge code.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein the identifying the hedge code of the software feature comprises evaluating a candidate hedge code of the program code of the software feature, the evaluating comprising:
substituting the candidate hedge code with a substitute code segment;
testing the software feature with the substitute code segment substituting for the candidate hedge code, the testing generating one or more errors induced from the substituting and testing; and
generating an error graph for the candidate hedge code, the error graph for the candidate hedge code reflecting cause-and-effect relationships between errors induced from changes to the candidate hedge code.

### Claim 14 (depends on 13)

The computer system of claim 13, wherein the evaluating the candidate hedge code further comprises generating an error graph corresponding to the substitute code segment, wherein the substitute code segment is a first substitute code segment, of a plurality of substitute code segments, for the candidate hedge code, and wherein the evaluating the candidate hedge code further comprises: repeating, for each other substitute code segment of the plurality of substitute code segments, the substituting with the other substitute code segment, the testing with the other substitute code segment, and the generating an error graph corresponding the other substitute code segment, wherein the repeating produces a plurality of generated error graphs corresponding to the plurality of substitute code segments, and wherein the generated error graph for the candidate hedge code comprises an aggregate error graph incorporating errors induced from the substituting and testing across the plurality of substitute code segments.

### Claim 15 (depends on 13)

The computer system of claim 13, wherein the candidate hedge code is a first candidate hedge code, of a plurality of candidate hedge codes, of the program code of the software feature, and wherein the identifying the hedge code of the software feature further comprises:
repeating, for each other candidate hedge code of the plurality of candidate hedge codes, to generate an error graph for each other candidate hedge code, wherein the repeating produces a plurality of error graphs for the candidate hedge codes;
comparing the plurality of error graphs for the candidate hedge codes to identify which of the candidate hedge codes most extensively induced errors; and
selecting, as the identified hedge code of the software feature, the candidate hedge code that most extensively induced errors, wherein the obtained error graph for the hedge code is the error graph generated for the selected candidate hedge code by the evaluating of the selected candidate hedge code.

### Claim 16

A computer program product comprising:
a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising:
identifying, in program code of a software feature, hedge code of the software feature based on errors induced from temporarily substituting program code of the software feature with substitute program code, and obtaining an error graph for the hedge code, the error graph for the hedge code reflecting cause-and-effect relationships between errors induced from changes to the hedge code of the software feature;
obtaining error logs of an application that incorporates the software feature, the error logs indicating errors with the software feature of the application;
automatically generating an application error graph reflective of the errors with the software feature of the application;
mapping the application error graph to the error graph for the hedge code; and
based on the mapping aligning one of more errors reflected in the application error graph to one or more errors reflected in the error graph for the hedge code, identifying the hedge code as inducing a root error identified in the application error graph.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the error graph for the hedge code comprises a root node indicating a root cause to which the candidate hedge code corresponds, wherein the root error identified in the application error graph has, as a root cause, the root cause corresponding to the candidate hedge code.

### Claim 18 (depends on 16)

The computer program product of claim 16, wherein the identifying the hedge code of the software feature comprises evaluating a candidate hedge code of the program code of the software feature, the evaluating comprising:
substituting the candidate hedge code with a substitute code segment;
testing the software feature with the substitute code segment substituting for the candidate hedge code, the testing generating one or more errors induced from the substituting and testing; and
generating an error graph for the candidate hedge code, the error graph for the candidate hedge code reflecting cause-and-effect relationships between errors induced from changes to the candidate hedge code.

### Claim 19 (depends on 18)

The computer program product of claim 18, wherein the evaluating the candidate hedge code further comprises generating an error graph corresponding to the substitute code segment, wherein the substitute code segment is a first substitute code segment, of a plurality of substitute code segments, for the candidate hedge code, and wherein the evaluating the candidate hedge code further comprises: repeating, for each other substitute code segment of the plurality of substitute code segments, the substituting with the other substitute code segment, the testing with the other substitute code segment, and the generating an error graph corresponding the other substitute code segment, wherein the repeating produces a plurality of generated error graphs corresponding to the plurality of substitute code segments, and wherein the generated error graph for the candidate hedge code comprises an aggregate error graph incorporating errors induced from the substituting and testing across the plurality of substitute code segments.

### Claim 20 (depends on 18)

The computer program product of claim 18, wherein the candidate hedge code is a first candidate hedge code, of a plurality of candidate hedge codes, of the program code of the software feature, and wherein the identifying the hedge code of the software feature further comprises:
repeating, for each other candidate hedge code of the plurality of candidate hedge codes, to generate an error graph for each other candidate hedge code, wherein the repeating produces a plurality of error graphs for the candidate hedge codes;
comparing the plurality of error graphs for the candidate hedge codes to identify which of the candidate hedge codes most extensively induced errors; and
selecting, as the identified hedge code of the software feature, the candidate hedge code that most extensively induced errors, wherein the obtained error graph for the hedge code is the error graph generated for the selected candidate hedge code by the evaluating of the selected candidate hedge code.
