API usage pattern mining
Abstract
Techniques for mining API method usage patterns from source code are described. These techniques include parsing the source code to generate API method call sequences that include an API method. These call sequences are clustered to obtain clusters. Based on the clusters, frequent closed sequences are determined and then clustered to obtain an API usage pattern. In addition, optimal clustering parameters may also be determined. In some instances, a graphical representation is generated based on the API usage pattern in response to a query associated with the API method.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 14.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A computer-implemented method for Application Programming Interface (API) method usage data mining, the method comprising: generating API call sequences associated with an API method from a code file; clustering the API call sequences to generate multiple clusters; determining multiple frequent closed sequences of the multiple clusters; and clustering the multiple frequent closed sequences to generate an API usage pattern associated with the API method.
- Claim 2Depends on #1
The computer-implemented method of claim 1 , wherein the clustering the API call sequences comprises clustering the API call sequences based on similarities among the API call sequences.
- Claim 3Depends on #1
The computer-implemented method of claim 1 , wherein the clustering the API call sequences comprises clustering the API call sequences using an n-gram algorithm.
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (14 of 14 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (5)
- Acharya, et al., "Mining API Patterns as Partial Orders from Source Code: From Usage Scenarios to Specifications", In Proceedings of 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, Sep. 3, 2007, 10 pages.
- Ammons, et al., "Mining Specifications" In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Jan. 16, 2002, 13 pages.
- Ayres, et al., "Sequential Pattern Mining using a Bitmap Representation" In Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Jul. 23, 2002, 7 pages.
- Buse, et al., "Synthesizing API Usage Examples", In Proceedings of 34th International Conference on Software Engineering, Jun. 2, 2012, 11 pages.
- Chatterjee, et al., "SNIFF: A Search Engine for Java Using Free-Form Queries" In Proceedings of 12th International Conference on Fundamental Approaches to Software Engineering, Mar. 22, 2009, 16 pages.