SELGPLAug 26, 2022

Generalizability of Code Clone Detection on CodeBERT

arXiv:2208.12588v223 citationsh-index: 39
Originality Synthesis-oriented
AI Analysis

This highlights a critical limitation in applying transformer models to real-world code clone detection, particularly for semantic clones, which is incremental but important for software engineering.

The study evaluated the generalizability of CodeBERT for code clone detection, revealing a significant drop in F1 score when tested on different Java code subsets from BigCloneBench compared to the training data.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes