AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone Detection
Yangkai Du, Tengfei Ma, Lingfei Wu, Xuhong Zhang, Shouling Ji
Abstract
Code Clone Detection, which aims to retrieve functionally similar programs from large code bases, has been attracting increasing attention. Modern software often involves a diverse range of programming languages. However, current code clone detection methods are generally limited to only a few popular programming languages due to insufficient annotated data as well as their own model design constraints. To address these issues, we present AdaCCD, a novel cross-lingual adaptation method that can detect cloned codes in a new language without annotations in that language. AdaCCD leverages language-agnostic code representations from pre-trained programming language models and propose an Adaptively Refined Contrastive Learning framework to transfer knowledge from resource-rich languages to resource-poor languages. We evaluate the cross-lingual adaptation results of AdaCCD by constructing a multilingual code clone detection benchmark consisting of 5 programming languages. AdaCCD achieves significant improvements over other baselines, and achieve comparable performance to supervised fine-tuning.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- The Struggles of LLMs in Cross-Lingual Code Clone Detection cites GraphCodeBERT: Pre-training Code Representations with Data Flow
- SimCSE: Simple Contrastive Learning of Sentence Embeddings cites A Simple Framework for Contrastive Learning of Visual Representations
- UniCoR: Modality Collaboration for Robust Cross-Language Hybrid Code Retrieval cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- UniCoR: Modality Collaboration for Robust Cross-Language Hybrid Code Retrieval cites The Struggles of LLMs in Cross-Lingual Code Clone Detection
- UniCoR: Modality Collaboration for Robust Cross-Language Hybrid Code Retrieval cites GraphCodeBERT: Pre-training Code Representations with Data Flow
- Barlow Twins: Self-Supervised Learning via Redundancy Reduction cites A Simple Framework for Contrastive Learning of Visual Representations
- LC3: Long Cross-Language Code Clone Detection Enhanced by Opcode Sequences and Affinity Aggregation cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- LC3: Long Cross-Language Code Clone Detection Enhanced by Opcode Sequences and Affinity Aggregation cites GraphCodeBERT: Pre-training Code Representations with Data Flow
Cited by top-tier papers4
- The Struggles of LLMs in Cross-Lingual Code Clone DetectionMicheline Bénédicte Moumoula, Abdoul Kader Kaboré, Jacques Klein, Tegawendé F. BissyandéFSE 2025 · 4 citations
- Rethinking Attention in Spiking Transformers: Overcoming Density Bias with Set SimilarityJinGyo Lim, Seunggyu Jeong, Seong-Eun KimICML 2026
- UniCoR: Modality Collaboration for Robust Cross-Language Hybrid Code RetrievalYang Yang, Li Kuang, Jiakun Liu, Zhongxin Liu et al.ICSE 2026
- LC3: Long Cross-Language Code Clone Detection Enhanced by Opcode Sequences and Affinity AggregationXilin Lan, Huan Zhang, Yang Yang, Chengwu Xue et al.AAAI 2026
Builds on16
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Barlow Twins: Self-Supervised Learning via Redundancy ReductionJure Zbontar, Li Jing, Ishan Misra, Yann LeCun et al.ICML 2021 · 2,942 citations
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng et al.ICLR 2021 · 1,644 citations
Related papers
- ZC3: Zero-Shot Cross-Language Code Clone DetectionJia Li, Chongyang Tao, Zhi Jin, Fang Liu et al.ASE 2023 · 7 citations
- Detecting Semantic Clones of Unseen FunctionalityKonstantinos Kitsios, Francesco Sovrano, Earl T. Barr, Alberto BacchelliASE 2025 · 1 citation
- Contrastive Code Representation LearningParas Jain, Ajay Jain, Tianjun Zhang, Pieter Abbeel et al.EMNLP 2021 · 11 citations
- ContraBERT: Enhancing Code Pre-trained Models via Contrastive LearningShangqing Liu, Bozhi Wu, Xiaofei Xie, Guozhu Meng et al.ICSE 2023 · 56 citations
- SLACC: simion-based language agnostic code clonesGeorge Mathew, Chris Parnin, Kathryn T. StoleeICSE 2020 · 21 citations
