FACER-AS: An API Usage-based Code Recommendation Tool for Android Studio

Abstract

Android developers often need to search for example code to complete their development tasks. While existing code search systems for Android can deliver code against a search query, they do not recommend code for features that a developer might later need to implement. In this paper, we present FACER-AS (FACER for Android Studio); an Android Studio plugin, which uses FACER (Feature-driven API usage-based Code Examples Recommender) as its back-end code search and recommendation engine. FACER provides relevant code against natural language queries (Stage 1) and also recommends code of multiple related features (Stage 2) to facilitate opportunistic code reuse. To evaluate FACER-AS, we perform a user study involving one professional Android developer who uses our tool for the development of their ongoing live Android projects. We analyze the developer’s usage of our tool over a span of seven days and find that FACER-AS achieves a 79% success rate for retrieving code against user queries (Stage 1) and a 41% success rate for recommending code for related features (Stage 2). We also observe a 43% reuse rate of Stage 1 recommendations and a 45% reuse rate of Stage 2 recommendations. Our tool’s performance analysis and the developer’s positive feedback show that FACER-AS can help Android developers with their coding activities. A video demonstration of our tool is available at https://youtu.be/3yN-39wP_FU and the source code of our tool is available at https://doi.org/10.5281/zenodo.5176816.

Publication
2021 IEEE International Conference on Software Maintenance and Evolution (ICSME)