arrow
返回

An enhanced transformer-based framework for interpretable code clone detection

delete2025-04-01
delete0
PRE
AI
M
Mona Nashaat *
A
Amin, Reem
A
Ahmad H. Eid
R
Rabab F. Abdel-Kader
DOI:10.1016/j.jss.2025.112347delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
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.
Keyword:
Software development
Code clone detection
Software productivity
Large language models
Transformer-based models
err分享
err收藏
err分享
err收藏

期刊

Journal of Systems and Software 封面图
Journal of Systems and Software
IF:
4.1
论文数:
5.5K
被引数:
1.0W

机构

E
egyptian knowledge bank (ekb)
学者数:
11.6W
论文数: 9.3W
被引数: 10.4W
引用论文

引用论文

LVMapper: A Large-Variance Clone Detector Using Sequencing Alignment Approach
err2020-01-01
err20
errOAAI
errWu, Ming; Wang, Pengcheng; Yin, Kangqi; Cheng, Haoyu; Xu, Yun; Roy, Chanchal K.
err分享
err收藏
REPD: Source code defect prediction as anomaly detection
err2020-10-01
err10
PREAI
errAfric, Petar; Sikic, Lucija; Kurdija, Adrian Satja; Silic, Marin
err分享
err收藏
The carotid body—a quantitative assessment in children
err2007-04-03
err0
PREAI
errF. DINSDALE; J. L. EMERY; D. R. GADSDON
err分享
err收藏
err分享
err收藏
Stochastic analysis for one dimensional photonic crystals
err2020-04-01
err0
PREAI
errMohamed I. Wafa; Yasser M. El-Batawy; Sahar A. El-Naggar
err分享
err收藏
A Systematic Review on Code Clone Detection代码克隆检测的系统综述
err2019-01-01
err84
errOAAI
errUl Ain, Qurat; Butt, Wasi Haider; Anwar, Muhammad Waseem; Azam, Farooque; Maqbool, Bilal
err分享
err收藏
学者 查看更多内容