IP Library Granted Patent US 10,169,035
Granted Patent B1
US 10,169,035 · App. 15/696,300 · Granted Jan 1, 2019

Customized static source code analysis

Inventor: Omer Caspi (Modiin, IL)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F8/73
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,169,035
App. No.
15/696,300
Granted
Jan 1, 2019
Kind
B1
Abstract

Technical solutions are described for customized static source code analysis. An example method includes parsing a source code, the parsing comprising identifying an application programming interface (API) call. The method further includes identifying an analysis configuration file corresponding to the API call. Further, the method includes determining, based on the analysis configuration file, a description of the API call and an identification of a target resource invoked by the API call. Further, the method includes generating a static source code analysis report that includes the description of the API call and the identification of the target resource corresponding to the API call.

Claims (43)

1. A system comprising:

a memory; and

a processor coupled with the memory, the processor configured to perform a customized static source code analysis of a source code, the customized static source code analysis comprising:

parsing a source code, the parsing comprising identifying a first application programming interface (API) call, and a second API call;

identifying a first analysis configuration file corresponding to the first API call, and a second analysis configuration file corresponding to the second API call;

determining, based on the first analysis configuration file, a description of the first API call and an identification of a first target resource invoked by the first API call;

determining, based on the second analysis configuration file, a second description of the second API call and an identification of a second target resource invoked by the second API call; and

generating a static source code analysis report that includes the description of the first API call and the identification of the first target resource corresponding to the first API call, and the description of the second API call and the identification of the second target resource corresponding to the second API call.

2. The system of claim 1 , wherein the first analysis configuration file comprises mapping data to resolve the first target resource based on a type of the first API call.

3. The system of claim 2 , wherein the type of the first API call is one from a group of types of API calls consisting of control flow API, external data access API, internal data API, and messaging API.

4. The system of claim 2 , wherein the mapping data comprises a program name in response to the first target resource being a service.

5. The system of claim 2 , wherein the mapping data comprises a table identifier in response to the first target resource being a data-item from a database.

6. The system of claim 2 , wherein the mapping data comprises a remote machine identifier in response to the first API call being a messaging API that invokes a remote resource.

7. The system of claim 1 , wherein determining the first target resource further comprises:

in response to a mapping data from the first analysis configuration file including a user-exit reference:

executing a script corresponding to the user-exit reference; and

determining the first target resource from a result of the script.

8. A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processing circuit to cause the processing circuit to perform customized static source code analysis, the customized static source code analysis comprising:

parsing a source code, the parsing comprising identifying a first application programming interface (API) call, and a second API call;

identifying a first analysis configuration file corresponding to the first API call, and a second analysis configuration file corresponding to the second API call;

determining, based on the first analysis configuration file, a description of the first API call and an identification of a first target resource invoked by the first API call;

determining, based on the second analysis configuration file, a second description of the second API call and an identification of a second target resource invoked by the second API call; and

generating a static source code analysis report that includes the description of the first API call and the identification of the first target resource corresponding to the first API call, and the description of the second API call and the identification of the second target resource corresponding to the second API call.

9. The computer program product of claim 8 , wherein the first configuration file comprises:

a program name in response to the first target resource being a service;

a table identifier in response to the first target resource being a data-item from a database; and

a remote machine identifier in response to the first API call being a messaging API that invokes a remote resource.

10. The computer program product of claim 8 , wherein determining the first target resource further comprises:

in response to a mapping data from the first analysis configuration file including a user-exit reference:

executing a script corresponding to the user-exit reference; and

determining the first target resource from a result of the script.

11. The computer program product of claim 8 , wherein the first analysis configuration file comprises mapping data to resolve the first target resource based on a type of the first API call.

12. The computer program product of claim 11 , wherein the type of the API call is one from a group of types of API calls consisting of control flow API, external data access API, internal data API, and messaging API.

13. The computer program product of claim 8 , wherein the first analysis configuration file is corresponding to a first user, the static source code analysis report is a first static source code analysis report, and wherein the customized static source code analysis further comprising:

parsing the source code, the parsing comprising identifying said first API call;

identifying a third analysis configuration file corresponding to said first API call; and

determining, based on the third analysis configuration file, a second description of said first API call and a second identification of said first target resource invoked by said first API call; and

generating a second static source code analysis report that includes the second description of said first API call and the second identification of said first target resource.

14. The system of claim 1 , wherein the first analysis configuration file is corresponding to a first user, the static source code analysis report is a first static source code analysis report, and wherein the customized static source code analysis further comprising:

parsing the source code, the parsing comprising identifying said first API call;

identifying a third analysis configuration file corresponding to said first API call; and

determining, based on the third analysis configuration file, a second description of said first API call and a second identification of said first target resource invoked by said first API call; and

generating a second static source code analysis report that includes the second description of said first API call and the second identification of said first target resource.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 6, 2017
From: CASPI, OMER
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 043499/0889 →
Cited By (2)
US 12,229,599 US 12,406,287