A Novel Source Code Clone Detection Method Based on Dual-GCN and IVHFS

被引:1
|
作者
Yang, Haixin [1 ]
Li, Zhen [1 ]
Guo, Xinyu [1 ]
机构
[1] Hebei Univ, Sch Cyber Secur & Comp, Baoding 071002, Peoples R China
关键词
source code clone detection; software engineering; graph convolutional network; interval-valued hesitant fuzzy set; abstract syntax tree; control flow graph;
D O I
10.3390/electronics12061315
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Source code clone detection, which can identify code fragments with similar functions, plays a significant role in software development and quality assurance. Existing methods either extract single syntactic or semantic information, or ignore the associated information between code statements in different structures. It is difficult for these methods to effectively detect clone pairs with similar functions. In this paper, we propose a new model based on a dual graph convolutional network (GCN) and interval-valued hesitant fuzzy set (IVHFS), which we named DG-IVHFS. Specifically, we simplified and grouped the abstract syntax tree (AST) of source code to obtain the group representations. The group representations of the AST, as well as the control flow graph (CFG) representations, were transformed into graph structures, and then we applied GCNs on them to learn dependencies between nodes. In addition, we introduced IVHFS into the model for a more comprehensive evaluation of similarity. Our experimental results demonstrated that the precision, recall, and F1-scores of DG-IVHFS on the BigCloneBench and GoogleCodeJam datasets reached 98, 97 and 97% and 98, 93 and 95%, respectively, exceeding current state-of-the-art models. Moreover, our model performed well in terms of time consumption.
引用
收藏
页数:18
相关论文
共 24 条
  • [1] Cross-language Source Code Clone Detection Based On Graph Neural Network
    Zhang, Yuguo
    Yang, Jia
    Ruan, Ou
    PROCEEDINGS OF 2024 3RD INTERNATIONAL CONFERENCE ON CRYPTOGRAPHY, NETWORK SECURITY AND COMMUNICATION TECHNOLOGY, CNSCT 2024, 2024, : 189 - 194
  • [2] Source Code Clone Detection Using Unsupervised Similarity Measures
    Martinez-Gil, Jorge
    SOFTWARE QUALITY AS A FOUNDATION FOR SECURITY, SWQD 2024, 2024, 505 : 21 - 37
  • [3] Fast Code Clone Detection Based on Weighted Recursive Autoencoders
    Zeng, Jie
    Ben, Kerong
    Li, Xiaowei
    Zhang, Xian
    IEEE ACCESS, 2019, 7 : 125062 - 125078
  • [4] A parallel deep learning-based code clone detection model
    Zhang, Xiangping
    Liu, Jianxun
    Shi, Min
    JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 2023, 181
  • [5] DGGCN: Dictionary based DGA detection method based on DomainGraph and GCN
    Jiao, Haoran
    Wang, Qing
    Fan, Zhaoshan
    Liu, Junrong
    Du, Dan
    Li, Ning
    Liu, Yuling
    2022 31ST INTERNATIONAL CONFERENCE ON COMPUTER COMMUNICATIONS AND NETWORKS (ICCCN 2022), 2022,
  • [6] An Efficient New Multi-Language Clone Detection Approach from Large Source Code
    Rehman, Saif Ur
    Khan, Kamran
    Fong, Simon
    Biuk-Aghai, Robert
    PROCEEDINGS 2012 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN, AND CYBERNETICS (SMC), 2012, : 937 - 940
  • [7] Structural Function Based Code Clone Detection Using A New Hybrid Technique
    Yang, Yanming
    Ren, Zhilei
    Chen, Xin
    Jiang, He
    2018 IEEE 42ND ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), VOL 1, 2018, : 286 - 291
  • [8] Low-Complexity Code Clone Detection using Graph-based Neural Networks
    Liu, Hu
    Zhao, Hui
    Han, Changhao
    Hou, Lu
    2022 18TH INTERNATIONAL CONFERENCE ON MOBILITY, SENSING AND NETWORKING, MSN, 2022, : 797 - 802
  • [9] Automatic detection of Long Method and God Class code smells through neural source code embeddings
    Kovacevic, Aleksandar
    Slivka, Jelena
    Vidakovic, Dragan
    Grujic, Katarina-Glorija
    Luburic, Nikola
    Prokic, Simona
    Sladic, Goran
    EXPERT SYSTEMS WITH APPLICATIONS, 2022, 204
  • [10] Source Code Plagiarism Detection Based on Abstract Syntax Tree Fingerprintings
    Suttichaya, Vasin
    Eakvorachai, Niracha
    Lurkraisit, Tunchanok
    2022 17TH INTERNATIONAL JOINT SYMPOSIUM ON ARTIFICIAL INTELLIGENCE AND NATURAL LANGUAGE PROCESSING (ISAI-NLP 2022) / 3RD INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND INTERNET OF THINGS (AIOT 2022), 2022,