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.
翻译:开发者广泛采用静态错误查找器, 以查找真实世界软件项目中的错误。 他们利用预先定义的超常静态分析规则扫描软件项目源代码或二进制代码, 并将违反这些规则的情况报告为需核实的警告。 但是, 静态错误查找器的优点被被一些发现明显错误、 假阳性等等的问题所掩盖。 为改善这些工具, 提出了许多技术来过滤所发现的错误阳性或设计新的静态分析规则。 然而, 错误查找器的不良表现也可能是由于静态错误查找器中包含的当前规则的不正确性造成的, 而这种规则还没有被探索。 在这项工作中, 我们建议采用差别测试方法来检测四个广泛使用的静态错误查找器的规则中的错误, 也就是说, Sonar Qube、 PMD、 SpotBugs 和 Lod Rent Prone Prane 等问题。 为了在静态过滤器中找到对错规则, 我们找到了一种基于超常性规则的描述方法, 但是没有找到一种基于超常性规则的制图方法, 将规则描述规则描述规则的相似性描述和重复的错误描述 28 。 也是我们所报告的工具。