API recommendation for event-driven Android application development

Weizhao Yuan, Hoang H. Nguyen, Lingxiao Jiang, Yuting Chen, Jianjun Zhao, Haibo Yu

Research output: Contribution to journalArticle

Abstract

Context: Software development is increasingly dependent on existing libraries. Developers need help to find suitable library APIs. Although many studies have been proposed to recommend relevant functional APIs that can be invoked for implementing a functionality, few studies have paid attention to an orthogonal need associated with event-driven programming frameworks, such as the Android framework. In addition to invoking functional APIs, Android developers need to know where to place functional code according to various events that may be triggered within the framework. Objective: This paper aims to develop an API recommendation engine for Android application development that can recommend both (1) functional APIs for implementing a functionality and (2) the event callback APIs that are to be overridden to contain the functional code. Method: We carry out an empirical study on actual Android programming questions from StackOverflow to confirm the need of recommending callbacks. Then we build Android-specific API databases to contain the correlations among various functionalities and APIs, based on customized parsing of code snippets and natural language processing of texts in Android tutorials and SDK documents, and then textual and code similarity metrics are adapted for recommending relevant APIs. Results: We have evaluated our prototype recommendation engine, named LibraryGuru, with about 1500 questions on Android programming from StackOverflow, and demonstrated that our top-5 results on recommending callbacks and functional APIs can on estimate achieve up to 43.5% and 50.9% respectively in precision, 24.6% and 32.5% respectively in mean average precision (MAP) scores, and 51.1% and 44.0% respectively in recall. Conclusion: We conclude that it is important and possible to recommend both functional APIs and callbacks for Android application development, and future work is needed to take more data sources into consideration to make more relevant recommendations for developers’ needs.

Original languageEnglish
Pages (from-to)30-47
Number of pages18
JournalInformation and Software Technology
Volume107
DOIs
Publication statusPublished - Mar 1 2019

Fingerprint

Application programming interfaces (API)
Recommender systems
Software engineering

All Science Journal Classification (ASJC) codes

  • Software
  • Information Systems
  • Computer Science Applications

Cite this

API recommendation for event-driven Android application development. / Yuan, Weizhao; Nguyen, Hoang H.; Jiang, Lingxiao; Chen, Yuting; Zhao, Jianjun; Yu, Haibo.

In: Information and Software Technology, Vol. 107, 01.03.2019, p. 30-47.

Research output: Contribution to journalArticle

Yuan, Weizhao ; Nguyen, Hoang H. ; Jiang, Lingxiao ; Chen, Yuting ; Zhao, Jianjun ; Yu, Haibo. / API recommendation for event-driven Android application development. In: Information and Software Technology. 2019 ; Vol. 107. pp. 30-47.
@article{a313f0b0f1094645b2e3ea1c6cf45cce,
title = "API recommendation for event-driven Android application development",
abstract = "Context: Software development is increasingly dependent on existing libraries. Developers need help to find suitable library APIs. Although many studies have been proposed to recommend relevant functional APIs that can be invoked for implementing a functionality, few studies have paid attention to an orthogonal need associated with event-driven programming frameworks, such as the Android framework. In addition to invoking functional APIs, Android developers need to know where to place functional code according to various events that may be triggered within the framework. Objective: This paper aims to develop an API recommendation engine for Android application development that can recommend both (1) functional APIs for implementing a functionality and (2) the event callback APIs that are to be overridden to contain the functional code. Method: We carry out an empirical study on actual Android programming questions from StackOverflow to confirm the need of recommending callbacks. Then we build Android-specific API databases to contain the correlations among various functionalities and APIs, based on customized parsing of code snippets and natural language processing of texts in Android tutorials and SDK documents, and then textual and code similarity metrics are adapted for recommending relevant APIs. Results: We have evaluated our prototype recommendation engine, named LibraryGuru, with about 1500 questions on Android programming from StackOverflow, and demonstrated that our top-5 results on recommending callbacks and functional APIs can on estimate achieve up to 43.5{\%} and 50.9{\%} respectively in precision, 24.6{\%} and 32.5{\%} respectively in mean average precision (MAP) scores, and 51.1{\%} and 44.0{\%} respectively in recall. Conclusion: We conclude that it is important and possible to recommend both functional APIs and callbacks for Android application development, and future work is needed to take more data sources into consideration to make more relevant recommendations for developers’ needs.",
author = "Weizhao Yuan and Nguyen, {Hoang H.} and Lingxiao Jiang and Yuting Chen and Jianjun Zhao and Haibo Yu",
year = "2019",
month = "3",
day = "1",
doi = "10.1016/j.infsof.2018.10.010",
language = "English",
volume = "107",
pages = "30--47",
journal = "Information and Software Technology",
issn = "0950-5849",
publisher = "Elsevier",

}

