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 条
  • [41] Transformer-based models for multimodal irony detection
    Tomás D.
    Ortega-Bueno R.
    Zhang G.
    Rosso P.
    Schifanella R.
    Journal of Ambient Intelligence and Humanized Computing, 2023, 14 (6) : 7399 - 7410
  • [42] A TRANSFORMER-BASED SIAMESE NETWORK FOR CHANGE DETECTION
    Bandara, Wele Gedara Chaminda
    Patel, Vishal M.
    2022 IEEE INTERNATIONAL GEOSCIENCE AND REMOTE SENSING SYMPOSIUM (IGARSS 2022), 2022, : 207 - 210
  • [43] A Generalized Transformer-Based Pulse Detection Algorithm
    Dematties, Dario
    Wen, Chenyu
    Zhang, Shi-Li
    ACS SENSORS, 2022, 7 (09) : 2710 - 2720
  • [44] Survey of Transformer-Based Object Detection Algorithms
    Li, Jian
    Du, Jianqiang
    Zhu, Yanchen
    Guo, Yongkun
    Computer Engineering and Applications, 2023, 59 (10) : 48 - 64
  • [45] Transformer-based mass detection in digital mammograms
    Betancourt Tarifa A.S.
    Marrocco C.
    Molinara M.
    Tortorella F.
    Bria A.
    Journal of Ambient Intelligence and Humanized Computing, 2023, 14 (03) : 2723 - 2737
  • [46] Transformer-based networks over tree structures for code classification
    Wei Hua
    Guangzhong Liu
    Applied Intelligence, 2022, 52 : 8895 - 8909
  • [47] BlinkLinMulT: Transformer-Based Eye Blink Detection
    Fodor, Adam
    Fenech, Kristian
    Lorincz, Andras
    JOURNAL OF IMAGING, 2023, 9 (10)
  • [48] Transformer-Based Intrusion Detection for IoT Networks
    Akuthota, Uday Chandra
    Bhargava, Lava
    IEEE INTERNET OF THINGS JOURNAL, 2025, 12 (05): : 6062 - 6067
  • [49] A transformer-based approach to irony and sarcasm detection
    Rolandos Alexandros Potamias
    Georgios Siolas
    Andreas - Georgios Stafylopatis
    Neural Computing and Applications, 2020, 32 : 17309 - 17320
  • [50] Vision Transformer-Based Tailing Detection in Videos
    Lee, Jaewoo
    Lee, Sungjun
    Cho, Wonki
    Siddiqui, Zahid Ali
    Park, Unsang
    APPLIED SCIENCES-BASEL, 2021, 11 (24):