ZC3: Zero-Shot Cross-Language Code Clone Detection
Not on the map. Why?
Abstract (arXiv)
Developers introduce code clones to improve programming productivity. Many existing studies have achieved impressive performance in monolingual code clone detection. However, during software development, more and more developers write semantically equivalent programs with different languages to support different platforms and help developers translate projects from one language to another. Considering that collecting cross-language parallel data, especially for low-resource languages, is expensive and time-consuming, how designing an effective cross-language model that does not rely on any parallel data is a significant problem. In this paper, we propose a novel method named ZC3 for Zero-shot Cross-language Code Clone detection. ZC3 designs the contrastive snippet prediction to form an isomorphic representation space among different programming languages. Based on this, ZC3 exploits domain-aware learning and cycle consistency learning to further constrain the model to generate representations that are aligned among different languages meanwhile are diacritical for different types of clones. To evaluate our approach, we conduct extensive experiments on four representative cross-language clone detection datasets. Experimental results show that ZC3 outperforms the state-of-the-art baselines by 67.12%, 51.39%, 14.85%, and 53.01% on the MAP score, respectively. We further investigate the representational distribution of different languages and discuss the effectiveness of our method.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 24 of its 49 references that are in the map. First posted on arXiv 26 Aug 2023.
Builds on
24 of 49 references.
References · 24
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
- 2015Domain-Adversarial Training of Neural Networkscited by 3,044
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2019Cross-lingual Language Model Pretrainingcited by 1,090
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023Self-collaboration Code Generation via ChatGPTcited by 258
- 2020Contrastive Code Representation Learningcited by 76
- 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
12 more
- 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 56
- 2015SourcererCC: Scaling Code Clone Detection to Big Codecited by 40
- 2023SkCoder: A Sketch-based Approach for Automatic Code Generationcited by 40
- 2020Cross-lingual Information Retrieval with BERTcited by 27
- 2020Unsupervised Domain Adaptation of a Pretrained Cross-Lingual Language Modelcited by 24
- 2018Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inferencecited by 16
- 2020Learning to Represent Programs with Heterogeneous Graphscited by 14
- 2022CodeEditor: Learning to Edit Source Code with Pre-trained Modelscited by 12
- 2022What does Transformer learn about source code?cited by 9
- 2023EvEval: A Comprehensive Evaluation of Event Semantics for Large Language Modelscited by 6
- 2022Unsupervised Context Aware Sentence Representation Pretraining for Multi-lingual Dense Retrievalcited by 5
- 2023Implant Global and Local Hierarchy Information to Sequence based Code Representation Modelscited by 1
Built on by
Citing papers per year: 2023: 2; 2024: 1.
3 papers.