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

自动化静态分析工具值得吗?相对警告密度与软件外部质量的研究

Are automated static analysis tools worth it? An investigation into relative warning density and external software quality

Alexander Trautsch, Steffen Herbold, Jens Grabowski

摘要:

自动化静态分析工具(ASAT)是软件开发最佳实践的一部分。ASAT能够警告开发人员代码中的潜在问题。一方面,反卫星技术是基于最佳做法,因此对软件质量应该有明显的影响。另一方面,ASAT遭受误报警告,开发人员必须检查这些警告,然后忽略或标记为无效。在本文中,我们使用PMD for Java的例子来询问ASAT是否对外部软件质量有可测量的影响。我们调查了PMD对每个更改和每个文件的缺陷发出的ASAT警告之间的关系。我们的案例研究包括每个文件的历史数据以及更改的文件与包含它们的项目之间的差异。我们调查导致缺陷的文件是否比项目的其余部分具有更多的静态分析警告。此外,我们调查的影响,两套不同的反卫星武器规则。我们发现,在那个时间点,bug诱导文件包含的静态分析警告比项目的其他文件少。然而,这可以用整体警报密度下降来解释。当与所有其他的变化相比,我们发现一个统计上显着的差异,在一个指标的所有规则和两个指标的一个子集的规则。然而,在所有情况下,效果大小都可以忽略不计,这表明bug诱导更改和其他更改之间的警告密度的实际差异充其量也很小。

英文摘要:

Automated Static Analysis Tools (ASATs) are part of software development best practices. ASATs are able to warn developers about potential problems in the code. On the one hand, ASATs are based on best practices so there should be a noticeable effect on software quality. On the other hand, ASATs suffer from false positive warnings, which developers have to inspect and then ignore or mark as invalid. In this article, we ask the question if ASATs have a measurable impact on external software quality, using the example of PMD for Java. We investigate the relationship between ASAT warnings emitted by PMD on defects per change and per file. Our case study includes data for the history of each file as well as the differences between changed files and the project in which they are contained. We investigate whether files that induce a defect have more static analysis warnings than the rest of the project. Moreover, we investigate the impact of two different sets of ASAT rules. We find that, bug inducing files contain less static analysis warnings than other files of the project at that point in time. However, this can be explained by the overall decreasing warning density. When compared with all other changes, we find a statistically significant difference in one metric for all rules and two metrics for a subset of rules. However, the effect size is negligible in all cases, showing that the actual difference in warning density between bug inducing changes and other changes is small at best.

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

↑