IP Library › Granted Patent US 12,159,126
Granted Patent B1
US 12,159,126 · App. 17/867,093 · Granted Dec 3, 2024

Systems and methods for identifying unused code

Inventors: David M. Jones, Jr. (San Antonio, TX); Robert Lee Black (San Antonio, TX); Timothy Blair Chalmers (San Antonio, TX); Gideon Bowie Luck (Wylie, TX); Sumita T. Jonak (San Antonio, TX); Ana Rosa Maldonado (San Antonio, TX); Oscar Roberto Tijerina (San Antonio, TX)
Assignee: United Services Automobile Association (USAA)
G06F8/4435G06F8/70
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 12,159,126
App. No.
17/867,093
Granted
Dec 3, 2024
Kind
B1
Abstract

Techniques are provided herein to identify unused computer code in a computer code corpus. Execution tracking characteristics may be used to identify unused code branches within the computer code corpus. A notification may be provided, indicating the unused code along with an option for easy removal.

Claims (63)

1. A tangible, non-transitory, computer-readable medium, comprising computer-readable instructions that, when executed by one or more computer processors, cause the one or more computer processors to:

track code execution of computer code currently executing;

based upon the tracking, identify one or more portions of the computer code as unused code portions, wherein the one or more computer processors identify a switch statement in the one or more portions of the computer code by identifying a conditional statement in the one or more portions of the computer code that is conditioned upon a hardcoded value, wherein the conditional statement is causing a code branch of the one or more portions of the computer code not to execute;

identify the code branch that does not execute as at least one of the unused code portions; and

provide a graphical user interface (GUI) comprising an indication of the unused code portions.

2. The tangible, non-transitory, computer-readable medium of claim 1 , comprising computer-readable instructions that, when executed by the one or more computer processors, cause the one or more computer processors to:

identify a last time the hardcoded value was changed; and

identify the code branch of the one or more portions of the computer code as the at least one of the unused code portions only when the last time the hardcoded value was changed breaches a threshold time period.

3. The tangible, non-transitory, computer-readable medium of claim 2 , comprising computer-readable instructions that, when executed by the one or more computer processors, cause the one or more computer processors to:

identify the last time the hardcoded value was changed by analyzing a revision history of a code corpus, data store, or both for a change in the hardcoded value.

4. The tangible, non-transitory, computer-readable medium of claim 1 , comprising computer-readable instructions that, when executed by the one or more computer processors, cause the one or more computer processors to:

track the code execution using a code profiler that provides a count of executions of code branches within the computer code; and

identify a subset of the code branches that breach an execution count threshold as the one or more portions of the computer code identified as the unused code portions.

5. The tangible, non-transitory, computer-readable medium of claim 1 , comprising computer-readable instructions that, when executed by the one or more computer processors, cause the one or more computer processors to:

identify, using a code profiler, a set of all available functions within the computer code;

identify, using the code profiler, a set of functions executed during the execution of the computer code;

identify a set of unused functions based upon a comparison of the set of all available functions to the set of functions executed during the execution of the computer code; and

identify the unused functions as the one or more portions of the computer code identified as the unused code portions.

6. The tangible, non-transitory, computer-readable medium of claim 1 , wherein the GUI comprises a preview of the one or more portions of the computer code, a link to the one or more portions of the computer code, or both.

7. The tangible, non-transitory, computer-readable medium of claim 1 , wherein the GUI comprises an affordance to delete, review, or both the one or more portions of the computer code.

8. A system, comprising:

a client computer;

a computer code repository storing a computer code;

a code analysis engine, configured to:

track code execution of the computer code currently executing;

based upon the tracking, identify one or more portions of the computer code as unused code portions, wherein the code analysis engine is configured to identify a switch statement in the one or more portions of the computer code by identifying a conditional statement in the one or more portions of the computer code that is conditioned upon a hardcoded value, wherein the conditional statement is causing a code branch of the one or more portions of the computer code not to execute;

