IP Library › Granted Patent US 11,163,548
Granted Patent B2
US 11,163,548 · App. 16/733,027 · Granted Nov 2, 2021

Code registration to detect breaking API changes

Inventors: Jeffrey Stylos (Somerville, MA); Ajiemar D. Santiago (Volente, TX); Dustin Popp (Austin, TX); German Attanasio Ruiz (Somerville, MA)
Assignee: International Business Machines Corporation
G06F8/65G06F9/54G06F11/327
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,163,548
App. No.
16/733,027
Granted
Nov 2, 2021
Kind
B2
Abstract

An approach is provided in which the approach registers a code snippet received from a user that corresponds to source code executing on a client. The approach evaluates the registered code snippet and identifies an application program interface (API) feature that calls an API from the code snippet. When the approach determines that the API feature is deprecated by the API, the approach generates a custom notification that includes the deprecated API feature and sends the custom notification to the client.

Claims (68)

1. A method implemented by an information handling system that includes a memory and a processor, the method comprising:

registering a code snippet provided by a user, wherein the registered code snippet corresponds to a source code executing on a client;

evaluating the registered code snippet and identifying an application program interface (API) feature in the registered code snippet that calls an API; and

in response to determining that the API feature in the registered code snippet is deprecated by the API:

automatically generating a set of replacement code that replaces the deprecated API feature in the registered code snippet with an active API feature;

generating a custom notification that comprises the deprecated API feature in the registered code snippet and the set of replacement code; and

sending the custom notification to the user.

2. The method of claim 1 wherein, prior to determining that the API feature in the registered code snippet is deprecated by the API, the method further comprises:

assigning a unique ID to the registered code snippet;

utilizing the unique ID to track an amount of runtime API calls that the API feature in the registered code snippet calls the API; and

deprecating the API feature in the registered code snippet in response to determining that the amount of runtime API calls fails to meet a minimum threshold.

3. The method of claim 2 further comprising:

inserting the amount of runtime API calls into the custom notification.

4. The method of claim 2 further comprising:

sending the unique ID to the client, wherein the client modifies the source code to include the unique ID in the runtime API calls.

5. The method of claim 1 further comprising:

in response to receiving the set of replacement code at the client, modifying the source code, by the client, by replacing the deprecated API feature in the registered code snippet with the active API feature.

6. The method of claim 1 wherein, in response to sending the custom notification to the user, the method further comprises:

tracking an amount of runtime API calls that the API feature in the registered code snippet calls the API; and

in response to determining that the amount of runtime API calls reaches a threshold:

suppressing a removal of the API feature in the registered code snippet; and

resending the custom notification to the user.

7. An information handling system comprising:

one or more processors;

a memory coupled to at least one of the one or more processors; and

a set of computer program instructions stored in the memory and executed by the at least one of the one or more processors in order to perform actions of:

registering a code snippet provided by a user, wherein the registered code snippet corresponds to a source code executing on a client;

evaluating the registered code snippet and identifying an application program interface (API) feature in the registered code snippet that calls an API; and

in response to determining that the API feature in the registered code snippet is deprecated by the API:

automatically generating a set of replacement code that replaces the deprecated API feature in the registered code snippet with an active API feature;

generating a custom notification that comprises the deprecated API feature in the registered code snippet and the set of replacement code; and

sending the custom notification to the user.

8. The information handling system of claim 7 wherein, prior to determining that the API feature in the registered code snippet is deprecated by the API, the at least one of the one or more processors perform additional actions comprising:

assigning a unique ID to the registered code snippet;

utilizing the unique ID to track an amount of runtime API calls that the API feature in the registered code snippet calls the API; and

deprecating the API feature in the registered code snippet in response to determining that the amount of runtime API calls fails to meet a minimum threshold.

9. The information handling system of claim 8 wherein the at least one of the one or more processors perform additional actions comprising:

inserting the amount of runtime API calls into the custom notification.

10. The information handling system of claim 8 wherein the at least one of the one or more processors perform additional actions comprising:

sending the unique ID to the client, wherein the client modifies the source code to include the unique ID in the runtime API calls.

11. The information handling system of claim 7 wherein the at least one of the one or more processors perform additional actions comprising:

in response to receiving the set of replacement code at the client, modifying the source code, by the client, by replacing the deprecated API feature in the registered code snippet with the active API feature.

12. The information handling system of claim 7 wherein, in response to sending the custom notification to the user, the at least one of the one or more processors perform additional actions comprising:

tracking an amount of runtime API calls that the API feature in the registered code snippet calls the API; and

in response to determining that the amount of runtime API calls reaches a threshold:

suppressing a removal of the API feature in the registered code snippet; and

resending the custom notification to the user.

13. A computer program product stored in a computer readable storage medium, comprising computer program code that, when executed by an information handling system, causes the information handling system to perform actions comprising:

registering a code snippet provided by a user, wherein the registered code snippet corresponds to a source code executing on a client;

evaluating the registered code snippet and identifying an application program interface (API) feature in the registered code snippet that calls an API; and

in response to determining that the API feature in the registered code snippet is deprecated by the API:

automatically generating a set of replacement code that replaces the deprecated API feature in the registered code snippet with an active API feature;

generating a custom notification that comprises the deprecated API feature in the registered code snippet and the set of replacement code; and

sending the custom notification to the user.

14. The computer program product of claim 13 wherein, prior to determining that the API feature in the registered code snippet is deprecated by the API, the information handling system performs further actions comprising:

assigning a unique ID to the registered code snippet;

utilizing the unique ID to track an amount of runtime API calls that the API feature in the registered code snippet calls the API; and

deprecating the API feature in the registered code snippet in response to determining that the amount of runtime API calls fails to meet a minimum threshold.

15. The computer program product of claim 14 wherein the information handling system performs further actions comprising:

sending the unique ID to the client, wherein the client modifies the source code to include the unique ID in the runtime API calls; and

inserting the amount of runtime API calls into the custom notification.

16. The computer program product of claim 13 wherein the information handling system performs further actions comprising:

in response to receiving the set of replacement code at the client, modifying the source code, by the client, by replacing the deprecated API feature in the registered code snippet with the active API feature.

17. The computer program product of claim 13 wherein, in response to sending the custom notification to the user, the information handling system performs further actions comprising:

tracking an amount of runtime API calls that the API feature in the registered code snippet calls the API; and

in response to determining that the amount of runtime API calls reaches a threshold:

suppressing a removal of the API feature in the registered code snippet; and

resending the custom notification to the user.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 2, 2020
From: STYLOS, JEFFREY; SANTIAGO, AJIEMAR D.; POPP, DUSTIN; ATTANASIO RUIZ, GERMAN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 051404/0763 →
Continuity (1)
Related Publication 20210208865A1 · Jul 8, 2021
Cited By (1)
US 12,481,484