TY - JOUR

T1 - API recommendation for event-driven Android application development

AU - Yuan, Weizhao

AU - Nguyen, Hoang H.

AU - Jiang, Lingxiao

AU - Chen, Yuting

AU - Zhao, Jianjun

AU - Yu, Haibo

PY - 2019/3/1

Y1 - 2019/3/1

N2 - Context: Software development is increasingly dependent on existing libraries. Developers need help to find suitable library APIs. Although many studies have been proposed to recommend relevant functional APIs that can be invoked for implementing a functionality, few studies have paid attention to an orthogonal need associated with event-driven programming frameworks, such as the Android framework. In addition to invoking functional APIs, Android developers need to know where to place functional code according to various events that may be triggered within the framework. Objective: This paper aims to develop an API recommendation engine for Android application development that can recommend both (1) functional APIs for implementing a functionality and (2) the event callback APIs that are to be overridden to contain the functional code. Method: We carry out an empirical study on actual Android programming questions from StackOverflow to confirm the need of recommending callbacks. Then we build Android-specific API databases to contain the correlations among various functionalities and APIs, based on customized parsing of code snippets and natural language processing of texts in Android tutorials and SDK documents, and then textual and code similarity metrics are adapted for recommending relevant APIs. Results: We have evaluated our prototype recommendation engine, named LibraryGuru, with about 1500 questions on Android programming from StackOverflow, and demonstrated that our top-5 results on recommending callbacks and functional APIs can on estimate achieve up to 43.5% and 50.9% respectively in precision, 24.6% and 32.5% respectively in mean average precision (MAP) scores, and 51.1% and 44.0% respectively in recall. Conclusion: We conclude that it is important and possible to recommend both functional APIs and callbacks for Android application development, and future work is needed to take more data sources into consideration to make more relevant recommendations for developers’ needs.

AB - Context: Software development is increasingly dependent on existing libraries. Developers need help to find suitable library APIs. Although many studies have been proposed to recommend relevant functional APIs that can be invoked for implementing a functionality, few studies have paid attention to an orthogonal need associated with event-driven programming frameworks, such as the Android framework. In addition to invoking functional APIs, Android developers need to know where to place functional code according to various events that may be triggered within the framework. Objective: This paper aims to develop an API recommendation engine for Android application development that can recommend both (1) functional APIs for implementing a functionality and (2) the event callback APIs that are to be overridden to contain the functional code. Method: We carry out an empirical study on actual Android programming questions from StackOverflow to confirm the need of recommending callbacks. Then we build Android-specific API databases to contain the correlations among various functionalities and APIs, based on customized parsing of code snippets and natural language processing of texts in Android tutorials and SDK documents, and then textual and code similarity metrics are adapted for recommending relevant APIs. Results: We have evaluated our prototype recommendation engine, named LibraryGuru, with about 1500 questions on Android programming from StackOverflow, and demonstrated that our top-5 results on recommending callbacks and functional APIs can on estimate achieve up to 43.5% and 50.9% respectively in precision, 24.6% and 32.5% respectively in mean average precision (MAP) scores, and 51.1% and 44.0% respectively in recall. Conclusion: We conclude that it is important and possible to recommend both functional APIs and callbacks for Android application development, and future work is needed to take more data sources into consideration to make more relevant recommendations for developers’ needs.

UR - http://www.scopus.com/inward/record.url?scp=85055413129&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85055413129&partnerID=8YFLogxK

U2 - 10.1016/j.infsof.2018.10.010

DO - 10.1016/j.infsof.2018.10.010

M3 - Article

VL - 107

SP - 30

EP - 47

JO - Information and Software Technology

JF - Information and Software Technology

SN - 0950-5849

ER -