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

利用静态分析增强深度学习的源代码表示

Enhancing Source Code Representations for Deep Learning with Static Analysis

Xueting Guan, Christoph Treude

AI总结:

本文提出将静态分析及缺陷报告、设计模式等额外上下文集成到ASTNN模型中,构建增强的源代码表示,显著提升了代码分类与克隆检测等软件工程任务的性能。

摘要:

应用于代码分类、摘要和缺陷检测等程序分析任务的深度学习技术引起了广泛关注。然而,传统方法将源代码视为自然语言文本,可能忽略重要的结构或语义细节。此外,当前大多数源代码表示方法仅关注代码本身,未考虑有益的额外上下文。本文探索将静态分析以及缺陷报告和设计模式等额外上下文集成到深度学习模型的源代码表示中。我们采用基于抽象语法树的神经网络(ASTNN)方法,并利用从缺陷报告和设计模式中获取的额外上下文信息对其进行增强,创建了一种丰富的源代码表示,显著提升了代码分类和代码克隆检测等常见软件工程任务的性能。利用现有的开源代码数据,我们的方法改进了源代码的表示与处理,从而提高了任务性能。

英文摘要:

Deep learning techniques applied to program analysis tasks such as code classification, summarization, and bug detection have seen widespread interest. Traditional approaches, however, treat programming source code as natural language text, which may neglect significant structural or semantic details. Additionally, most current methods of representing source code focus solely on the code, without considering beneficial additional context. This paper explores the integration of static analysis and additional context such as bug reports and design patterns into source code representations for deep learning models. We use the Abstract Syntax Tree-based Neural Network (ASTNN) method and augment it with additional context information obtained from bug reports and design patterns, creating an enriched source code representation that significantly enhances the performance of common software engineering tasks such as code classification and code clone detection. Utilizing existing open-source code data, our approach improves the representation and processing of source code, thereby improving task performance.

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

↑