首页> 外文会议>Asia-Pacific Software Engineering Conference >Mining API Type Specifications for JavaScript
【24h】

Mining API Type Specifications for JavaScript

机译:挖掘JavaScript的API类型规范

获取原文

摘要

API specifications play an important role in software development. However, API specifications are often not well documented, especially for JavaScript. Many JavaScript API specifications lack of precise type information for API parameters and return values. In this paper, we propose a static approach for mining JavaScript type specifications automatically. We gather the usage information of return values and parameters statically, and infer types of return values based their usages, by identifying a known type which they are used most likely to be, and infer parameters by identifying the most used parameters. We evaluate the approach on the homepages of Alexa top 1000 websites, the experimental results show that our approach can gain high precision. Our case study on jQuery shows that our approach gains high precision and reasonable recall on jQuery, and we can use our inferred API type specifications to detect 2 jQuery misusage errors in real-world web sites, and 1 missing type error in jQuery documentations.
机译:API规范在软件开发中起着重要作用。但是,API规范通常没有很好的文档,特别是对于JavaScript。许多JavaScript API规范缺少API参数和返回值的精确类型信息。在本文中,我们提出了一种静态方法来自动挖掘JavaScript类型规范。我们静态地收集返回值和参数的使用信息,并通过识别返回值和参数的使用来推断返回值的类型,方法是识别出它们最有可能被使用的已知类型,并通过识别最常用的参数来推断参数。我们在Alexa排名前1000的网站的主页上评估了该方法,实验结果表明,该方法可以获得较高的精度。我们对jQuery的案例研究表明,我们的方法在jQuery上获得了较高的准确性和合理的召回率,并且我们可以使用推断的API类型规范来检测实际网站中的2个jQuery滥用错误和jQuery文档中的1个缺少类型错误。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号