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 条
  • [31] A transformer-based real-time earthquake detection framework in heterogeneous environments
    Wu, Aming
    Khan, Irshad
    Kwon, Young-Woo
    SCIENTIFIC REPORTS, 2025, 15 (01):
  • [32] A transformer-based framework for enterprise sales forecasting
    Sun, Yupeng
    Li, Tian
    PEERJ COMPUTER SCIENCE, 2024, 10 : 1 - 14
  • [33] A Transformer-Based Framework for Scene Text Recognition
    Selvam, Prabu
    Koilraj, Joseph Abraham Sundar
    Tavera Romero, Carlos Andres
    Alharbi, Meshal
    Mehbodniya, Abolfazl
    Webber, Julian L.
    Sengan, Sudhakar
    IEEE ACCESS, 2022, 10 : 100895 - 100910
  • [34] Fastformer: Transformer-Based Fast Reasoning Framework
    Zhu, Wenjuan
    Guo, Ling
    Zhang, Tianxiang
    Han, Feng
    Wei, Yi
    Gong, Xiaoqing
    Xu, Pengfei
    Guo, Jing
    FOURTEENTH INTERNATIONAL CONFERENCE ON GRAPHICS AND IMAGE PROCESSING, ICGIP 2022, 2022, 12705
  • [35] Enhanced Anomaly Detection in IoT Through Transformer-Based Adversarial Perturbations Model
    Zia, Saher
    Bibi, Nargis
    Alhazmi, Samah
    Muhammad, Nazeer
    Alhazmi, Afnan
    ELECTRONICS, 2025, 14 (06):
  • [36] CoRT: Transformer-based code representations with self-supervision by predicting reserved words for code smell detection
    Alazba, Amal
    Aljamaan, Hamoud
    Alshayeb, Mohammad
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (03)
  • [37] Traffic Transformer: Transformer-based framework for temporal traffic accident prediction
    Al-Thani, Mansoor G.
    Sheng, Ziyu
    Cao, Yuting
    Yang, Yin
    AIMS MATHEMATICS, 2024, 9 (05): : 12610 - 12629
  • [38] ETMA: Efficient Transformer-Based Multilevel Attention Framework for Multimodal Fake News Detection
    Yadav, Ashima
    Gaba, Shivani
    Khan, Haneef
    Budhiraja, Ishan
    Singh, Akansha
    Singh, Krishna Kant
    IEEE TRANSACTIONS ON COMPUTATIONAL SOCIAL SYSTEMS, 2024, 11 (04) : 5015 - 5027
  • [39] Transformer-based code search for software Q&A sites
    Peng, Yaohui
    Xie, Jing
    Hu, Gang
    Yuan, Mengting
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2024, 36 (02)
  • [40] Transformer-based networks over tree structures for code classification
    Hua, Wei
    Liu, Guangzhong
    Applied Intelligence, 2022, 52 (08): : 8895 - 8909