IP Library Granted Patent US 10,761,973
Granted Patent B2
US 10,761,973 · App. 16/086,474 · Granted Sep 1, 2020

Code coverage thresholds for code segments based on usage frequency and change frequency

Inventors: Alon Zanbar (Yehud, IL); Lilo Elia (Yehud, IL); Eliraz Busi (Yehud, IL)
Assignee: Micro Focus LLC
G06F11/3676G06F11/36G06F11/3604G06F11/3628G06F11/006G06F11/079
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 10,761,973
App. No.
16/086,474
Granted
Sep 1, 2020
Kind
B2
Abstract

In some examples, a system includes a segment identification engine and a coverage determination engine. The segment identification engine may a code segment in application code for updating a code coverage threshold applicable to the code segment. The coverage determination engine may update the code coverage threshold for the code segment based on a usage frequency of the code segment and a change frequency of the code segment.

Claims (38)

1. A system comprising:

a segment identification engine to:

identify a first subset of a plurality of code segments in application code, wherein each code segment in the first subset has a usage frequency that satisfies a usage frequency criterion;

identify a second subset of the plurality of code segments, wherein each code segment in the second subset has a change frequency that satisfies a change frequency criterion, wherein the change frequency specifies a number of commit actions applied to the code segment over a predetermined period of time; and

identify a joined subset comprising each code segment that is included in both the first and second subsets; and

a coverage determination engine to, for each code segment included in the joined subset, update a code coverage threshold for the code segment based on the usage frequency of the code segment and the change frequency of the code segment.

2. The system of claim 1 , wherein the coverage determination engine is to, for each code segment included in the joined subset, update the code coverage threshold further based on a previous code coverage level of the code segment.

3. The system of claim 2 , wherein the coverage determination engine is to, for each code segment included in the joined subset, update the code coverage threshold by selecting between the previous code coverage level and a weighted sum of the usage frequency and the change frequency.

4. The system of claim 1 , wherein the usage frequency of each code segment specifies a number of other code segments in the application code that use the code segment.

5. The system of claim 1 , wherein the usage frequency of each code segment specifies a ratio of a number of other code segments in the application code that use the code segment to a total number of code segments in the application code.

6. The system of claim 1 , wherein the coverage determination engine is to, for each code segment included in the joined subset, normalize the usage frequency of the code segment based on a scale associated with a previous code coverage level of the code segment.

7. The system of claim 6 , wherein the coverage determination engine is to, for each code segment included in the joined subset, normalize the change frequency of the code segment based on the scale associated with the previous code coverage level of the code segment.

8. A method comprising:

identifying, by a segment identification engine, a first subset of a plurality of code segments in application code, wherein each code segment in the first subset has a usage frequency that satisfies a usage frequency criterion;

identifying, by the segment identification engine, a second subset of the plurality of code segments, wherein each code segment in the second subset has a change frequency that satisfies a change frequency criterion, wherein the change frequency specifies a number of commit actions applied to the code segment over a predetermined period of time;

identifying, by the segment identification engine, a joined subset comprising each code segment that is included in both the first and second subsets; and

updating, for each code segment included in the joined subset, a code coverage threshold of the code segment based on a previous code coverage level of the code segment, the usage frequency of the code segment, and the change frequency of the code segment.

9. The method of claim 8 , wherein updating the code coverage threshold for each code segment included in the joined subset comprises determining to keep the code coverage threshold of the code segment at the previous code coverage level.

10. The method of claim 8 , wherein updating the code coverage threshold for each code segment included in the joined subset comprises adjusting the code coverage threshold to a weighted sum of the change frequency and the usage frequency.

11. The method of claim 10 , wherein the usage frequency of each code segment included in the joined subset specifies a ratio of a number of other code segments in the application code that use the code segment to a total number of code segments in the application code.

12. The method of claim 8 , wherein updating the code coverage threshold for each code segment included in the joined subset comprises determining the code coverage threshold for each code segment as a greater value between the previous code coverage level and a weighted sum of the usage frequency and the change frequency of the code segment.

13. The method of claim 8 , comprising, for each code segment included in the joined subset, normalizing the usage frequency of the code segment based on a scale associated with the previous code coverage level of the code segment.

14. The method of claim 8 , comprising, for each code segment included in the joined subset, normalizing the change frequency based on a scale associated with the previous code coverage level of the code segment.

15. A non-transitory machine-readable medium comprising instructions executable by a processing resource to:

identify a first subset of a plurality of code segments of application code, wherein each code segment within the first subset has a usage frequency that satisfies a usage frequency criterion and wherein, for each code segment in the first subset, the usage frequency of the code segment specifies a number of other code segments in the application code that use the code segment;

identify a second subset of the plurality of code segments of the application code, wherein each code segment within the second subset has a change frequency that satisfies a change frequency criterion and wherein, for each code segment in the second subset, the change frequency of the code segment specifies a number of commit actions applied to the code segment through a source control program over a predetermined time period;

identify a joined subset comprising each code segment that is included in both the first and second subsets; and

for each code segment in the joined subset, apply a code coverage adjustment function to the code segment to determine a code coverage threshold for the code segment based on a previous code coverage level of the code segment, the usage frequency of the code segment, and the change frequency of the code segment.

16. The non-transitory machine-readable medium of claim 15 , wherein the instructions are further executable by the processing resource to:

not to apply the code coverage adjustment function for other code segments of the application code not in the first subset and not in the second subset of the plurality of code segments.

17. The non-transitory machine-readable medium of claim 15 , wherein the instructions are further executable by the processing resource to:

for each code segment included in the joined subset, determine a weighted sum of the usage frequency of the code segment and the change frequency of the code segment.

18. The non-transitory machine-readable medium of claim 17 , wherein the instructions are further executable by the processing resource to:

for each code segment included in the joined subset, determine the code coverage threshold as a greater value between the previous code coverage level and the weighted sum of the usage frequency and the change frequency.

19. The non-transitory machine-readable medium of claim 17 , wherein the instructions are further executable by the processing resource to:

for each code segment included in the joined subset, determine the weighted sum based on a first weight value associated with the usage frequency of the code segment and a first weight value associated with the change frequency of the code segment.

20. The non-transitory machine-readable medium of claim 15 , wherein the instructions are further executable by the processing resource to:

for each code segment included in the joined subset, normalize the usage frequency and the change frequency of the code segment based on a scale associated with the previous code coverage level of the code segment.

Assignments (7)
RELEASE OF SECURITY INTEREST REEL/FRAME 052295/0041 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062625/0754 →
RELEASE OF SECURITY INTEREST REEL/FRAME 052294/0522 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062624/0449 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052295/0041 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052294/0522 →
CHANGE OF NAME Recorded Aug 8, 2019
From: ENTIT SOFTWARE LLC
To: MICRO FOCUS LLC
Reel/Frame 050004/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2018
From: ZANBAR, ALON; ELIA, LILO; BUSI, ELIRAZ
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 047487/0161 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2018
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
To: ENTIT SOFTWARE LLC
Reel/Frame 047510/0155 →
Continuity (1)
Related Publication 20190095315A1 · Mar 28, 2019
Cited By (1)
US 12,450,150