%0 Conference Proceedings %T Detecting and Ranking API Usage Pattern in Large Source Code Repository: A LFM Based Approach %+ Tongji University %A Zhao, Jitong %A Liu, Yan %Z Part 1: MAKE Topology %< avec comité de lecture %( Lecture Notes in Computer Science %B 1st International Cross-Domain Conference for Machine Learning and Knowledge Extraction (CD-MAKE) %C Reggio, Italy %Y Andreas Holzinger %Y Peter Kieseberg %Y A Min Tjoa %Y Edgar Weippl %I Springer International Publishing %3 Machine Learning and Knowledge Extraction %V LNCS-10410 %P 41-56 %8 2017-08-29 %D 2017 %R 10.1007/978-3-319-66808-6_4 %K Graph mining %K Source code mining %K API usage recommendation %K Data analytics %Z Computer Science [cs] %Z Humanities and Social Sciences/Library and information sciencesConference papers %X 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. %G English %Z TC 5 %Z TC 8 %Z TC 12 %Z WG 8.4 %Z WG 8.9 %Z WG 12.9 %2 https://inria.hal.science/hal-01677142/document %2 https://inria.hal.science/hal-01677142/file/456304_1_En_4_Chapter.pdf %L hal-01677142 %U https://inria.hal.science/hal-01677142 %~ SHS %~ IFIP-LNCS %~ IFIP %~ IFIP-TC %~ IFIP-TC5 %~ IFIP-WG %~ IFIP-TC12 %~ IFIP-TC8 %~ IFIP-WG8-4 %~ IFIP-WG8-9 %~ IFIP-LNCS-10410 %~ IFIP-CD-MAKE %~ IFIP-WG12-9