Rap4DQ: Learning to recommend relevant API documentation for developer questions
Document Type
Article
Publication Date
1-1-2022
Abstract
Developers often face difficulties in using different API methods during the software development process. Answering API related questions on API Q&A forums often costs API development teams a lot of time. To help save time for API development teams, we propose a deep learning-based approach, namely Rap4DQ, to identify relevant web API documentation for developer’s API related questions on API Q&A forums. Rap4DQ learns representation vectors for questions and API documentation separately using Gated Recurrent Unit (GRU) and adds different weights to reflect the various importance of varied API documents during training. Rap4DQ is designed to train on positive and negative samples with a loss function that minimizes the distances between questions and their relevant documentation, but maximizes the distances between questions and their irrelevant documentation. In the end, we construct a learning-to-rank layer to rank the API documentation based on learned representation vectors from GRUs. We have conducted several experiments to evaluate Rap4DQ on three popular and large API Q&A forums, Twitter, eBay, and AdWords. The results show that Rap4DQ can outperform all baselines by having a relative improvement up to 84.3% in terms of AUC. Rap4DQ can obtain a high AUC of 0.84, 0.88, and 0.94 on identifying relevant API documentation on Twitter, eBay, and AdWords, respectively.
Identifier
85120156541 (Scopus)
Publication Title
Empirical Software Engineering
External Full Text Location
https://doi.org/10.1007/s10664-021-10067-5
e-ISSN
15737616
ISSN
13823256
Issue
1
Volume
27
Recommended Citation
Li, Yi; Wang, Shaohua; Wang, Wenbo; Nguyen, Tien N.; Wang, Yan; and Ye, Xinyue, "Rap4DQ: Learning to recommend relevant API documentation for developer questions" (2022). Faculty Publications. 3451.
https://digitalcommons.njit.edu/fac_pubs/3451