# US 2019/0317777 A1 · Determining candidate patches for a computer software

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

- Number: US 2019/0317777 A1
- Document ID: US20190317777A1
- Status: Published application
- Kind: A1
- Application number: 16/454,153
- Filed: 2019-06-27
- Published: 2019-10-17
- Earliest claimed: 2017-03-21
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Zi Hui Duan; Lu Sun; Jing Jing Wei; Dian Guo Zou
- Web page: https://patentgrep.com/patent/US20190317777A1

## CPC

- G06F 9/4488: {Object-oriented}
- G06F 8/658: Incremental updates; Differential updates
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 8/77: Software metrics
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, computer system, and computer program product for determining a candidate patch for computer software is provided. According to a method, fingerprint(s) of patch(es) for a computer software is obtained first, wherein a fingerprint of a patch comprises function(s) being revised in the computer software if the patch is installed into the computer software. Then whether every function in the obtained fingerprint(s) of patch(es) has been called is monitored in response to beginning of execution of the computer software along to code path(s) related to bug(s). And at last candidate patch(es) is determined in response to end of the execution of the computer software along to the code path(s) related to the bug(s), wherein every function in the fingerprint of the candidate patch(es) has been called during the execution of the computer software.

## Claims

### Claim 1

A method comprising:
monitoring, by the processor, whether every function in an obtained fingerprint(s) of patch(es) has been called in response to a beginning of execution of a computer software along to code path(s) related to bug(s), wherein the monitoring includes accumulating a number of times for every function in the obtained fingerprint(s) of patch(es) being called;
determining, by the processor, candidate patch(es) in response to an end of the execution of the computer software along to the code path(s) related to the bug(s) based on the number of times for every function in the obtained fingerprint is called being greater than a predefined threshold; and
instructing, by the processor, the candidate patch to be installed into the computer software.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining further comprises:
sorting, by the processor, the candidate patch(es) based on the number of times for every function in the fingerprint(s) of the candidate patch(es).

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining further comprises:
determining, by the processor, the candidate patch(es) with a higher accumulated number of times for every function in the fingerprint(s) of the candidate patch(es) to be the candidate patch(es) with a higher probability level.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the obtained fingerprint of the patch is obtained by:
checking-in, by the processor, a source code of the patch into an original source code of the computer software to obtain a revised source code of the computer software;
comparing, by the processor, the original source code and the revised source code of the computer software to obtain a plurality of revised functions in the computer software; and
storing, by the processor, the plurality of revised functions as the fingerprint of the patch.

### Claim 5 (depends on 1)

The method according to claim 1, wherein a function in the fingerprints of the patch are presented as a specific method in a specific class in a specific package for the computer software, using object-oriented programming code.

### Claim 6

A computer system comprising:
a processor;
a memory device coupled to the processor; and
a computer readable storage device coupled to the processor, wherein the storage device contains program code executable by the processor via the memory device to implement a method comprising:
monitoring, by the processor, whether every function in an obtained fingerprint(s) of patch(es) has been called in response to a beginning of execution of a computer software along to code path(s) related to bug(s), wherein the monitoring includes accumulating a number of times for every function in the obtained fingerprint(s) of patch(es) being called;
determining, by the processor, candidate patch(es) in response to an end of the execution of the computer software along to the code path(s) related to the bug(s) based on the number of times for every function in the obtained fingerprint is called being greater than a predefined threshold; and
instructing, by the processor, the candidate patch to be installed into the computer software.

### Claim 7 (depends on 6)

The computer system according to claim 6, wherein the determining further comprises:
sorting, by the processor, the candidate patch(es) based on the number of times for every function in the obtained fingerprint(s) of the candidate patch(es).

### Claim 8 (depends on 7)

The computer system according to claim 7, wherein the determining further comprises:
determining, by the processor, the candidate patch(es) with a higher accumulated number of times for every function in the fingerprint(s) of the candidate patch(es) to be the candidate patch(es) with a higher probability level.

### Claim 9 (depends on 6)

The computer system according to claim 6, wherein the obtained fingerprint of the patch is obtained by:
checking in, by the processor, a source code of the patch into an original source code of the computer software to obtain a revised source code of the computer software;
comparing, by the processor, the original source code and the revised source code of the computer software to obtain a plurality of revised functions in the computer software; and
storing, by the processor, the plurality of revised functions as the fingerprint of the patch.

### Claim 10 (depends on 6)

The computer system according to claim 6, wherein a function in the fingerprints of the patch are presented as a specific method in a specific class in a specific package for the computer software, using object-oriented programming code.

### Claim 11

A computer program product, comprising a computer readable hardware storage device storing a computer readable program code, the computer readable program code comprising an algorithm that when executed by a computer processor of a computing system implements a method comprising:
monitoring, by the processor, whether every function in an obtained fingerprint(s) of patch(es) has been called in response to a beginning of execution of a computer software along to code path(s) related to bug(s), wherein the monitoring includes accumulating a number of times for every function in the obtained fingerprint(s) of patch(es) being called;
determining, by the processor, candidate patch(es) in response to an end of the execution of the computer software along to the code path(s) related to the bug(s) based on the number of times for every function in the obtained fingerprint is called being greater than a predefined threshold; and
instructing, by the processor, the candidate patch to be installed into the computer software.

### Claim 12 (depends on 11)

The computer program product according to claim 11, wherein the determining further comprises:
sorting, by the processor, the candidate patch(es) based on the number of times for every function in the obtained fingerprint(s) of the candidate patch(es).

### Claim 13 (depends on 12)

The computer program product according to claim 12, wherein the determining further comprises:
determining, by the processor, the candidate patch(es) with a higher accumulated number of times for every function in the fingerprint(s) of the candidate patch(es) to be the candidate patch(es) with a higher probability level.

### Claim 14 (depends on 11)

The computer program product according to claim 11, wherein the obtained fingerprint of the patch is obtained by:
checking in, by the processor, a source code of the patch into an original source code of the computer software to obtain a revised source code of the computer software;
comparing, by the processor, the original source code and the revised source code of the computer software to obtain a plurality of revised functions in the computer software; and
storing, by the processor, the plurality of revised functions as the fingerprint of the patch.

### Claim 15 (depends on 11)

The computer program product according to claim 11, wherein a function in the fingerprints of the patch are presented as a specific method in a specific class in a specific package for the computer software, using object-oriented programming code.
