Detecting API usage patterns from software repositories using method categorization

Rizky Januar Akbar*, Takayuki Omori, Katsuhisa Maruyama

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Developers often have difficulties using APIs. To aid developers in efficiently using APIs, API usage patterns can be extracted from source code stored in software repositories. Previous approaches have mined repositories to extract API usage patterns by simply applying a data mining technique to the collection of method invocations of API objects. However, respective roles of invoked methods within API objects are not considered in these approaches. This paper proposes an improved approach that extracts API usage patterns at a higher-level abstraction rather than mining the actual method invocations. Our approach embraces a multilevel sequential mining technique and uses categorization of method invocations to define their concept hierarchy. In the categorization, the method invocations are categorized based on their roles. The extracted API usage patterns represent recurring usages of API objects. Therefore, they are useful to recommend typical usages of APIs. The experimental results show that our approach is practical to discover patterns that reveal characteristics of usages.

Original languageEnglish
Title of host publicationKnowledge-Based Software Engineering - Proceedings of the Tenth Conference on Knowledge-Based Software Engineering
PublisherIOS Press BV
Pages237-246
Number of pages10
ISBN (Print)9781614990932
DOIs
Publication statusPublished - 2012
Externally publishedYes

Publication series

NameFrontiers in Artificial Intelligence and Applications
Volume240
ISSN (Print)0922-6389
ISSN (Electronic)1879-8314

Keywords

  • API usage patterns
  • Mining software repositories
  • categorization

Fingerprint

Dive into the research topics of 'Detecting API usage patterns from software repositories using method categorization'. Together they form a unique fingerprint.

Cite this