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

被引:0
|
作者
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
相关论文
共 50 条
  • [1] Indexing source code and clone detection
    Tronicek, Zdenek
    INFORMATION AND SOFTWARE TECHNOLOGY, 2022, 144
  • [2] A Novel Code Stylometry-based Code Clone Detection Strategy
    Dong, Wenyuan
    Feng, Zhiyong
    Wei, Hua
    Luo, Hong
    2020 16TH INTERNATIONAL WIRELESS COMMUNICATIONS & MOBILE COMPUTING CONFERENCE, IWCMC, 2020, : 1516 - 1521
  • [3] A Novel Method for Code Clone Detection Based on Minimally Random Kernel Convolutional Transform
    Abdelkader, Mostefai
    IEEE Access, 2024, 12 : 158579 - 158596
  • [4] Gapped Code Clone Detection with Lightweight Source Code Analysis
    Murakami, Hiroaki
    Hotta, Keisuke
    Higo, Yoshiki
    Igaki, Hiroshi
    Kusumoto, Shinji
    2013 IEEE 21ST INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2013, : 93 - 102
  • [5] A Clone Code Detection Method Based on Software Complex Network
    Guo, Haoran
    Ai, Jun
    Shi, Tao
    2019 IEEE 30TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS (ISSREW 2019), 2019, : 120 - 121
  • [6] Clone detection in source code by frequent itemset techniques
    Wahler, V
    Seipel, D
    Von Gudenberg, JW
    Fischer, G
    FOURTH IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2004, : 128 - 135
  • [7] Software vulnerability code clone detection method based on characteristic metrics
    Gan, Shui-Tao
    Qin, Xiao-Jun
    Chen, Zuo-Ning
    Wang, Lin-Zhang
    Ruan Jian Xue Bao/Journal of Software, 2015, 26 (02): : 348 - 363
  • [8] A Method of Program Refactoring based on Code Clone Detection and Impact Analysis
    Takahashi, Masakazu
    Nanba, Reiji
    Anang, Yunarso
    Uchiyama, Tatsuya
    Watanabe, Yoshimichi
    2016 55TH ANNUAL CONFERENCE OF THE SOCIETY OF INSTRUMENT AND CONTROL ENGINEERS OF JAPAN (SICE), 2016, : 673 - 678
  • [9] CCFinder: A multilinguistic token-based code clone detection system for large scale source code
    Kamiya, T
    Kusumoto, S
    Inoue, K
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (07) : 654 - 670
  • [10] Semantic Code Clone Detection Based on Community Detection
    Wan, Zexuan
    Xie, Chunli
    Lv, Quanrun
    Fan, Yasheng
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2024, : 1661 - 1692