当前位置: X-MOL 学术Softw. Pract. Exp. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
APISonar: Mining API usage examples
Software: Practice and Experience ( IF 3.5 ) Pub Date : 2020-10-10 , DOI: 10.1002/spe.2906
Andre Hora 1
Affiliation  

Developers spend a significant part of their time searching for code examples on the web. Often, they look for Application Programming Interface (API) usage examples, that is, how to use APIs provided by libraries and frameworks. For this purpose, several programming websites are available. Some programming websites provide manually created examples: unfortunately, as millions of APIs are available nowadays, they do not cover the majority of the APIs. To alleviate this limitation, other programming websites focus on automatically mining API usage examples from code repositories. To the best of our knowledge, however, these solutions are still very limited: they often present poor, duplicated, and similar API usage examples. In this article, we propose an approach, APISonar, to automatically mine API usage examples from code repositories. Our approach aims to overcome the limitations of current solutions: we focus on presenting readable and reusable API usage examples. We analyze millions of source files provided by 4486 software projects hosted on GitHub. Based on this data, we extract 11 million API usage examples about 1.5 million distinct APIs. We evaluate APISonar by assessing its quality and usage. We show that APISonar is a competitive solution, providing the best API examples in terms of readability and reusability, as compared with popular programming websites. Moreover, despite being a novel website, APISonar attracted a significant amount of users in a short period (3.7K users from 119 countries during 5 months). APISonar is available at www.apisonar.com.

中文翻译:

APISonar:挖掘API使用示例

开发人员花费大量时间在网络上搜索代码示例。通常,他们会寻找应用程序编程接口 (API) 使用示例,即如何使用库和框架提供的 API。为此,有几个编程网站可用。一些编程网站提供了手动创建的示例:不幸的是,由于如今有数百万个 API 可用,它们并没有涵盖大多数 API。为了缓解这种限制,其他编程网站专注于从代码库中自动挖掘 API 使用示例。然而,据我们所知,这些解决方案仍然非常有限:它们经常呈现糟糕的、重复的和类似的 API 使用示例。在本文中,我们提出了一种方法 APISonar,可以从代码存储库中自动挖掘 API 使用示例。我们的方法旨在克服当前解决方案的局限性:我们专注于呈现可读且可重用的 API 使用示例。我们分析了托管在 GitHub 上的 4486 个软件项目提供的数百万个源文件。基于这些数据,我们提取了约 150 万个不同 API 的 1100 万个 API 使用示例。我们通过评估 APISonar 的质量和使用情况来评估它。我们表明 APISonar 是一个有竞争力的解决方案,与流行的编程网站相比,它在可读性和可重用性方面提供了最好的 API 示例。此外,尽管是一个新颖的网站,APISonar 在短时间内吸引了大量用户(5 个月内来自 119 个国家/地区的 370 名用户)。APISonar 可在 www.apisonar.com 上获得。我们专注于呈现可读和可重用的 API 使用示例。我们分析了托管在 GitHub 上的 4486 个软件项目提供的数百万个源文件。基于这些数据,我们提取了约 150 万个不同 API 的 1100 万个 API 使用示例。我们通过评估 APISonar 的质量和使用情况来评估它。我们表明 APISonar 是一个有竞争力的解决方案,与流行的编程网站相比,它在可读性和可重用性方面提供了最好的 API 示例。此外,尽管是一个新颖的网站,APISonar 在短时间内吸引了大量用户(5 个月内来自 119 个国家/地区的 370 名用户)。APISonar 可在 www.apisonar.com 上获得。我们专注于呈现可读和可重用的 API 使用示例。我们分析了托管在 GitHub 上的 4486 个软件项目提供的数百万个源文件。基于这些数据,我们提取了约 150 万个不同 API 的 1100 万个 API 使用示例。我们通过评估 APISonar 的质量和使用情况来评估它。我们表明 APISonar 是一个有竞争力的解决方案,与流行的编程网站相比,它在可读性和可重用性方面提供了最好的 API 示例。此外,尽管是一个新颖的网站,APISonar 在短时间内吸引了大量用户(5 个月内来自 119 个国家/地区的 370 名用户)。APISonar 可在 www.apisonar.com 上获得。500 万个不同的 API。我们通过评估 APISonar 的质量和使用情况来评估它。我们表明 APISonar 是一个有竞争力的解决方案,与流行的编程网站相比,它在可读性和可重用性方面提供了最好的 API 示例。此外,尽管是一个新颖的网站,APISonar 在短时间内吸引了大量用户(5 个月内来自 119 个国家/地区的 370 名用户)。APISonar 可在 www.apisonar.com 上获得。500 万个不同的 API。我们通过评估 APISonar 的质量和使用情况来评估它。我们表明 APISonar 是一个有竞争力的解决方案,与流行的编程网站相比,它在可读性和可重用性方面提供了最好的 API 示例。此外,尽管是一个新颖的网站,APISonar 在短时间内吸引了大量用户(5 个月内来自 119 个国家/地区的 370 名用户)。APISonar 可在 www.apisonar.com 上获得。
更新日期:2020-10-10
down
wechat
bug