Automated generation of software patches
AssigneeFujitsu Limited
InventorsSonal MAHAJAN, Mukul R. PRASAD
Life of this patent
Estimating the term…
Abstract
Operations may include obtaining a first patch that corrects a first error in a first buggy code snippet of first source code based on the first buggy code snippet and the first repaired code snippet. The operations may also include generating a second patch based on the first patch and a bug pattern of a bug scenario that corresponds to the first error. In addition, the operations may include generating a third patch based on the second patch, the bug pattern, and a second buggy code snippet of second source code, the third patch correcting a second error in the second buggy code snippet. Moreover, the operations may include performing one or more repair operations with respect to the second buggy code snippet based on the third patch.
Claims20
A method comprising:
- obtaining a first patch that corrects a first error in a first buggy code snippet of first source code based on the first buggy code snippet;
- generating a second patch based on the first patch and a bug pattern of a bug scenario that corresponds to the first error, the bug scenario including conditions or characteristics of the first source code that cause the first error in the first buggy code snippet, the bug pattern indicating relationships between the conditions or characteristics of the bug scenario;
- generating a third patch based on the second patch, the bug pattern, and a second buggy code snippet of second source code, the third patch correcting a second error in the second buggy code snippet;
- and
- performing one or more repair operations with respect to the second buggy code snippet based on the third patch.
One or more non-transitory computer-readable storage media configured to store instructions that, in response to being executed, cause a system to perform operations, the operations comprising:
- obtaining a first patch that corrects a first error in a first buggy code snippet of first source code based on the first buggy code snippet;
- generating a second patch based on the first patch and a bug pattern of a bug scenario that corresponds to the first error, the bug scenario including conditions or characteristics of the first source code that cause the first error in the first buggy code snippet, the bug pattern indicating relationships between the conditions or characteristics of the bug scenario;
- generating a third patch based on the second patch, the bug pattern, and a second buggy code snippet of second source code, the third patch correcting a second error in the second buggy code snippet;
- and
- performing one or more repair operations with respect to the second buggy code snippet based on the third patch.
A system comprising:
- one or more processors;
- and
- one or more non-transitory computer-readable storage media configured to store instructions that, in response to being executed by the one or more processors, cause the system to perform operations, the operations comprising:
- obtaining a first patch that corrects a first error in a first buggy code snippet of first source code based on the first buggy code snippet;
- generating a second patch based on the first patch and a bug pattern of a bug scenario that corresponds to the first error;
- generating a third patch based on the second patch, the bug pattern, and a second buggy code snippet of second source code, the third patch correcting a second error in the second buggy code snippet;
- and
- performing one or more repair operations with respect to the second buggy code snippet based on the third patch.
Dependencies are inferred from the claim text.