Advanced Cross-Language Clone Detection Using Modified AST and Graph Neural Network

Cross-language code clone detection is a critical issue in software engineering, driven by the increasing use of multi-language systems within large-scale projects. Code clones-fragments of code with similar functionality but varied implementations-complicate software maintenance, elevating the risk of defects and increasing the cost of debugging and refactoring. Traditional Abstract Syntax Trees (ASTs) are widely used for clone detection but are often insufficient for cross-language scenarios due to their limitations in capturing comprehensive structural and semantic information. To overcome these limitations, this research introduces a modified AST, enhanced by the inclusion of Condition-Type Edges, which effectively model logical dependencies within control structures. This novel extension offers a deeper semantic understanding of the code's decision-making processes, addressing the shortcomings of conventional ASTs that focus solely on syntactic relationships. By integrating this modified AST with Graph Neural Networks (GNNs), our approach learns robust feature representations that capture semantic and structural variations across programming languages. Experimental evaluations on Java-Python code pairs show a notable improvement in detection accuracy, achieving a recall of 0.96, precision of 0.88, and an F1 score of 0.92, outperforming state-of-the-art techniques. These findings underscore the value of Condition-Type Edges in enhancing AST representations, providing a more reliable framework for cross-language code clone detection, and ultimately improving software quality and maintenance in multi-language environments.

Authors

Institutions

Publication Details

Published
2024-12-17
DOI
https://doi.org/10.1109/icca62237.2024.10927826
Citations
2
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.70
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Advanced Cross-Language Clone Detection Using Modified AST and Graph Neural Network

Andreas Pester, Abeer Hamdy, Zeina Swilam
2 citations
Network Security and Intrusion Detection
0.70
article

Advanced Cross-Language Clone Detection Using Modified AST and Graph Neural Network

Andreas Pester, Abeer Hamdy, Zeina Swilam
article en
2 citations

Abstract

Cross-language code clone detection is a critical issue in software engineering, driven by the increasing use of multi-language systems within large-scale projects. Code clones-fragments of code with similar functionality but varied implementations-complicate software maintenance, elevating the risk of defects and increasing the cost of debugging and refactoring. Traditional Abstract Syntax Trees (ASTs) are widely used for clone detection but are often insufficient for cross-language scenarios due to their limitations in capturing comprehensive structural and semantic information. To overcome these limitations, this research introduces a modified AST, enhanced by the inclusion of Condition-Type Edges, which effectively model logical dependencies within control structures. This novel extension offers a deeper semantic understanding of the code's decision-making processes, addressing the shortcomings of conventional ASTs that focus solely on syntactic relationships. By integrating this modified AST with Graph Neural Networks (GNNs), our approach learns robust feature representations that capture semantic and structural variations across programming languages. Experimental evaluations on Java-Python code pairs show a notable improvement in detection accuracy, achieving a recall of 0.96, precision of 0.88, and an F1 score of 0.92, outperforming state-of-the-art techniques. These findings underscore the value of Condition-Type Edges in enhancing AST representations, providing a more reliable framework for cross-language code clone detection, and ultimately improving software quality and maintenance in multi-language environments.

British University in Egypt (EG)
Openalex Percentile: Top 25%
Network Security and Intrusion Detection
0.70
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.