Detecting and ranking API usage pattern in large source code repository: A LFM based approach

1Citations
Citations of this article
5Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

Code examples are key resources for helping programmers to learn correct Application Programming Interface (API) usages efficiently. However, most framework and library APIs fail in providing sufficient and adequate code examples in corresponding official documentations. Thus, it takes great programmers’ efforts to browse and extract API usage examples from websites. To reduce such effort, this paper proposes a graph-based pattern-oriented mining approach, LFM-OUPD (Local fitness measure for detecting overlapping usage patterns) for API usage facility, that recommends proper API code examples from data analytics. API method queries are accepted from programmers and corresponding code files are collected from related API dataset. The detailed structural links among API method elements in conceptual source codes are captured and generate a code graph structure. Lancichinetti et al. proposed an overlapping community detecting algorithm (Local fitness measure, LFM), based on the local optimization of a fitness function. In LFM-OUPD, a mining algorithm based on LFM is presented to explore the division of method sequences in the directed source code element graph and detect candidates of different API usage patterns. Then a ranking approach is applied to obtain appropriate API usage pattern and code example candidates. A case study on Google Guava is conducted to evaluate the effectiveness of this approach.

Cite

CITATION STYLE

APA

Zhao, J., & Liu, Y. (2017). Detecting and ranking API usage pattern in large source code repository: A LFM based approach. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 10410 LNCS, pp. 41–56). Springer Verlag. https://doi.org/10.1007/978-3-319-66808-6_4

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free