APISonar: Mining API usage examples

被引:4
|
作者
Hora, Andre [1 ]
机构
[1] Univ Fed Minas Gerais, Dept Comp Sci, Belo Horizonte, MG, Brazil
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2021年 / 51卷 / 02期
关键词
API usage examples; framework; library; mining software repositories; software maintenance; CODE SEARCH ENGINE;
D O I
10.1002/spe.2906
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Developers spend a significant part of their time searching for code examples on the web. Often, they look for Application Programming Interface (API) usage examples, that is, how to use APIs provided by libraries and frameworks. For this purpose, several programming websites are available. Some programming websites provide manually created examples: unfortunately, as millions of APIs are available nowadays, they do not cover the majority of the APIs. To alleviate this limitation, other programming websites focus on automatically mining API usage examples from code repositories. To the best of our knowledge, however, these solutions are still very limited: they often present poor, duplicated, and similar API usage examples. In this article, we propose an approach, APISonar, to automatically mine API usage examples from code repositories. Our approach aims to overcome the limitations of current solutions: we focus on presenting readable and reusable API usage examples. We analyze millions of source files provided by 4486 software projects hosted on GitHub. Based on this data, we extract 11 million API usage examples about 1.5 million distinct APIs. We evaluate APISonar by assessing its quality and usage. We show that APISonar is a competitive solution, providing the best API examples in terms of readability and reusability, as compared with popular programming websites. Moreover, despite being a novel website, APISonar attracted a significant amount of users in a short period (3.7K users from 119 countries during 5 months). APISonar is available at www.apisonar.com.
引用
收藏
页码:319 / 352
页数:34
相关论文
共 50 条
  • [41] ACUA: API Change and Usage Auditor
    Wu, Wei
    Adams, Bram
    Gueheneuc, Yann-Gael
    Antoniol, Giuliano
    2014 14TH IEEE INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2014), 2014, : 89 - 94
  • [42] Temporal Analysis of API Usage Concepts
    Uddin, Gias
    Dagenais, Barthelemy
    Robillard, Martin P.
    2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 804 - 814
  • [43] Improving Web API Usage Logging
    Koci, Rediana
    Franch, Xavier
    Jovanovic, Petar
    Abello, Alberto
    RESEARCH CHALLENGES IN INFORMATION SCIENCE (RCIS 2021), 2021, 415 : 623 - 629
  • [44] Constructing usage scenarios for API redocumentation
    Jiang, Juanjuan
    Koskinen, Johannes
    Ruokonen, Anna
    Systae, Tarja
    ICPC 2007: 15TH IEEE INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, PROCEEDINGS, 2007, : 259 - +
  • [45] Eclipse API usage: the good and the bad
    John Businge
    Alexander Serebrenik
    Mark G. J. van den Brand
    Software Quality Journal, 2015, 23 : 107 - 141
  • [46] Eclipse API usage: the good and the bad
    Businge, John
    Serebrenik, Alexander
    van den Brand, Mark G. J.
    SOFTWARE QUALITY JOURNAL, 2015, 23 (01) : 107 - 141
  • [47] Mining balanced API protocols
    Chen, Deng
    Zhang, Yanduo
    Wei, Wei
    Wang, Rongcun
    Zhou, Huabing
    Li, Xun
    Qu, Binbin
    INTERNATIONAL JOURNAL OF COMPUTATIONAL SCIENCE AND ENGINEERING, 2018, 16 (03) : 289 - 302
  • [48] 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
  • [49] Understanding the API usage in Java']Java
    Qiu, Dong
    Li, Bixin
    Leung, Hareton
    INFORMATION AND SOFTWARE TECHNOLOGY, 2016, 73 : 81 - 100
  • [50] fine-GRAPE: fine-grained APi usage extractor - an approach and dataset to investigate API usage
    Sawant, Anand Ashok
    Bacchelli, Alberto
    EMPIRICAL SOFTWARE ENGINEERING, 2017, 22 (03) : 1348 - 1371