Actionable Warning Identification (AWI) plays a pivotal role in improving the usability of static code analyzers. Currently, Machine Learning (ML)-based AWI approaches, which mainly learn an AWI classifier from labeled warnings, are notably common. However, these approaches still face the problem of restricted performance due to the direct reliance on a limited number of labeled warnings to develop a classifier. Very recently, Pre-Trained Models (PTMs), which have been trained through billions of text/code tokens and demonstrated substantial success applications on various code-related tasks, could potentially circumvent the above problem. Nevertheless, the performance of PTMs on AWI has not been systematically investigated, leaving a gap in understanding their pros and cons. In this paper, we are the first to explore the feasibility of applying various PTMs for AWI. By conducting the extensive evaluation on 10K+ SpotBugs warnings from 10 large-scale and open-source projects, we observe that all studied PTMs are consistently 9.85%~21.12% better than the state-of-the-art ML-based AWI approaches. Besides, we investigate the impact of three primary aspects (i.e., data preprocessing, model training, and model prediction) in the typical PTM-based AWI workflow. Further, we identify the reasons for current PTMs' underperformance on AWI. Based on our findings, we provide several practical guidelines to enhance PTM-based AWI in future work.
翻译:可操作告警识别(AWI)在提升静态代码分析器可用性中发挥着关键作用。当前,基于机器学习(ML)的AWI方法(主要从已标注告警中学习AWI分类器)较为常见。然而,这些方法仍面临性能受限的问题,因为其直接依赖于有限数量的标注告警来构建分类器。最近,通过数十亿文本/代码令牌训练并在各类代码相关任务中取得显著成功的预训练模型(PTMs),有望规避上述问题。但PTMs在AWI上的性能尚未得到系统研究,导致对其优劣的理解存在空白。本文首次探索了将不同PTMs应用于AWI的可行性。通过在10个大规模开源项目的10000余条SpotBugs告警上进行广泛评估,我们发现所有研究的PTMs比最先进的基于ML的AWI方法一致提升9.85%~21.12%。此外,我们研究了典型PTM-based AWI工作流中三个主要方面(即数据预处理、模型训练和模型预测)的影响,进一步识别了当前PTMs在AWI上性能不足的原因。基于研究结果,我们提出了若干实用指南以增强未来基于PTMs的AWI工作。