Cross-language code clone detection via flow-enhanced graph attention network.

Saved in:
Bibliographic Details
Title: Cross-language code clone detection via flow-enhanced graph attention network.
Authors: Hu, Mengyao1 (AUTHOR), Yang, Jia2 (AUTHOR), Zhou, Weiqi1 (AUTHOR)
Source: Computer Journal. May2026, Vol. 69 Issue 5, p800-815. 16p.
Subjects: Maintainability (Engineering), Modeling languages (Computer science), Resemblance (Philosophy), Transformer models
Abstract: Code clones are similar code fragments at the syntactic or semantic level, commonly seen in software development. Excessive cloning harms maintainability and may introduce persistent bugs. We analyze cross-language code clone detection at the accurate semantic level. Most existing clone detection approaches target single-language environments and focus mainly on syntactic similarity. However, complex software systems are often developed using multiple programming languages, resulting in semantically similar cross-language code clones. These clones pose challenges beyond the capabilities of current detection tools. In this paper, we propose a novel flow-enhanced graph attention network approach, called FEGAT, to effectively detect cross-language code clones at the semantic level. First, we design a flow-enhanced code graph using abstract syntax tree along with the added control and data flow edges. Then, we input this code graph into the pre-trained model CodeBERT to learn the initial flow-enhanced node representation with semantic information. Third, we design FEGAT to learn flow-enhanced graph representation of cross-language codes from their semantic information and detect clones by computing the similarity score. Finally, we conduct experiments on the AtCoder and CodeChef datasets to evaluate the performance of FEGAT in terms of precision, recall, and F1-score. The experimental results demonstrate that FEGAT outperforms existing cross-language code clone detection tools. [ABSTRACT FROM AUTHOR]
Copyright of Computer Journal is the property of Oxford University Press / USA and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
Be the first to leave a comment!
You must be logged in first