首页> 外文期刊>Automated software engineering >Inferring specifications for resources from natural language API documentation
【24h】

Inferring specifications for resources from natural language API documentation

机译:从自然语言API文档中推断资源规范

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

摘要

Many software libraries, especially those commercial ones, provide API documentation in natural languages to describe correct API usages. However, developers may still write code that is inconsistent with API documentation, partially because many developers are reluctant to carefully read API documentation as shown by existing research. As these inconsistencies may indicate defects, researchers have proposed various detection approaches, and these approaches need many known spec- ifications. As it is tedious to write specifications manually for all APIs, various approaches have been proposed to mine specifications automatically. In the literature, most existing mining approaches rely on analyzing client code, so these mining approaches would fail to mine specifications when client code is not sufficient. Instead of analyzing client code, we propose an approach, called Doc2Spec, that infers resource specifications from API documentation in natural languages. We evaluated our approach on the Javadocs of five libraries. The results show that our approach performs well on real scale libraries, and infers various specifications with relatively high precisions, recalls, and F-scores. We further used inferred specifications to detect defects in open source projects. The results show that specifications inferred by Doc2Spec are useful to detect real defects in existing projects.
机译:许多软件库,尤其是那些商业软件库,都以自然语言提供API文档,以描述正确的API用法。但是,开发人员可能仍会编写与API文档不一致的代码,部分原因是许多开发人员不愿像现有研究所示那样仔细阅读API文档。由于这些不一致可能表明存在缺陷,因此研究人员提出了多种检测方法,这些方法需要许多已知的规范。由于为所有API手动编写规范非常繁琐,因此提出了各种方法来自动挖掘规范。在文献中,大多数现有的挖掘方法都依赖于分析客户端代码,因此当客户端代码不足时,这些挖掘方法将无法挖掘规范。我们没有分析客户端代码,而是提出了一种称为Doc2Spec的方法,该方法从API文档以自然语言推断资源规范。我们在五个库的Javadocs上评估了我们的方法。结果表明,我们的方法在真实规模的库中表现良好,并且可以以较高的精度,召回率和F分数推断出各种规格。我们进一步使用推断的规范来检测开源项目中的缺陷。结果表明,由Doc2Spec推断出的规范对于检测现有项目中的实际缺陷很有用。

著录项

  • 来源
    《Automated software engineering》 |2011年第4期|p.227-261|共35页
  • 作者单位

    Laboratory for Internet Software Technologies, Institute of Software, Chinese Academy of Sciences, Beijing, China;

    School of Electronics Engineering and Computer Science, Peking University, Beijing, China,The Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education, Beijing, China;

    Department of Computer Science, North Carolina State University, Raleigh, USA;

    School of Electronics Engineering and Computer Science, Peking University, Beijing, China,The Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education, Beijing, China;

  • 收录信息
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

    inferring specifications; API documentation;

    机译:推断规格;API文档;

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号