Code clone detection Detection Method Based on Graph Attention Networks

Code clone detection is a critical task in software engineering, with significant importance for code reuse, Code clone detection plays a central role in the field of software engineering, and is crucial for promoting code reuse, identifying potential vulnerabilities, and guaranteeing the efficiency of software maintenance. Traditional tagging and Abstract Syntax Tree (AST) oriented approaches show certain limitations in identifying and parsing the structural and semantic features of code. To address the above challenges, this paper introduces an innovative dual-path neural network architecture based on Program Dependency Graphs (PDGs), which aims to improve the accuracy and efficiency of code similarity detection. Our model integrates a dual-path graph attention architecture, which divides two parallel paths by a precisely set multi-head attention mechanism: one of the paths is configured with a higher number of attention heads focusing on the refined extraction of local features, while the other path employs fewer attention heads aiming at capturing the overall contextual information. In this study, the features of the two paths are combined and processed via an integrated mechanism based on gated recurrent unit (BiGRU), aiming to achieve accurate computation for the final similarity evaluation. Experiments based on publicly available datasets demonstrate that, compared to existing techniques, our solution exhibits significant advantages in key evaluation metrics such as precision, recall, and F1 scores, and at the same time, it realizes a significant improvement in the aforementioned performance while ensuring efficient computational performance.

Authors

Institutions

Publication Details

Published
2025-02-21
DOI
https://doi.org/10.1145/3732365.3732424
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Code clone detection Detection Method Based on Graph Attention Networks

Qinglei Zhou, Maopo Yin
Software Engineering Research
article

Code clone detection Detection Method Based on Graph Attention Networks

Qinglei Zhou, Maopo Yin
article en

Abstract

Code clone detection is a critical task in software engineering, with significant importance for code reuse, Code clone detection plays a central role in the field of software engineering, and is crucial for promoting code reuse, identifying potential vulnerabilities, and guaranteeing the efficiency of software maintenance. Traditional tagging and Abstract Syntax Tree (AST) oriented approaches show certain limitations in identifying and parsing the structural and semantic features of code. To address the above challenges, this paper introduces an innovative dual-path neural network architecture based on Program Dependency Graphs (PDGs), which aims to improve the accuracy and efficiency of code similarity detection. Our model integrates a dual-path graph attention architecture, which divides two parallel paths by a precisely set multi-head attention mechanism: one of the paths is configured with a higher number of attention heads focusing on the refined extraction of local features, while the other path employs fewer attention heads aiming at capturing the overall contextual information. In this study, the features of the two paths are combined and processed via an integrated mechanism based on gated recurrent unit (BiGRU), aiming to achieve accurate computation for the final similarity evaluation. Experiments based on publicly available datasets demonstrate that, compared to existing techniques, our solution exhibits significant advantages in key evaluation metrics such as precision, recall, and F1 scores, and at the same time, it realizes a significant improvement in the aforementioned performance while ensuring efficient computational performance.

Zhengzhou University (CN)
Openalex Percentile: Top 78%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.