Detecting and Ranking API Usage Pattern in Large Source Code Repository: A LFM Based Approach - International Cross Domain Conference for Machine Learning and Knowledge Extraction (CD-MAKE 2017) Access content directly
Conference Papers Year : 2017

Detecting and Ranking API Usage Pattern in Large Source Code Repository: A LFM Based Approach

Jitong Zhao
  • Function : Author
  • PersonId : 1026066
Yan Liu
  • Function : Author
  • PersonId : 1026067

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.
Fichier principal
Vignette du fichier
456304_1_En_4_Chapter.pdf (2.7 Mo) Télécharger le fichier
Origin : Files produced by the author(s)
Loading...

Dates and versions

hal-01677142 , version 1 (08-01-2018)

Licence

Attribution

Identifiers

Cite

Jitong Zhao, Yan Liu. Detecting and Ranking API Usage Pattern in Large Source Code Repository: A LFM Based Approach. 1st International Cross-Domain Conference for Machine Learning and Knowledge Extraction (CD-MAKE), Aug 2017, Reggio, Italy. pp.41-56, ⟨10.1007/978-3-319-66808-6_4⟩. ⟨hal-01677142⟩
360 View
117 Download

Altmetric

Share

Gmail Facebook X LinkedIn More