一句话:提出 Scout,从搜索结果中抽取 API 签名,在 IDE 内按 API 分组排序并展示示例,减少查询与网页浏览。
开发者常通过 Web(如 Stack Overflow)查找 API 示例,但只能搜索和浏览帖子,难以直接获取其中的 API 知识。本文提出 Scout:自动分析搜索结果并抽取 API 签名,用签名对示例分组和排序,提供以 API 为中心的简洁表示,并集成到 IDE 面板中,使开发者无需离开开发上下文即可搜索和查看 API 示例。Scout 还利用该集成自动用上下文信息扩充查询,并按开发者需求排序结果。对 40 名开发者的实验表明,Scout 将所需查询数减少 19%,约一半任务可直接通过 API 表示完成,完整查看 SO 帖子的数量减少约 64%。
Developers frequently use the web to locate API examples that help them solve their programming tasks. While sites like Stack Overflow (SO) contain API examples embedded within their textual descriptions, developers cannot access this API knowledge directly. Instead they need to search for and browse results to select relevant SO posts and then read through individual posts to figure out which answers contain information about the APIs that are relevant to their task. This paper introduces an approach, called Scout, that automatically analyzes search results to extract API signature information. These signatures are used to group and rank examples and allow for a unique API-based presentation that reduces the amount of information the developer needs to consider when looking for API information on the web. This succinct representation enables Scout to be integrated fully within an IDE panel so that developers can search and view API examples without losing context on their development task. Scout also uses this integration to automatically augment queries with contextual information that tailors the developer's queries, and ranks the results according to the developer's needs. In an experiment with 40 developers, we found that Scout reduces the number of queries developers need to perform by 19% and allows them to solve almost half their tasks directly from the API-based representation, reducing the number of complete SO posts viewed by approximately 64%.