理解与检测静态分析器的注解诱发故障
Understanding and Detecting Annotation-Induced Faults of Static Analyzers
AI总结:
本文首次系统研究静态分析器中的注解诱发故障,分析六个主流工具的246个问题并提出检测修复指南,同时开发AnnaTester框架发现43个新故障,其中20个已修复。
摘要:
静态分析器能够在不执行程序的情况下推理程序的性质和行为,并检测各种问题。因此,它们应当提取必要的信息以充分理解被分析的程序。自Java 5引入以来,注解已成为Java中广泛使用的特性,服务于不同目的。注解可以改变程序结构并传递语义信息,而静态分析器对此并无感知,从而导致不精确的分析结果。本文首次对注解诱发故障(AIF)进行了全面研究,分析了六个开源且流行的静态分析器(即PMD、SpotBugs、CheckStyle、Infer、SonarQube和Soot)中的246个问题。我们分析了这些问题的根本原因、症状和修复策略,并得出十项发现以及一些用于检测和修复注解诱发故障的实用指南。此外,我们基于从这些发现中得出的三条蜕变关系,开发了一个名为AnnaTester的自动化测试框架。AnnaTester基于静态分析器的官方测试套件生成新测试,并揭示了43个新故障,其中20个已被修复。结果证实了本研究及其发现的价值。
英文摘要:
Static analyzers can reason about the properties and behaviors of programs and detect various issues without executing them. Hence, they should extract the necessary information to understand the analyzed program well. Annotation has been a widely used feature for different purposes in Java since the introduction of Java 5. Annotations can change program structures and convey semantics information without awareness of static analyzers, consequently leading to imprecise analysis results. This paper presents the first comprehensive study of annotation-induced faults (AIF) by analyzing 246 issues in six open-source and popular static analyzers (i.e., PMD, SpotBugs, CheckStyle, Infer, SonarQube, and Soot). We analyzed the issues' root causes, symptoms, and fix strategies and derived ten findings and some practical guidelines for detecting and repairing annotation-induced faults. Moreover, we developed an automated testing framework called AnnaTester based on three metamorphic relations originating from the findings. AnnaTester generated new tests based on the official test suites of static analyzers and unveiled 43 new faults, 20 of which have been fixed. The results confirm the value of our study and its findings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。