Recommending API Function Calls and Code Snippets to Support Software Development

被引:20
|
作者
Nguyen, Phuong T. [1 ]
Di Rocco, Juri [1 ]
Di Sipio, Claudio [1 ]
Di Ruscio, Davide [1 ]
Di Penta, Massimiliano [2 ]
机构
[1] Univ Aquila, I-67100 Laquila, Italy
[2] Univ Sannio, I-82100 Benevento, Italy
基金
欧盟地平线“2020”;
关键词
Recommender systems; Libraries; Tools; Data mining; Task analysis; Software engineering; Documentation; API calls; source code recommendations; android programming;
D O I
10.1109/TSE.2021.3059907
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Software development activity has reached a high degree of complexity, guided by the heterogeneity of the components, data sources, and tasks. The proliferation of open-source software (OSS) repositories has stressed the need to reuse available software artifacts efficiently. To this aim, it is necessary to explore approaches to mine data from software repositories and leverage it to produce helpful recommendations. We designed and implemented FOCUS as a novel approach to provide developers with API calls and source code while they are programming. The system works on the basis of a context-aware collaborative filtering technique to extract API usages from OSS projects. In this work, we show the suitability of FOCUS for Android programming by evaluating it on a dataset of 2,600 mobile apps. The empirical evaluation results show that our approach outperforms two state-of-the-art API recommenders, UP-Miner and PAM, in terms of prediction accuracy. We also point out that there is no significant relationship between the categories for apps defined in Google Play and their API usages. Finally, we show that participants of a user study positively perceive the API and source code recommended by FOCUS as relevant to the current development context.
引用
收藏
页码:2417 / 2438
页数:22
相关论文
共 50 条
  • [1] MACs: Mining API code snippets for code reuse
    Hsu, Sheng-Kuei
    Lin, Shi-Jen
    EXPERT SYSTEMS WITH APPLICATIONS, 2011, 38 (06) : 7291 - 7301
  • [2] SLAMPA: Recommending Code Snippets with Statistical Language Model
    Zhou, Shufan
    Zhong, Hao
    Shen, Beijun
    2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018), 2018, : 79 - 88
  • [3] ROSF: Leveraging Information Retrieval and Supervised Learning for Recommending Code Snippets
    Jiang, He
    Nie, Liming
    Sun, Zeyi
    Ren, Zhilei
    Kong, Weiqiang
    Zhang, Tao
    Luo, Xiapu
    IEEE TRANSACTIONS ON SERVICES COMPUTING, 2019, 12 (01) : 34 - 46
  • [4] Recommending Proper API Code Examples for Documentation Purpose
    Mar, Lee Wei
    Wu, Ye-Chi
    Jiau, Hewijin Christine
    2011 18TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2011), 2011, : 331 - 338
  • [5] A text classification approach to API type resolution for incomplete code snippets
    Velazquez-Rodriguez, Camilo
    Di Nucci, Dario
    De Roover, Coen
    SCIENCE OF COMPUTER PROGRAMMING, 2023, 227
  • [6] A Text Classification Approach to Api Type Resolution for Incomplete Code Snippets
    Velázquez-Rodríguez, Camilo
    Nucci, Dario Di
    De Roover, Coen
    SSRN, 2022,
  • [7] Statistical Learning of API Fully Qualified Names in Code Snippets of Online Forums
    Hung Phan
    Hoan Anh Nguyen
    Tran, Ngoc M.
    Truong, Linh H.
    Anh Tuan Nguyen
    Nguyen, Tien N.
    PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2018, : 632 - 642
  • [8] Recommending Source Code for Use in Rapid Software Prototypes
    McMillan, Collin
    Hariri, Negar
    Poshyvanyk, Denys
    Cleland-Huang, Jane
    Mobasher, Bamshad
    2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 848 - 858
  • [9] Learning from Examples to Find Fully Qualified Names of API Elements in Code Snippets
    Saifullah, C. M. Khaled
    Asaduzzaman, Muhammad
    Roy, Chanchal K.
    34TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2019), 2019, : 243 - 254
  • [10] COSTER: A Tool for Finding Fully Qualified Names of API Elements in Online Code Snippets
    Saifullah, C. M. Khaled
    Asaduzzaman, Muhammad
    Roy, Chanchal K.
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2021), 2021, : 73 - 76