Recommending API Function Calls and Code Snippets to Support Software Development

Phuong T. Nguyen, Juri Di Rocco, Claudio Di Sipio, Davide Di Ruscio, Massimiliano Di Penta
2/15/2021
cs.SE

Official code: crossminer/FOCUS (21 stars, Java, EPL-2.0, last commit 2023-06-14).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

crossminer/FOCUSOfficial100%
EPL-2.0

FOCUS is a context-aware collaborative-filtering system that exploits cross relationships among OSS projects to suggest the inclusion of additional API invocations and concrete API usage patterns.

219Java, RascalDec 14, 20183 years agoEPL-2.0

Similar Papers

Cite this paper

@article{nguyen2021recommending,
  title  = {Recommending API Function Calls and Code Snippets to Support Software Development},
  author = {Phuong T. Nguyen and Juri Di Rocco and Claudio Di Sipio and Davide Di Ruscio and Massimiliano Di Penta},
  year   = {2021},
  eprint = {2102.07508},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.07508}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.07508.svg)](https://codeofpaper.com/paper/2102.07508)

Discussion