论文标题

通过基于变更的代码分析进行API滥用检测的指导模式挖掘

Guided Pattern Mining for API Misuse Detection by Change-Based Code Analysis

论文作者

Nielebock, Sebastian, Heumüller, Robert, Schott, Kevin Michael, Ortmeier, Frank

论文摘要

缺乏经验,文档不足和次优的API设计通常会导致开发人员在重新使用第三方实施时犯错。这样的API滥用可能会导致意外行为,性能损失或软件崩溃。因此,当前的研究旨在通过比较开发人员使用API​​与以前推断正确的API使用模式的方式来自动检测此类滥用。尽管研究取得了重大进展,但实际上尚未采用这些技术。在某种程度上,这是由于缺乏能够与软件开发过程无缝集成的过程。特别是,现有方法没有考虑如何收集相关的源代码样本来推断模式。实际上,收集不足会导致API使用模式矿工推断出无关的模式,从而导致错误警报,而不是发现真正的API滥用。在本文中,我们通过提供一种方法来针对此问题(a),该方法增加了有关一组给定代码更改的相关和真实阳性模式的可能性,并且通过在PISTIRS PIRSS of PIRS empripe of pross ors firs firs firs firs firs firs of Press orsem of pross orse frips frime opers op frime oppi fintection介绍一个概念来找到混凝土静态的静态静态,进程内挖掘技术和(b)。特别是,我们引入了不同的,轻量级的代码搜索和过滤策略,并在两个现实世界中的API滥用数据集上对其进行评估,以确定它们在查找相关的过程内API使用模式方面的有用性。我们的主要结果是(1)基于提交的搜索以及随后的过滤有效地减少了要分析的代码量,(2)尤其是方法级过滤优于文件级过滤,(3)(3)项目内部和项目 - 外部和项目外部代码搜索解决方案查找不同类型的滥用类型的解决方案,因此是互补的,(4)(4)(4)(4)(4)(4)(4)[4)[4)[...] [...] [...]

Lack of experience, inadequate documentation, and sub-optimal API design frequently cause developers to make mistakes when re-using third-party implementations. Such API misuses can result in unintended behavior, performance losses, or software crashes. Therefore, current research aims to automatically detect such misuses by comparing the way a developer used an API to previously inferred patterns of the correct API usage. While research has made significant progress, these techniques have not yet been adopted in practice. In part, this is due to the lack of a process capable of seamlessly integrating with software development processes. Particularly, existing approaches do not consider how to collect relevant source code samples from which to infer patterns. In fact, an inadequate collection can cause API usage pattern miners to infer irrelevant patterns which leads to false alarms instead of finding true API misuses. In this paper, we target this problem (a) by providing a method that increases the likelihood of finding relevant and true-positive patterns concerning a given set of code changes and agnostic to a concrete static, intra-procedural mining technique and (b) by introducing a concept for just-in-time API misuse detection which analyzes changes at the time of commit. Particularly, we introduce different, lightweight code search and filtering strategies and evaluate them on two real-world API misuse datasets to determine their usefulness in finding relevant intra-procedural API usage patterns. Our main results are (1) commit-based search with subsequent filtering effectively decreases the amount of code to be analyzed, (2) in particular method-level filtering is superior to file-level filtering, (3) project-internal and project-external code search find solutions for different types of misuses and thus are complementary, (4) incorporating prior knowledge of the misused [...]

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源