IP Library › Granted Patent US 11,263,062
Granted Patent B2
US 11,263,062 · App. 16/269,490 · Granted Mar 1, 2022

API mashup exploration and recommendation

Inventors: Qiyu Zhi (Sunnyvale, CA); Lei Liu (San Jose, CA); Wei-Peng Chen (Fremont, CA)
Assignee: FUJITSU LIMITED
G06F9/541G06F16/9027G06F16/9038G06F16/9566G06F16/972
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,263,062
App. No.
16/269,490
Granted
Mar 1, 2022
Kind
B2
Abstract

A method may include collecting a plurality of computer-readable source code from an application programming interface (API) repository. The method may also include performing API call code slicing on the computer-readable source code. The method may also include extracting an API host and an endpoint for each of the API call codes identified in the API call code slicing. The method may also include compiling an API mashup database based on the extracted API host and endpoints. Furthermore, the method may also include providing a recommended API mashup of the API mashup database in a user interface.

Claims (83)

1. A method, comprising:

collecting a plurality of computer-readable source code from an application programming interface (API) repository;

performing API call code slicing on the computer-readable source code to identify API call codes from the computer-readable source code, the API call code slicing comprising, for an API call code comprising multiple code files with multiple API calls within a single project:

collecting a plurality of Uniform Resource Locator (URL)s in the multiple code files;

filtering the plurality of URLs to identify a plurality of host URLs; and

filtering the multiple code files to identify code files which include the plurality of host URLs and which include two or more URLs;

extracting an API host and an endpoint for each of the API call codes identified in the API call code slicing;

compiling an API mashup database based on the extracted API host and endpoints, the API mashup database including a plurality of API mashups wherein each respective API mashup:

relates to a corresponding software program;

includes a plurality of respective API's used by the corresponding software program;

indicates a corresponding host and endpoint for each respective API; and

indicates a usage relationship between the respective API's of the respective API mashup; and

providing a recommended API mashup of the API mashup database in a user interface.

2. The method of claim 1 , wherein the API repository comprises GITHUB®.

3. The method of claim 1 , wherein collecting the plurality of computer-readable source code comprises:

identifying a plurality of API call methods for a programming language;

performing a code search operation on the API repository using the identified API call methods of the programming language; and

filtering the results of the code search operation to identify code files including two or more API calls.

4. The method of claim 3 , wherein collecting the plurality of computer-readable source code further comprises:

identifying single code files in the results of the code search operation including two or more API calls; and

identifying multiple code files for a single project in the results of the code search operation including multiple API calls.

5. The method of claim 1 , wherein the API call code slicing comprises:

for an API call code comprising a single code file identified as including two or more API calls:

traversing an abstract syntax tree of the single code file to locate the API call code in the single code file; and

removing code statements in the single code file which are irrelevant to the API call code.

6. The method of claim 1 , further comprising:

receiving user-defined search parameters for a recommended API mashup from a user,

wherein the recommended API mashup is further recommended based on the user-defined search parameters.

7. The method of claim 6 , wherein the user-defined search parameters are selected from a group including host URL, endpoint, API keyword, and API repository.

8. One or more non-transitory computer-readable media containing instructions, which, when executed by one or more processors, cause a system to perform operations, the operations comprising:

collecting a plurality of computer-readable source code from an application programming interface (API) repository;

performing API call code slicing on the computer-readable source code to identify API call, the API call code slicing comprising, for an API call code comprising multiple code files with multiple API calls within a single project:

collecting a plurality of Uniform Resource Locator (URL)s in the multiple code files;

filtering the plurality of URLs to identify a plurality of host URLs; and

filtering the multiple code files to identify code files which include the plurality of host URLs and which include two or more URLs;

extracting an API host and an endpoint for each of the API call codes identified in the API call code slicing;

compiling an API mashup database based on the extracted API host and endpoints, the API mashup database including a plurality of API mashups wherein each respective API mashup:

relates to a corresponding software program;

includes a plurality of respective API's used by the corresponding software program;

indicates a corresponding host and endpoint for each respective API; and

indicates a usage relationship between the respective API's of the respective API mashup; and

providing a recommended API mashup of the API mashup database in a user interface.

9. The computer-readable media of claim 8 , wherein the API repository comprises GITHUB®.

10. The computer-readable media of claim 8 , wherein collecting the plurality of computer-readable source code comprises:

identifying a plurality of API call methods for a programming language;

performing a code search operation on the API repository using the identified API call methods of the programming language; and

filtering the results of the code search operation to identify code files search including two or more API calls.

11. The computer-readable media of claim 10 , wherein collecting the plurality of computer-readable source code further comprises:

identifying single code files in the results of the code search operation including two or more API calls; and

identifying multiple code files for a single project in the results of the code search operation including multiple API calls.

12. The computer-readable media of claim 8 , wherein API call code slicing comprises:

for an API call code comprising a single code file identified as including two or more API calls:

traversing an abstract syntax tree of the single code file to locate the API call code in the single code file; and

removing code statements in the single code file which are irrelevant to the API call code.

13. The computer-readable media of claim 8 , the operations further comprising:

receiving user-defined search parameters for a recommended API mashup from a user,

wherein the recommended API mashup is further recommended based on the user-defined search parameters.

14. The computer-readable media of claim 13 , wherein the user-defined search parameters are selected from a group including host URL, endpoint, API keyword, and API repository.

15. A system comprising:

one or more processors; and

one or more non-transitory computer-readable media containing instructions, which, when executed by one or more processors, cause a system to perform operations, the operations comprising:

collecting a plurality of computer-readable source code from an application programming interface (API) repository;

performing API call code slicing on the computer-readable source code to identify API call codes from the computer-readable source code, the API call code slicing comprising, for an API call code comprising multiple code files with multiple API calls within a single project:

collecting a plurality of Uniform Resource Locator (URL)s in the multiple code files;

filtering the plurality of URLs to identify a plurality of host URLs; and

filtering the multiple code files to identify code files which include the plurality of host URLs and which include two or more URLs;

extracting an API host and an endpoint for each of the API call codes identified in the API call code slicing;

compiling an API mashup database based on the extracted API host and endpoints, the API mashup database including a plurality of API mashups wherein each respective API mashup:

relates to a corresponding software program;

includes a plurality of respective API's used by the corresponding software program;

indicates a corresponding host and endpoint for each respective API; and

indicates a usage relationship between the respective API's of the respective API mashup; and

providing a recommended API mashup of the API mashup database in a user interface.

16. The system of claim 15 , wherein collecting the plurality of computer-readable source code comprises:

identifying a plurality of API call methods for a programming language;

performing a code search operation on the API repository using the identified API call methods of the programming language; and

filtering the results of the code search operation to identify code files search including two or more API calls.

17. The system of claim 16 , wherein collecting the plurality of computer-readable source code further comprises:

identifying single code files in the results of the code search operation including two or more API calls; and

identifying multiple code files for a single project in the results of the code search operation including multiple API calls.

18. The system of claim 15 , wherein the operations further comprise:

receiving user-defined search parameters for a recommended API mashup from a user,

wherein the recommended API mashup is further recommended based on the user-defined search parameters.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 7, 2019
From: ZHI, QIYU; LIU, LEI; CHEN, WEI-PENG
To: FUJITSU LIMITED
Reel/Frame 048271/0672 →
Continuity (1)
Related Publication 20200250015A1 · Aug 6, 2020