一句话:BIKER 通过结合 Stack Overflow 与 API 文档双信息源,为自然语言查询推荐并解释合适的 Java API。
软件库中的 API 对现代软件开发至关重要,但 API 文档主要描述功能与结构,缺乏概念、目的等信息,导致开发者难以用自然语言任务描述直接检索到合适的 API,作者称之为“知识鸿沟”。为此,论文提出 Java API 推荐工具 BIKER(Bi-Information source based KnowledgE Recommendation),并实现为搜索引擎网站。给定自然语言查询,BIKER 并不直接检索文档,而是先在 Stack Overflow 上查找相似的 API 相关问题以抽取候选 API,再综合查询与 Stack Overflow 帖子及 API 文档两方面的相似度对候选进行排序;同时为每个推荐 API 汇总并展示补充信息(如 API 描述、帖子中的代码示例),帮助开发者理解推荐理由与实际用法。定量评估与用户研究表明,BIKER 能帮助开发者更高效、更精确地找到合适 API。
Application Programming Interfaces (APIs) in software libraries play an important role in modern software development. Although most libraries provide API documentation as a reference, developers may find it difficult to directly search for appropriate APIs in documentation using the natural language description of the programming tasks. We call such phenomenon as knowledge gap, which refers to the fact that API documentation mainly describes API functionality and structure but lacks other types of information like concepts and purposes. In this paper, we propose a Java API recommendation tool named BIKER (Bi-Information source based KnowledgE Recommendation) to bridge the knowledge gap. We implement BIKER as a search engine website. Given a query in natural language, instead of directly searching API documentation, BIKER first searches for similar API-related questions on Stack Overflow to extract candidate APIs. Then, BIKER ranks them by considering the query’s similarity with both Stack Overflow posts and API documentation. Finally, to help developers better understand why each API is recommended and how to use them in practice, BIKER summarizes and presents supplementary information (e.g., API description, code examples in Stack Overflow posts) for each recommended API. Our quantitative evaluation and user study demonstrate that BIKER can help developers find appropriate APIs more efficiently and precisely.
@inproceedings{paperbot5127,
title = {BIKER: a tool for Bi-information source based API method recommendation},
author = {Liang Cai and Haoye Wang and Qiao Huang and Xin Xia and Zhenchang Xing and David Lo},
booktitle = {FSE},
year = {2019},
doi = {10.1145/3338906.3341174}
}