Skip to main content

MAPO: mining and recommending api usage patterns

Publication ,  Conference
Zhong, H; Xie, T; Zhang, L; Pei, J; Mei, H
Published in: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
September 14, 2009

To improve software productivity, when constructing new software systems, programmers often reuse existing libraries or frameworks by invoking methods provided in their APIs. Those API methods, however, are often complex and not well documented. To get familiar with how those API methods are used, programmers often exploit a source code search tool to search for code snippets that use the API methods of interest. However, the returned code snippets are often large in number, and the huge number of snippets places a barrier for programmers to locate useful ones. In order to help programmers overcome this barrier, we have developed an API usage mining framework and its supporting tool called MAPO (Mining API usage Pattern from Open source repositories) for mining API usage patterns automatically. A mined pattern describes that in a certain usage scenario, some API methods are frequently called together and their usages follow some sequential rules. MAPO further recommends the mined API usage patterns and their associated code snippets upon programmers' requests. Our experimental results show that with these patterns MAPO helps programmers locate useful code snippets more effectively than two state-of-the-art code search tools. To investigate whether MAPO can assist programmers in programming tasks, we further conducted an empirical study. The results show that using MAPO, programmers produce code with fewer bugs when facing relatively complex API usages, comparing with using the two state-of-the-art code search tools. © 2009 Springer Berlin Heidelberg.

Duke Scholars

Altmetric Attention Stats
Dimensions Citation Stats

Published In

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

DOI

EISSN

1611-3349

ISSN

0302-9743

Publication Date

September 14, 2009

Volume

5653 LNCS

Start / End Page

318 / 343

Related Subject Headings

  • Artificial Intelligence & Image Processing
  • 46 Information and computing sciences
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Zhong, H., Xie, T., Zhang, L., Pei, J., & Mei, H. (2009). MAPO: mining and recommending api usage patterns. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 5653 LNCS, pp. 318–343). https://doi.org/10.1007/978-3-642-03013-0_15
Zhong, H., T. Xie, L. Zhang, J. Pei, and H. Mei. “MAPO: mining and recommending api usage patterns.” In Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 5653 LNCS:318–43, 2009. https://doi.org/10.1007/978-3-642-03013-0_15.
Zhong H, Xie T, Zhang L, Pei J, Mei H. MAPO: mining and recommending api usage patterns. In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics). 2009. p. 318–43.
Zhong, H., et al. “MAPO: mining and recommending api usage patterns.” Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 5653 LNCS, 2009, pp. 318–43. Scopus, doi:10.1007/978-3-642-03013-0_15.
Zhong H, Xie T, Zhang L, Pei J, Mei H. MAPO: mining and recommending api usage patterns. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics). 2009. p. 318–343.

Published In

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

DOI

EISSN

1611-3349

ISSN

0302-9743

Publication Date

September 14, 2009

Volume

5653 LNCS

Start / End Page

318 / 343

Related Subject Headings

  • Artificial Intelligence & Image Processing
  • 46 Information and computing sciences