identify the code branch that does not execute as at least one of the unused code portions; and

provide a graphical user interface (GUI) comprising an indication of the unused code portions.

9. The system of claim 8 , wherein the code analysis engine is configured to:

identify a last time the hardcoded value was changed; and

identify the code branch of the code as the at least one of the unused code portions only when the last time the hardcoded value was changed breaches a threshold time period.

10. The system of claim 9 , comprising:

a revision history of the computer code; and

wherein the code analysis engine is configured to:

identify the last time the hardcoded value was changed by analyzing the revision history of the computer code for a change in the hardcoded value.

11. The system of claim 8 wherein the code analysis engine is configured to:

track the code execution using a code profiler that provides a count of executions of code branches within the computer code; and

identify a subset of the code branches that breach a execution count threshold as the one or more portions of the computer code identified as the unused code portions.

12. The system of claim 8 , wherein the code analysis engine is configured to:

identify, using a code profiler, a set of all available functions within the computer code;

identify, using the code profiler, a set of functions executed during the execution of the computer code;

identify a set of unused functions based upon a comparison of the set of all available functions to the set of functions executed during the execution of the computer code; and

identify the unused functions as the one or more portions of the computer code identified as the unused code portions.

13. The system of claim 8 , wherein the GUI comprises a preview of the one or more portions of the computer code, a link to the one or more portions of the computer code, or both.

14. The system of claim 8 , wherein the GUI comprises an affordance to delete, review, or both the one or more portions of the computer code.

15. A computer-implemented method, comprising:

tracking code execution of computer code currently executing;

based upon the tracking, identifying one or more portions of the computer code as unused code portions, wherein identifying the one or more portions of the computer code as unused code portions comprises identifying a switch statement in the one or more portions of the computer code by identifying a conditional statement in the one or more portions of the computer code that is conditioned upon a hardcoded value, wherein the conditional statement is causing a code branch of the one or more portions of the computer code not to execute;

identifying the code branch that does not execute as at least one of the unused code portions; and

providing a graphical user interface (GUI) comprising an indication of the unused code portions.

16. The computer-implemented method of claim 15 , comprising:

identifying a last time the hardcoded value was changed by analyzing a revision history of a code corpus, data store, or both for a change in the hardcoded value; and

identifying the code branch of the code as at least one of the unused code portions when the last time the hardcoded value was changed breaches a threshold time period.

17. The computer-implemented method of claim 15 , comprising:

tracking the code execution using a code profiler that provides a count of executions of code branches within the computer code; and

identifying a subset of the code branches that breach a execution count threshold as the one or more portions of the computer code identified as the unused code portions.

18. The computer-implemented method of claim 15 , comprising:

identifying, using a code profiler, a set of all available functions within the computer code;

identifying, using the code profiler, a set of functions executed during the execution of the computer code;

identifying a set of unused functions based upon a comparison of the set of all available functions to the set of functions executed during the execution of the computer code; and

identifying the unused functions as the one or more portions of the computer code identified as the unused code portions.

19. The computer-implemented method of claim 15 , wherein the GUI comprises a preview of the one or more portions of the computer code, a link to the one or more portions of the computer code, or both.

20. The computer-implemented method of claim 15 , wherein the GUI comprises an affordance to delete, review, or both the one or more portions of the computer code.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 16, 2024
From: JONAK, SUMITA T.
To: UIPCO, LLC
Reel/Frame 068919/0017 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 1, 2024
From: UIPCO, LLC
To: UNITED SERVICES AUTOMOBILE ASSOCIATION (USAA)
Reel/Frame 068758/0817 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 18, 2022
From: JONES, DAVID M., JR.; BLACK, ROBERT LEE; CHALMERS, TIMOTHY BLAIR; LUCK, GIDEON BOWIE; MALDONADO, ANA ROSA; TIJERINA, OSCAR ROBERTO
To: UIPCO, LLC
Reel/Frame 060536/0680 →
Continuity (1)
Provisional Application 63223420 · Jul 19, 2021