IP Library › Granted Patent US 11,822,915
Granted Patent B2
US 11,822,915 · App. 17/560,031 · Granted Nov 21, 2023

Method for selecting the last patch from among a plurality patches for same location and the last patch selection module

Inventor: Min Hyuk Kwon (Yongin-si, KR)
Assignee: SURESOFT TECHNOLOGIES INC.
G06F8/65
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,822,915
App. No.
17/560,031
Filed
Dec 22, 2021
Granted
Nov 21, 2023
Kind
B2
Art Unit
2199
USPC
717/168
Abstract

A method of selecting a last patch from among a plurality of patches for a same location according to an embodiment of this invention includes generating a plurality of patches for a same location in a program; calculating a final score based on a code change rate, a code complexity, and a context similarity for each of the plurality of patches.

Claims (76)

1. A method of selecting a last patch from among a plurality of patches for a same location, comprising steps of:

generating a plurality of patches for the same location in a program;

calculating a final score based on a code change rate, a code complexity, and a context similarity for each of the plurality of patches; and

outputting a patch having a largest final score among the plurality of patches as the last patch,

wherein the code change rate is scored based on a following Equation:

Code change rate=100−(100/total number of changed lines)*number of deleted or added lines).  <Equation>

2. The method of selecting a last patch from among a plurality of patches for a same location of claim 1 , wherein

the final score for each of the plurality of patches is scored based on a following Equation:

The final score=(code change rate*weight 1)+(code complexity*weight 2)+(context similarity*weight 3).  <Equation>

3. A method of selecting a last patch from among a plurality of patches for a same location, comprising steps of:

generating a plurality of patches for the same location in a program;

calculating a final score based on a code change rate, a code complexity, and a context similarity for each of the plurality of patches; and

outputting a patch having a largest final score among the plurality of patches as the last patch

wherein the code complexity is scored based on a patch file variance score, an inter-modification variance score, and a logical complexity.

4. The method of selecting a last patch from among a plurality of patches for a same location of claim 3 , wherein

the code complexity is scored based on a following Equation:

Code complexity=(SQRT(patch file variance score*variance score among modifications)*0.5+(logical complexity*0.5).  <Equation>

5. The method of selecting a last patch from among a plurality of patches for a same location of claim 3 , wherein

the patch file variance score is calculated based on Equation 1 below,

the inter-modification variance score is calculated based on Equation 2 below, and

the logical complexity is calculated based on Equation 3 below:

Patch file variance score=100/(number of modified files)  <Equation 1>

Inter-modification variance score=(100/(maximum variance value of patch))*(variance value of current patch)  <Equation 2>

<Equation 3>

sum of number of logical operators and number of conditional statements is less than 3, =100 points,

sum of number of logical operators and number of conditional statements is less than 5, =50 points,

sum of number of logical operators and number of conditional statements is less than 7, =25 points, and

other than that, =0.

6. The method of selecting a last patch from among a plurality of patches for a same location of claim 3 , wherein

the final score for each of the plurality of patches is scored based on a following Equation:

The final score=(code change rate*weight 1)+(code complexity*weight 2)+(context similarity*weight 3).  <Equation>

7. A method of selecting a last patch from among a plurality of patches for a same location, comprising steps of:

generating a plurality of patches for the same location in a program;

calculating a final score based on a code change rate, a code complexity, and a context similarity for each of the plurality of patches; and

outputting a patch having a largest final score among the plurality of patches as the last patch,

wherein the context similarity is scored based on a following Equation:

Context similarity=100*(graph similarity).  <Equation>

8. The method of selecting a last patch from among a plurality of patches for a same location of claim 7 , wherein

the final score for each of the plurality of patches is scored based on a following Equation:

The final score=(code change rate*weight 1)+(code complexity*weight 2)+(context similarity*weight 3).  <Equation>

9. A last patch selection module comprising:

a patch generator which generates a plurality of patches for a same location in a program, and

a patch selector calculating a final score for each of the plurality of patches based on a code change rate, a code complexity, and a context similarity, and outputting a patch having a largest final score among the plurality of patches as a last patch,

wherein the patch selector scores the code change rate based on ae following Equation:

Code change rate=100−(100/total number of changed lines)*number of deleted or added lines).  <Equation>

10. The last patch selection module of claim 9 , wherein

the patch selector scores the final score for each of the plurality of patches based on a following Equation:

The final score=(code change rate*weight 1)+(code complexity*weight 2)+(context similarity*weight 3).  <Equation>

11. A last patch selection module comprising:

a patch generator which generates a plurality of patches for a same location in a program, and

a patch selector calculating a final score for each of the plurality of patches based on a code change rate, a code complexity, and a context similarity, and outputting a patch having a largest final score among the plurality of patches as a last patch,

wherein the patch selector scores the code complexity based on a patch file variance score, an inter-modification variance score, and a logical complexity.

12. The last patch selection module of claim 11 , wherein the patch selector scores the code complexity based on a following Equation:

Code complexity=(SQRT(patch file variance score*variance score among modifications)*0.5+(logical complexity*0.5).  <Equation>

13. The last patch selection module of claim 11 , wherein the patch selector that:

calculates the patch file variance score based on Equation 1 below,

calculates the inter-modification variance score based on Equation 2 below, and

calculates the logical complexity based on Equation 3 below:

Patch file variance score=100/(number of modified files)  <Equation 1>

Inter-modification variance score=(100/(maximum variance value of patch))*(variance value of current patch)  <Equation 2>

<Equation 3>

sum of number of logical operators and number of conditional statements is less than 3, =100 points,

sum of number of logical operators and number of conditional statements is less than 5, =50 points,

sum of number of logical operators and number of conditional statements is less than 7, =25 points, and

other than that, =0.

14. The last patch selection module of claim 11 , wherein

the patch selector scores the final score for each of the plurality of patches based on a following Equation:

The final score=(code change rate*weight 1)+(code complexity*weight 2)+(context similarity*weight 3).  <Equation>

15. A last patch selection module comprising:

a patch generator which generates a plurality of patches for a same location in a program, and

a patch selector calculating a final score for each of the plurality of patches based on a code change rate, a code complexity, and a context similarity, and outputting a patch having a largest final score among the plurality of patches as a last patch,

wherein the patch selector scores the context similarity based on a following Equation:

Context similarity=100*(graph similarity).  <Equation>

16. The last patch selection module of claim 15 , wherein

the patch selector scores the final score for each of the plurality of patches based on a following Equation:

The final score=(code change rate*weight 1)+(code complexity*weight 2)+(context similarity*weight 3).  <Equation>

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE ADDRESS OF ASSIGNEE PREVIOUSLY RECORDED ON REEL 058466 FRAME 0077. ASSIGNOR(S) HEREBY CONFIRMS THE CORRECTED ADDRESS OF ASSIGNEE. Recorded Jan 11, 2022
From: KOWN, MIN HYUK
To: SURESOFT TECHNOLOGIES INC.
Reel/Frame 058691/0780 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2021
From: KWON, MIN HYUK
To: SURESOFT TECHNOLOGIES INC.
Reel/Frame 058466/0077 →
Priority Claims (1)
KR 10-2021-0141792 · Oct 22, 2021 · national
Continuity (1)
Related Publication 20230130772A1 · Apr 27, 2023
Cited By (1)
US 12,412,179