MAPO: Mining and Recommending API Usage Patterns

被引:0
|
作者
Zhong, Hao [2 ,3 ]
Xie, Tao [1 ]
Zhang, Lu [2 ,3 ]
Pei, Jian [4 ]
Mei, Hong [2 ,3 ]
机构
[1] N Carolina State Univ, Dept Comp Sci, Raleigh, NC 27695 USA
[2] Key Lab High Confidence Software Technol, Minist Educ, Hong Kong, Peoples R China
[3] Peking Univ, Sch Elect Engn & Comp Sci, Beijing, Peoples R China
[4] Simon Fraser Univ, Sch Comp Sci, Burnaby, BC V5A 1S6, Canada
来源
ECOOP 2009 - OBJECT-ORIENTED PROGRAMMING | 2009年 / 5653卷
基金
加拿大自然科学与工程研究理事会; 美国国家科学基金会;
关键词
STRUCTURAL CONTEXT;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:318 / +
页数:4
相关论文
共 50 条
  • [11] Mining Succinct and High-Coverage API Usage Patterns from Source Code
    Wang, Jue
    Dang, Yingnong
    Zhang, Hongyu
    Chen, Kai
    Xie, Tao
    Zhang, Dongmei
    2013 10TH IEEE WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR), 2013, : 319 - 328
  • [12] Comprehensive Integration of API Usage Patterns
    Shen, Qi
    Wu, Shijun
    Zou, Yanzhen
    Xie, Bing
    2021 IEEE/ACM 29TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2021), 2021, : 83 - 93
  • [13] Ransomware detection by mining API call usage
    Sheen, Shina
    Yadav, Ashwitha
    2018 INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTING, COMMUNICATIONS AND INFORMATICS (ICACCI), 2018, : 983 - 987
  • [14] On the Impact of Order Information in API Usage Patterns
    Cergani, Ervina
    Mezini, Mira
    SOFTWARE TECHNOLOGIES, ICSOFT 2018, 2019, 1077 : 79 - 103
  • [15] Visualization Based API Usage Patterns Refining
    Saied, Mohamed Aymen
    Benomar, Omar
    Sahraoui, Houari
    2015 IEEE 3RD WORKING CONFERENCE ON SOFTWARE VISUALIZATION (VISSOFT), 2015, : 155 - 159
  • [16] Usage patterns of the Java']Java standard API
    Ma, Homan
    Amor, Robert
    Tempero, Ewan
    ASPEC 2006: 13TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2006, : 342 - +
  • [17] Mining API Usage Examples from Test Code
    Zhu, Zixiao
    Zou, Yanzhen
    Xie, Bing
    Jin, Yong
    Lin, Zeqi
    Zhang, Lu
    2014 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2014, : 301 - 310
  • [18] Mining API usage scenarios from stack overflow
    Uddin, Gias
    Khomh, Foutse
    Roy, Chanchal K.
    INFORMATION AND SOFTWARE TECHNOLOGY, 2020, 122
  • [19] Recommending Related Functions from API Usage-Based Function Clone Structures
    Abid, Shamsa
    ESEC/FSE'2019: PROCEEDINGS OF THE 2019 27TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2019, : 1193 - 1195
  • [20] Recommending reference API documentation
    Martin P. Robillard
    Yam B. Chhetri
    Empirical Software Engineering, 2015, 20 : 1558 - 1586