Generalizability of Code Clone Detection on CodeBERT
Tim Sonnekalb, Bernd Gruner, Clemens-Alexander Brust, Patrick M\"ader

TL;DR
This paper investigates the generalizability of CodeBERT for code clone detection, revealing significant performance drops when applied to different code snippets and functionality IDs beyond the training data.
Contribution
It provides an empirical evaluation of CodeBERT's generalizability across diverse Java code clones, highlighting limitations in semantic clone detection.
Findings
Significant F1 score drop on different code snippets
Reduced performance on unseen functionality IDs
Challenges in semantic clone detection with CodeBERT
Abstract
Transformer networks such as CodeBERT already achieve outstanding results for code clone detection in benchmark datasets, so one could assume that this task has already been solved. However, code clone detection is not a trivial task. Semantic code clones, in particular, are challenging to detect. We show that the generalizability of CodeBERT decreases by evaluating two different subsets of Java code clones from BigCloneBench. We observe a significant drop in F1 score when we evaluate different code snippets and functionality IDs than those used for model building.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Scientific Computing and Data Management · Software System Performance and Reliability
MethodsCodeBERT
