当前位置: X-MOL 学术J. Braz. Comput. Soc. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Redocumenting APIs with crowd knowledge: a coverage analysis based on question types
Journal of the Brazilian Computer Society Pub Date : 2016-12-01 , DOI: 10.1186/s13173-016-0049-0
Fernanda Madeiral Delfim , Klérisson V. R. Paixão , Damien Cassou , Marcelo de Almeida Maia

BackgroundSoftware libraries and frameworks play an important role in software system development. The appropriate usage of their functionalities/components through their APIs, however, is a challenge for developers. Usually, API documentation, when it exists, is insufficient to assist them in their programming tasks. There are few API documentation writers for the many potential readers, resulting in the lack of explanations and examples concerning different scenarios and perspectives. The interaction of developers on the Web, on the other hand, generates content concerning APIs from different perspectives, which can be used to document APIs, also known as crowd documentation.MethodsIn this paper, we present a study regarding the knowledge generated by the crowd on the Stack Overflow question-and-answer website. Our main goal is to understand how the crowd can contribute for API documentation on two programming tasks: how to implement a scenario using an API (how-to-do-it), and how to fix domain-independent bugs in an existing code where there was a misunderstanding regarding the usage of an API (debug-corrective). We classified questions available on Stack Overflow by the main concerns of askers, and we used those classified as how-to-do-it and debug-corrective to analyze the coverage of API elements on the discussions related to such questions. Our cases included the well-known and popular Swing and Android APIs.ResultsOur main findings showed that the crowd provides more content for debug-corrective tasks than for how-to-do-it tasks, regardless of the API. Android API elements are more discussed by the crowd compared to Swing. Moreover, we observed that some API elements are frequently mentioned together in discussions, and that there is a strong association between API coverage on Stack Overflow and its usage in real software systems.ConclusionsCrowd documentation may not be a complete substitute for official documentation because of its partial coverage, especially for how-to-do-it tasks. However, it can still significantly enhance the existent documentation, especially for the most commonly used API elements, providing code samples and explanations on a large variety of usage nuances. Finally, taking advantage of the high coverage for debug-corrective tasks, a new kind of debugging assistant may be conceived.

中文翻译:

使用人群知识重新记录 API:基于问题类型的覆盖率分析

背景软件库和框架在软件系统开发中扮演着重要的角色。然而,通过他们的 API 适当使用他们的功能/组件对开发人员来说是一个挑战。通常,API 文档(如果存在)不足以帮助他们完成编程任务。面向众多潜在读者的 API 文档编写者很少,导致缺乏针对不同场景和观点的解释和示例。另一方面,开发人员在 Web 上的交互会从不同的角度生成有关 API 的内容,这些内容可用于记录 API,也称为人群文档。方法在本文中,我们提出了一项关于人群生成知识的研究在 Stack Overflow 问答网站上。我们的主要目标是了解人群如何为两个编程任务的 API 文档做出贡献:如何使用 API 实现场景(如何做),以及如何修复现有代码中与领域无关的错误对 API 的使用存在误解(调试纠正)。我们根据提问者的主要关注点对 Stack Overflow 上可用的问题进行分类,并使用分类为 how-to-do-it 和 debug-corrective 的问题来分析 API 元素在与此类问题相关的讨论中的覆盖率。我们的案例包括著名且流行的 Swing 和 Android API。结果我们的主要发现表明,无论 API 是什么,人群为调试纠正任务提供的内容比如何做任务的内容要多。与 Swing 相比,Android API 元素被更多人讨论。而且,我们观察到一些 API 元素在讨论中经常被一起提到,并且在 Stack Overflow 上的 API 覆盖与其在实际软件系统中的使用之间存在很强的关联。结论Crowd 文档可能无法完全替代官方文档,因为它部分覆盖,特别是对于如何做的任务。但是,它仍然可以显着增强现有文档,尤其是对于最常用的 API 元素,提供代码示例和对各种使用细微差别的解释。最后,利用对调试纠错任务的高覆盖率,可以构想出一种新型的调试助手。并且在 Stack Overflow 上的 API 覆盖率与其在实际软件系统中的使用之间存在很强的关联。结论 Crowd 文档可能无法完全替代官方文档,因为它的部分覆盖率,特别是对于如何做的任务。但是,它仍然可以显着增强现有文档,尤其是对于最常用的 API 元素,提供代码示例和对各种使用细微差别的解释。最后,利用对调试纠错任务的高覆盖率,可以构想出一种新型的调试助手。并且在 Stack Overflow 上的 API 覆盖率与其在实际软件系统中的使用之间存在很强的关联。结论 Crowd 文档可能无法完全替代官方文档,因为它的部分覆盖率,特别是对于如何做的任务。但是,它仍然可以显着增强现有文档,尤其是对于最常用的 API 元素,提供代码示例和对各种使用细微差别的解释。最后,利用对调试纠错任务的高覆盖率,可以构想出一种新型的调试助手。特别是对于最常用的 API 元素,提供代码示例和对各种使用细微差别的解释。最后,利用对调试纠错任务的高覆盖率,可以构想出一种新型的调试助手。特别是对于最常用的 API 元素,提供代码示例和对各种使用细微差别的解释。最后,利用对调试纠正任务的高覆盖率,可以构想出一种新的调试助手。
更新日期:2016-12-01
down
wechat
bug