IEEE Access (Jan 2018)

Recommending APIs for API Related Questions in Stack Overflow

  • Jingxuan Zhang,
  • He Jiang,
  • Zhilei Ren,
  • Xin Chen

DOI
https://doi.org/10.1109/ACCESS.2017.2777845
Journal volume & issue
Vol. 6
pp. 6205 – 6219

Abstract

Read online

Application programming interface (API)-related questions are increasingly posted and discussed by developers in popular question and answer forums, such as Stack Overflow. However, their extremely long resolution time seriously delays the working schedules of developers. Despite researchers have investigated how to automatically resolve API-related questions by recommending correct APIs for them, there is still much room for additional improvement. In this paper, we propose a novel approach of recommending APIs for API-related questions based on API specifications and historical resolved questions (RASH). Given a new API-related question, RASH recommends APIs for it guided by two central observations. First, the more lexically similar the functional description in an API's specification is to the new question, the more likely that the API can resolve the new question. Second, the APIs that have resolved more historical similar questions can also help to resolve the new question. To verify the effectiveness of RASH, we construct and publish a corpus containing 1234 API-related questions with their correct APIs from Stack Overflow, and conduct extensive experiments over it. The experimental results show that RASH is relatively stable and robust to a different quality of questions. In addition, RASH hits nearly 70% correct APIs and outperforms the state-of-the-art approach by 15.64% when recommending 15 APIs for each question.

Keywords