An enhanced transformer-based framework for interpretable code clone detection

被引:0
|
作者
Nashaat, Mona [1 ]
Amin, Reem [1 ]
Eid, Ahmad Hosny [1 ]
Abdel-Kader, Rabab F. [1 ]
机构
[1] Port Said Univ, Fac Engn, Elect Engn Dept, Port Said 42526, Egypt
关键词
Software development; Code clone detection; Software productivity; Large language models; Transformer-based models;
D O I
10.1016/j.jss.2025.112347
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In software development, the replication of specific source code segments is known as code cloning. This practice allows reusing source code instead of developing these segments from scratch, enhancing software productivity. However, code cloning can introduce bugs, complicate code refactoring, and increase maintenance costs. Consequently, code clone detection (CCD) is an essential concern for the software industry. While various techniques have been proposed for detecting code clones, many existing tools generate a high ratio of false positives/negatives and a need for more contextual awareness. Therefore, this paper introduces CloneXformer, an innovative framework for code clone detection. The framework adopts a collaborative approach that harnesses multiple large language models for code understanding. The framework employs a preliminary phase to preprocess the input code, which helps the models understand and represent the code efficiently. Then, it captures the semantic level of the code and the syntactic level as it relies on a set of transformer-based models. Afterward, these models are finetuned to detect code clones with interpretable results that explain the detected clone types. Finally, the output of these models is combined to provide a unified final prediction. The empirical evaluation indicates that the framework improves detection performance, achieving an approximately 16.88 % higher F1 score than the state-of-the-art techniques.
引用
收藏
页数:9
相关论文
共 50 条
  • [1] ERTNet: an interpretable transformer-based framework for EEG emotion recognition
    Liu, Ruixiang
    Chao, Yihu
    Ma, Xuerui
    Sha, Xianzheng
    Sun, Limin
    Li, Shuo
    Chang, Shijie
    FRONTIERS IN NEUROSCIENCE, 2024, 18
  • [2] A Transformer-Based Framework for Tiny Object Detection
    Liao, Yi-Kai
    Lin, Gong-Si
    Yeh, Mei-Chen
    2023 ASIA PACIFIC SIGNAL AND INFORMATION PROCESSING ASSOCIATION ANNUAL SUMMIT AND CONFERENCE, APSIPA ASC, 2023, : 373 - 377
  • [3] UPDExplainer: An interpretable transformer-based framework for urban physical disorder detection using street view imagery
    Hu, Chuanbo
    Jia, Shan
    Zhang, Fan
    Xiao, Changjiang
    Ruan, Mindi
    Thrasher, Jacob
    Li, Xin
    ISPRS JOURNAL OF PHOTOGRAMMETRY AND REMOTE SENSING, 2023, 204 : 209 - 222
  • [4] A Transformer-Based Framework for Payload Malware Detection and Classification
    Stein, Kyle
    Mahyari, Arash
    Francia, Guillermo, III
    El-Sheikh, Eman
    2024 IEEE 5TH ANNUAL WORLD AI IOT CONGRESS, AIIOT 2024, 2024, : 0105 - 0111
  • [5] LLVM-Based Code Clone Detection Framework
    Avetisyan, Arutyun
    Kurmangaleev, Shamil
    Sargsyan, Sevak
    Arutunian, Mariam
    Belevantsev, Andrey
    TENTH INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND INFORMATION TECHNOLOGIES REVISED SELECTED PAPERS CSIT-2015, 2015, : 100 - 104
  • [6] TBMF Framework: A Transformer-Based Multilevel Filtering Framework for PD Detection
    Xu, Ning
    Wang, Wensong
    Fulnecek, Jan
    Kabot, Ondrej
    Misak, Stanislav
    Wang, Lipo
    Zheng, Yuanjin
    Gooi, Hoay Beng
    IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, 2024, 71 (04) : 4098 - 4107
  • [7] Efficient transformer with code token learner for code clone detection
    Zhang, Aiping
    Fang, Liming
    Ge, Chunpeng
    Li, Piji
    Liu, Zhe
    JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 197
  • [8] Transformer-based contrastive learning framework for image anomaly detection
    Fan, Wentao
    Shangguan, Weimin
    Chen, Yewang
    INTERNATIONAL JOURNAL OF MACHINE LEARNING AND CYBERNETICS, 2023, 14 (10) : 3413 - 3426
  • [9] Transformer-Based Autoencoder Framework for Nonlinear Hyperspectral Anomaly Detection
    Wu, Ziyu
    Wang, Bin
    IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING, 2024, 62 : 1 - 15
  • [10] A Tiny Transformer-Based Anomaly Detection Framework for IoT Solutions
    Barbieri, Luca
    Brambilla, Mattia
    Stefanutti, Mario
    Romano, Ciro
    De Carlo, Niccolo
    Roveri, Manuel
    IEEE OPEN JOURNAL OF SIGNAL PROCESSING, 2023, 4 : 462 - 478