Heuristics for automated culprit finding
AssigneeGoogle Inc.
InventorsCelal Ziftci, Vivek Ramavajjala
Life of this patent
Estimating the term…
Abstract
A system and method for isolating one or more code changes which are suspected of causing a code failure are disclosed. An example system may include a backend, a frontend, and a datastore. A list of changes to a codebase may be received along with a list of test targets in the codebase that are failing and a snapshot of the codebase at the time when one or more of the codebase's tests started failing. A heuristic may be used to find the code changes causing the one or more code failures.
Claims11
A system for isolating one or more code changes that are suspected of causing a code failure in a codebase, the system comprising:
- one or more processing devices;
- and
- one or more storage devices having at least a memory storing instructions that, when executed by the one or more processing devices, cause the one or more processing devices to:
- receive a list of changes to the codebase, the list including all changes to the codebase starting at the time when the codebase's tests were all passing to a time when one or more of the codebase's tests began to fail;
- receive a list of test targets in the codebase that are failing;
- receive a snapshot of the codebase at the time when one or more of the codebase's tests started failing;
- use at least one compile or execution log to find the code changes causing one or more test failures;
- and
- determine whether the test failure was caused by an execution failure by:
- generating a root cause set from at least one log file;
- for code changes in the received list of changes to the codebase:
- for root causes in the root cause set:
- retrieving a list of source files modified by the change;
- for a modified source file:
- calculating the minimum distance to the source file from the root cause;
- and
- calculating the impact of modifying the source file;
- summing the impact of modified source files to find a total impact of the change on the root cause;
- summing the impact of the change on root causes to find a total impact of the change on the codebase;
- sorting the code changes in order of impact;
- and
- returning the sorted code change list.
A computer-implemented method for isolating one or more code changes that are suspected of causing a code failure in a codebase, the method comprising:
- receiving a list of changes to the codebase, the list including all changes to the codebase starting at the time when the codebase's tests were all passing to a time when one or more of the codebase's tests began to fail;
- receiving a list of test targets in the codebase that are failing;
- receiving a snapshot of the codebase at the time when one or more of the codebase's tests started failing;
- use at least one compile or execution log to find the code changes causing one or more test failures;
- and
- determine whether the test failure was caused by an execution failure by:
- generating a root cause set from at least one log file;
- for code changes in the received list of changes to the codebase:
- for root causes in the root cause set:
- retrieving a list of source files modified by the change;
- for a modified source file:
- calculating the minimum distance to the source file from the root cause;
- and
- calculating the impact of modifying the source file;
- summing the impact of the modified source files to find a total impact of the change on the root cause;
- summing the impact of the change on root causes to find a total impact of the change on the codebase;
- sorting the code changes in order of impact;
- and
- returning the sorted code change list.
Dependencies are inferred from the claim text.