Enhancing Programming Language Models for C++ Code Clone Detection

Hyonjun Kang, Haeun Chun, Mucheol Kim · 2024

This paper examines the fine-tuning methods of two Code Language Models, namely Code-Reviewer and GraphCodeBERT, with the objective of enhancing code clone detection in C++ code. Two experiments are conducted: sentence embeddings and sentence classification with the BM25L algorithm for enhanced pair selection. The Euclidean distance method demonstrated superior performance among the five similarity methods in the sentence embedding comparison. The combination of sentence classification with BM25L as a sentence pairing algorithm achieves superior performance, indicating a promising avenue for further development. The results show that GraphCodeBERT outperforms Code-Reviewer in every task, and sentence classification outperforms sentence embedding in a large margin. This paper highlights the potential of these models for clone detection and emphasizes the benefits of methodological enhancements for improved accuracy, providing valuable insights for software developers and future research.

Read the paper · More papers on PaperTik