...
首页> 外文期刊>ACM transactions on software engineering and methodology >Automatic API Usage Scenario Documentation from Technical Q&A Sites
【24h】

Automatic API Usage Scenario Documentation from Technical Q&A Sites

机译:来自技术Q&A站点的自动API使用情况文档文档

获取原文
获取原文并翻译 | 示例
           

摘要

The online technical Q&A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research works have thus focused on augmenting official API documentation with insights (e.g., code examples) from SO. The techniques propose to add code examples/insights about APIs into its official documentation. Recently, surveys of software developers find that developers in SO consider the combination of code examples and reviews about APIs as a form of API documentation, and that they consider such a combination to be more useful than official API documentation when the official resources can be incomplete, ambiguous, incorrect, and outdated. Reviews are opinionated sentences with positive/negative sentiments. However, we are aware of no previous research that attempts to automatically produce API documentation from SO by considering both API code examples and reviews. In this article, we present two novel algorithms that can be used to automatically produce API documentation from SO by combining code examples and reviews towards those examples. The first algorithm is called statistical documentation, which shows the distribution of positivity and negativity around the code examples of an API using different metrics (e.g., star ratings). The second algorithm is called concept-based documentation, which clusters similar and conceptually relevant usage scenarios. An API usage scenario contains a code example, a textual description of the underlying task addressed by the code example, and the reviews (i.e., opinions with positive and negative sentiments) from other developers towards the code example. We deployed the algorithms in Opiner, a web-based platform to aggregate information about APIs from online forums. We evaluated the algorithms by mining all Java JSON-based posts in SO and by conducting three user studies based on produced documentation from the posts. The first study is a survey, where we asked the participants to compare our proposed algorithms against a Javadoc-syle documentation format (called as Type-based documentation in Opiner). The participants were asked to compare along four development scenarios (e.g., selection, documentation). The participants preferred our proposed two algorithms over type-based documentation. In our second user study, we asked the participants to complete four coding tasks using Opiner and the API official and informal documentation resources. The participants were more effective and accurate while using Opiner. In a subsequent survey, more than 80% of participants asked the Opiner documentation platform to be integrated into the formal API documentation to complement and improve the API official documentation.
机译:在线技术问答网站堆栈溢出(SO)是开发商的青睐,以支持它们的编码和多样化的发展需求。要在API官方文档资源地址不足,一些研究工作就此重点从增强用SO官方见解API文档(例如,代码示例)。该技术建议增加有关API的代码示例/见解的正式文件。近日,软件开发者的调查发现,开发商在SO考虑有关的API的API文档的形式,代码示例和评论相结合,他们认为这样的组合会比官方的API文档更加有用,当官方的资源可以是不完整,暧昧的,不正确的,过时的。回顾自以为是的句子,正/负情绪。然而,我们都知道没有以前的研究试图自动同时考虑API代码示例和评论产生从SO API文档。在本文中,我们提出了可用于两个新颖算法从SO自动产生API文档通过朝向这些实施例组合的代码示例和评论。第一算法被称为统计书,其示出了阳性和阴性的周围使用不同的指标(例如,星评级)的API的代码示例的分布。所述第二算法称为基于概念的文档,哪些簇相似,并且在概念相关的使用场景。一个API的使用场景中包含的代码示例,底层任务的文本描述解决由代码示例,并且评论从其他开发者向代码示例(即,具有正的和负的情绪的意见)。我们在Opiner,一个基于网络的平台,来自网上论坛的API信息汇总部署的算法。我们通过挖掘在SO所有基于JSON-Java的职位,通过开展基于来自岗位编制文件三个用户研究评估的算法。第一项研究是调查中,我们要求参与者对我们提出的算法针对的Javadoc文档SYLE格式(称为在Opiner基于类型的文档)进行比较。参与者被要求沿四个发展情景(例如,选择,文档)进行比较。与会者优于基于类型的文档,我们提出了两种算法。在我们的第二个用户调查,我们要求学员完成使用Opiner和AP​​I正式和非正式的文档资源四种编码任务。参加者更有效,更准确,同时使用Opiner。在随后的调查中,参加者超过80%,问Opiner文档平台整合到正规的API文档,以补充和完善的API官方文档。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号