Publication Type

Conference Proceeding Article

Version

publishedVersion

Publication Date

9-2018

Abstract

Developers often need to search for appropriate APIs for theirprogramming tasks. Although most libraries have API referencedocumentation, it is not easy to find appropriate APIs due to thelexical gap and knowledge gap between the natural language description of the programming task and the API description in APIdocumentation. Here, the lexical gap refers to the fact that the samesemantic meaning can be expressed by different words, and theknowledge gap refers to the fact that API documentation mainlydescribes API functionality and structure but lacks other types ofinformation like concepts and purposes, which are usually the keyinformation in the task description. In this paper, we propose an APIrecommendation approach named BIKER (Bi-Information sourcebased KnowledgE Recommendation) to tackle these two gaps. Tobridge the lexical gap, BIKER uses word embedding technique tocalculate the similarity score between two text descriptions. Inspired by our survey findings that developers incorporate StackOverflow posts and API documentation for bridging the knowledgegap, BIKER leverages Stack Overflow posts to extract candidateAPIs for a program task, and ranks candidate APIs by consideringthe query’s similarity with both Stack Overflow posts and API documentation. It also summarizes supplementary information (e.g.,API description, code examples in Stack Overflow posts) for eachAPI to help developers select the APIs that are most relevant totheir tasks. Our evaluation with 413 API-related questions confirmsthe effectiveness of BIKER for both class- and method-level API recommendation, compared with state-of-the-art baselines. Our userstudy with 28 Java developers further demonstrates the practicalityof BIKER for API search.

Keywords

API Recommendation, API Documentation, Stack Overflow, Word Embedding

Discipline

Software Engineering

Research Areas

Data Science and Engineering

Publication

Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering (ASE 2018), Montpellier, France, 2018 September 3-7

First Page

293

Last Page

304

ISBN

9781450359375

Identifier

10.1145/3238147.3238191

Publisher

ACM, New York, USA

City or Country

Montpellier, France

Additional URL

https://doi.org/10.1145/3238147.3238191

Share

COinS