DeepFWI: Identifying Bug-Sensitive Warnings with Multi-Modal Code-Warning Semantics
Nankai University(南开大学);Beihang University(北京航空航天大学);Nanyang Technological University(南洋理工大学);Shanghai Jiaotong University(上海交通大学);Singapore Institute of Technology(新加坡科技工程研究学院);East China Normal University(华东师范大学);Xidian University(西安电子科技大学)
Han Liu, Jian Zhang, Cen Zhang, Xiaohan Zhang, Kaixuan Li, Sen Chen, Shang-Wei Lin, Yixiang Chen, Xinhua Li, Yang Liu
Static analysis tools have evolved over time to assist in detecting bugs. However, the excessive false warnings can impede developers' productivity and confidence in the tools. Previous research efforts have explored learning-based approaches to identify bug warnings. Nevertheless, their coarse granularity, focusing on either long-term warnings or function-level alerts, is insensitive to individual bugs. Also, they rely on manually crafted features or solely on source code semantics, which is inadequate for effective learning. In this paper, we propose DeepFWI, a learning-based approach that identifies bug-sensitive warnings at a fine-grained granularity. Specifically, we design a novel LSTM-based model that captures multi-modal semantics of source code and warnings from automated static analysis tools (ASATs) and highlights their correlations with cross-attention. To tackle the data scarcity of training and evaluation, we collected a large-scale dataset of 280,273 warnings. We conducted extensive experiments on the dataset to evaluate DeepFWI. The experimental results demonstrate the effectiveness of our approach, with an F1-score 67.06% for confirming true warnings in a finer-grained manner, significantly outperforming all baselines. Additionally, to validate the practicality of DeepFWI from the perspective of developers, we applied DeepFWI to four popular open-source projects. Our approach filtered out the vast majority of warnings, while still successfully surfacing 25 true bug-related warnings that were confirmed through manual analysis.
Actionable Warning Is Not Enough: Recommending Valid Actionable Warnings with Weak Supervision
The State Key Laboratory of Blockchain and Data Security, Zhejiang University(浙江大学区块链与数据安全国家重点实验室);Shanghai Institute for Advanced Study, Zhejiang University(浙江大学上海高等研究院);Huawei(华为)
Are automated static analysis tools worth it? An investigation into relative warning density and external software quality
自动化静态分析工具(ASAT)是软件开发最佳实践的一部分。ASAT能够警告开发人员代码中的潜在问题。一方面,反卫星技术是基于最佳做法,因此对软件质量应该有明显的影响。另一方面,ASAT遭受误报警告,开发人员必须检查这些警告,然后忽略或标记为无效。在本文中,我们使用PMD for Java的例子来询问ASAT是否对外部软件质量有可测量的影响。我们调查了PMD对每个更改和每个文件的缺陷发出的ASAT警告之间的关系。我们的案例研究包括每个文件的历史数据以及更改的文件与包含它们的项目之间的差异。我们调查导致缺陷的文件是否比项目的其余部分具有更多的静态分析警告。此外,我们调查的影响,两套不同的反卫星武器规则。我们发现,在那个时间点,bug诱导文件包含的静态分析警告比项目的其他文件少。然而,这可以用整体警报密度下降来解释。当与所有其他的变化相比,我们发现一个统计上显着的差异,在一个指标的所有规则和两个指标的一个子集的规则。然而,在所有情况下,效果大小都可以忽略不计,这表明bug诱导更改和其他更改之间的警告密度的实际差异充其量也很小。
Demystifying the Silence of Correctness Bugs in PyTorch Compiler
The Hong Kong University of Science and Technology(香港科技大学);Guangzhou HKUST Fok Ying Tung Research Institute(广州香港科技大学霍英东研究院);Carnegie Mellon University(卡内基梅隆大学)