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

基于路径语义表示的自动化静态警告识别

Automated Static Warning Identification via Path-based Semantic Representation

Yuwei Zhang, Ying Xing, Ge Li, Zhi Jin

AI总结:

针对静态分析告警误报率高的问题,本文提出利用控制流图路径和微调预训练语言模型捕获代码语义,实现自动化警告识别,并在八个开源项目上验证有效性。

摘要:

尽管静态分析工具能够帮助开发者在软件生命周期早期发现潜在缺陷,但它们通常存在精度问题,即报告的告警具有较高的误报率。为提高这些工具的可用性,研究者提出了许多自动化警告识别技术,以协助开发者对误报告警进行分类。然而,现有方法主要依赖手工设计的特征,或使用语句级抽象语法树 token 序列来表示存在缺陷的代码,无法捕获所报告告警中的语义。为克服传统方法的局限,本文利用深度神经网络强大的特征提取与表示能力,从控制流图路径中生成代码语义,用于警告识别。控制流图以抽象方式表示给定程序的执行过程,因此,生成的控制流图路径序列能够引导深度神经网络更准确地学习潜在缺陷的语义信息。本文对预训练语言模型进行微调,以编码路径序列并捕获用于模型构建的语义表示。最后,本文在八个开源项目上开展了大量实验,通过将所提方法与当前最先进的基线进行比较,验证其有效性。

英文摘要:

Despite their ability to aid developers in detecting potential defects early in the software development life cycle, static analysis tools often suffer from precision issues (i.e., high false positive rates of reported alarms). To improve the availability of these tools, many automated warning identification techniques have been proposed to assist developers in classifying false positive alarms. However, existing approaches mainly focus on using hand-engineered features or statement-level abstract syntax tree token sequences to represent the defective code, failing to capture semantics from the reported alarms. To overcome the limitations of traditional approaches, this paper employs deep neural networks' powerful feature extraction and representation abilities to generate code semantics from control flow graph paths for warning identification. The control flow graph abstractly represents the execution process of a given program. Thus, the generated path sequences of the control flow graph can guide the deep neural networks to learn semantic information about the potential defect more accurately. In this paper, we fine-tune the pre-trained language model to encode the path sequences and capture the semantic representations for model building. Finally, this paper conducts extensive experiments on eight open-source projects to verify the effectiveness of the proposed approach by comparing it with the state-of-the-art baselines.

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

↑