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

基于预训练模型的可执行警告识别:一项可行性研究

Pre-trained Model-based Actionable Warning Identification: A Feasibility Study

Xiuting Ge, Chunrong Fang, Quanjun Zhang, Daoyuan Wu, Bowen Yu, Qirui Zheng, An Guo, Shangwei Lin, Zhihong Zhao, Yang Liu, Zhenyu Chen

AI总结:

本文首次系统评估多种预训练模型用于可执行警告识别的可行性,验证其显著优于现有机器学习方法,并分析工作流影响与不足,提出改进指南。

摘要:

可执行警告识别(AWI)在提升静态代码分析器的可用性方面发挥着关键作用。目前,基于机器学习(ML)的 AWI 方法相当普遍,这类方法主要从带标签警告中学习一个 AWI 分类器。然而,由于直接依赖数量有限的带标签警告来构建分类器,这些方法仍面临性能受限的问题。最近,预训练模型(PTM)已经在数十亿文本/代码 token 上完成训练,并在多种代码相关任务上展现出大量成功应用,有可能规避上述问题。尽管如此,PTM 在 AWI 上的性能尚未得到系统研究,导致人们对其优缺点缺乏理解。本文中,我们首次探索将各种 PTM 应用于 AWI 的可行性。通过对来自 10 个大型开源项目的 10K+ 条 SpotBugs 警告开展广泛评估,我们观察到所有被研究的 PTM 均一致地比最先进的基于 ML 的 AWI 方法好 9.85%~21.12%。此外,我们考察了典型的基于 PTM 的 AWI 工作流中三个主要方面(即数据预处理、模型训练和模型预测)的影响。进一步地,我们识别了当前 PTM 在 AWI 上表现不佳的原因。基于这些发现,我们提供了若干实用指南,以在未来工作中增强基于 PTM 的 AWI。

英文摘要:

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.

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

↑