首页> 外文OA文献 >Mining preconditions of APIs in large-scale code corpus
【2h】

Mining preconditions of APIs in large-scale code corpus

机译:大型代码语料库中API的挖掘前提条件

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

Modern software relies on existing application programming interfaces (APIs) from libraries. Formal specifications for the APIs enable many software engineering tasks as well as help developers correctly use them. In this work, we mine large-scale repositories of existing open-source software to derive potential preconditions for API methods. Our key idea is that APIs’ preconditions would appear frequently in an ultra-large code corpus with a large number of API usages, while project-specific conditions will occur less frequently. First, we find all client methods invoking APIs. We then compute a control dependence relation from each call site and mine the potential conditions used to reach those call sites. We use these guard conditions as a starting point to automatically infer the preconditions for each API. We analyzed almost 120 million lines of code from SourceForge and Apache projects to infer preconditions for the standard Java Development Kit (JDK) library. The results show that our technique can achieve high accuracy with recall from 75–80% and precision from 82–84%. We also found 5 preconditions missing from human written specifications. They were all confirmed by a specification expert. In a user study, participants found 82% of the mined preconditions as a good starting point for writing specifications. Using our mining result, we also built a benchmark of more than 4,000 precondition-related bugs.
机译:现代软件依赖于图书馆的现有应用程序编程接口(API)。 API的正式规范使许多软件工程任务以及帮助开发人员正确使用它们。在这项工作中,我们挖掘了现有的开源软件的大规模存储库,以导出API方法的潜在前提条件。我们的主要思想是API的前提条件频繁出现在具有大量API使用量的超大型代码语料库中,而项目特定条件将频繁发生。首先,我们找到调用API的所有客户端方法。然后,我们从每个呼叫站点计算控制依赖关系,并在潜在的情况下挖掘用于到达这些呼叫站点的潜在条件。我们将这些保护条件用作自动推断每个API的前提条件的起点。我们分析了来自SourceForge和Apache项目的近120万条代码,以推断标准Java开发套件(JDK)库的前提。结果表明,我们的技术可以从75-80%的召回和82-84%的精度达到高精度。我们还发现了5个人书面规范中缺少的5个前提条件。他们都被规格专家确认。在用户学习中,参与者发现82%的开采前提是写作规范的良好起点。使用我们的挖掘结果,我们还建立了超过4,000个与先决条件相关的错误的基准。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号