Semantic code clone detection based on BERT pre-trained model

Zekai Cheng, Jiahao Hu, Yongkang Guo, Xiaoke Li · 2024

Clone detection of source code is one of the most fundamental software engineering techniques. Although intensive research has been conducted in the past few years, it has more often addressed syntactic code clone, and there are still a number of problems in detecting semantic code clone. In this paper, we propose an approach that uses C/C++ code to finetune the Bert pre-training model so that it better understands the syntactic and semantic features of the C/C++ code, thus enabling better source code similarity evaluation. We evaluated our approach on a large C/C++ code clone dataset and the results show that our approach achieves excellent semantic code clone detection.

Read the paper · More papers on PaperTik