arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.02245cs.SE
收藏

基于模式的缺陷检测器中的缺陷检测方法

An Approach to Detecting Bugs in Pattern-Based Bug Detectors

Junjie Wang, Yuchao Huang, Song Wang, Qing Wang

摘要:

静态bug查找器已被开发人员广泛采用,以查找真实世界软件项目中的bug。它们利用预定义的启发式静态分析规则来扫描软件项目的源代码或二进制代码,并将违反这些规则的情况报告为要验证的警告。然而,静态错误查找器的优点是掩盖了这样的问题,如发现明显的错误,误报等,以改善这些工具,已经提出了许多技术来过滤误报报告或设计新的静态分析规则。尽管如此,bug查找器的性能不佳也可能是由静态bug查找器中包含的当前规则的不正确引起的,这还没有被探索。在这项工作中,我们提出了一种差分测试方法来检测四个广泛使用的静态错误发现器,即,为了在不同的静态bug查找工具中检索成对的规则以进行差异测试,本文设计了一种基于统计学的规则映射方法,该方法结合了规则描述的相似性和工具报告的警告信息的重叠性。在2,728个开源项目上的实验中,静态bug发现器发现了46个bug,其中24个已经修复或确认,剩下的有待确认。我们还总结了13个错误模式的静态分析规则的基础上,他们的上下文和根本原因,这可以作为设计和实现其他规则和/或在其他工具的检查表。这项研究表明,常用的静态错误查找器并不像他们想象的那样可靠。它不仅证明了我们的方法的有效性,而且还强调了需要继续提高静态bug查找器的可靠性。

英文摘要:

Static bug finders have been widely-adopted by developers to find bugs in real world software projects. They leverage predefined heuristic static analysis rules to scan source code or binary code of a software project, and report violations to these rules as warnings to be verified. However, the advantages of static bug finders are overshadowed by such issues as uncovered obvious bugs, false positives, etc. To improve these tools, many techniques have been proposed to filter out false positives reported or design new static analysis rules. Nevertheless, the under-performance of bug finders can also be caused by the incorrectness of current rules contained in the static bug finders, which is not explored yet. In this work, we propose a differential testing approach to detect bugs in the rules of four widely-used static bug finders, i.e., SonarQube, PMD, SpotBugs, and ErrorProne, and conduct a qualitative study about the bugs found. To retrieve paired rules across static bug finders for differential testing, we design a heuristic-based rule mapping method which combines the similarity in rules description and the overlap in warning information reported by the tools. The experiment on 2,728 open source projects reveals 46 bugs in the static bug finders, among which 24 are fixed or confirmed and the left are awaiting confirmation. We also summarize 13 bug patterns in the static analysis rules based on their context and root causes, which can serve as the checklist for designing and implementing other rules and or in other tools. This study indicates that the commonly-used static bug finders are not as reliable as they might have been envisaged. It not only demonstrates the effectiveness of our approach, but also highlights the need to continue improving the reliability of the static bug finders.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