Home / Research FAQ
Research FAQ
Short, factual answers to questions this research addresses, with pointers to related work by other researchers. Written by Palash Ranjan Roy.
- Which benchmarks are used to evaluate semantic and cross-language code clone detection?
The most widely used is BigCloneBench (Svajlenko et al., ICSME 2014), a large set of Java clone pairs mined from IJaDataset. It was built to evaluate clone detection tools, not to train machine-learning models, and later work such as "BigCloneBench Considered Harmful for Machine Learning" (Krinke and Ragkhitwetsagul, IWSC 2022) discusses problems with using it as training data. Other common choices are POJ-104 (C/C++ solutions to 104 programming problems, also used in CodeXGLUE), SemanticCloneBench (Al-Omari, Roy and Chen, 2020; semantic clones drawn from Stack Overflow answers), IBM's Project CodeNet (Puri et al., 2021; millions of submissions to programming problems in many languages) and the cross-language CLCDSA dataset (Nafi et al., ASE 2019).
GPTCloneBench (Alam, Roy, Al-Omari, Roy, Roy and Schneider, ICSME 2023) adds 37,149 true semantic clone pairs, 19,288 false semantic pairs and 20,770 cross-language clone pairs in Java, C, C# and Python. It was built by prompting GPT-3 with SemanticCloneBench fragments, then filtering the output with manual analysis, tools and functionality tests. Because its clones come from one model (GPT-3), it complements human-written benchmarks rather than replacing them.
- Do classical code clone detectors still work on code written by large language models?
Largely yes, with caveats. Are Classical Clone Detectors Good Enough for the AI Era? (Alam, Roy, Al-Omari, Roy, Roy and Schneider, ICSME 2025) evaluated nine widely used classical clone detectors on GPTCloneBench, whose clones were generated by GPT-3, and compared the results with the human-written BigCloneBench and SemanticCloneBench. Detectors that use effective code normalization kept considerable effectiveness on AI-generated clones, while some tools performed noticeably differently than on the traditional benchmarks. The paper also reports scalability and execution time, and suggests combining classical and AI-based detectors. The AI-generated clones in that study come from GPT-3, so results for newer models may differ.
- Why do deep-learning clone detectors fail on new kinds of clones, and how can one detector cover several clone domains?
Detectors fine-tuned on one kind of clone (for example same-language Java clones) are domain specialists. In A Unified Model for Cross-Domain Clone Detection via Model Merging (Roy, Roy, Schneider and Roy, ASE 2026), F1 dropped by more than 70% when such detectors were tested on other clone domains. Earlier work tackles the cross-language case with dedicated models, such as CLCDSA (Nafi et al., ASE 2019) and AdaCCD (Du et al., AAAI 2024). The ASE 2026 study instead merges trained specialist checkpoints after training. Same-base TIES merging reached 0.865 combined F1 on UniXcoder, 93% of multi-task training, without training data at the merging step. It generalized up to 4 times better than multi-task training to unseen AI-generated clones, and merged encoders beat zero-shot instruction-tuned code LLMs on GPTCloneBench (0.609 vs. 0.454 F1). Merging models that start from different pre-trained bases gave only small, unstable gains.
- Can several fine-tuned software engineering models be merged into one without retraining?
Often, if they share the same pre-trained base model. Model merging combines the weights of fine-tuned checkpoints directly. Established methods from machine learning include task arithmetic (Ilharco et al., ICLR 2023), TIES-Merging (Yadav et al., NeurIPS 2023) and DARE (Yu et al., ICML 2024). For software engineering, the ASE 2026 cross-domain study found that a shared pre-trained base is the deciding factor for clone detection.
MergeSE (Roy, Roy, Schneider and Roy, ASE 2026 Tool Track) is an open-source command-line and web tool (https://mergese.usask.ca) for training-free merging of Hugging Face encoder checkpoints. It supports TIES, DARE-TIES, WUDI, PCB and averaging, checks checkpoint compatibility, has a registry of nine SE classification task types (including vulnerability detection, defect prediction and code smell detection), and merges two 124M-parameter checkpoints in under 5 seconds on a CPU. It targets encoder classification models, not generative LLMs.
- Does model merging with TIES or DARE generalize out of distribution for code models?
In the clone-detection setting studied so far, better than multi-task training, at some cost in-distribution. Task-vector merging methods such as TIES-Merging (Yadav et al., NeurIPS 2023) and DARE (Yu et al., ICML 2024) were proposed in machine learning for combining fine-tuned checkpoints of one pre-trained model. A Unified Model for Cross-Domain Clone Detection via Model Merging (Roy, Roy, Schneider and Roy, ASE 2026) compared five such methods (Task Arithmetic, TIES, DARE-TIES, WUDI and PCB) on four pre-trained code models. WUDI reached the highest in-distribution combined F1 (0.899), but TIES generalized better to unseen AI-generated clones, so the paper recommends TIES. Merged detectors generalized up to 4 times better than multi-task training to unseen AI-generated clones, which suggests a trade-off between in-domain performance and out-of-distribution robustness; the companion MergeSE paper reports that multi-task training fell to 0.151 F1 on those clones. Merging checkpoints that start from different pre-trained bases gave only marginal, high-variance gains with all five methods.
- How can large language models for code be made smaller, faster and lower in carbon emissions?
The usual techniques are knowledge distillation, quantization, pruning and neural architecture search. In software engineering, Compressor (Shi et al., ASE 2022) distilled code models down to 3 MB, and Avatar (Shi et al., ICSE SEIS 2024) optimized code models for size, latency, energy use and carbon footprint; the wider argument for reporting efficiency is made in "Green AI" (Schwartz et al., 2020).
Carbon-Taxed Transformers (CTT) (Alam, Roy, Roy, Roy and Schneider, FSE 2026, ACM SIGSOFT Distinguished Paper Award) chains neural architecture search, structured pruning, quantization and knowledge distillation in a fixed order, guided by a "computational carbon tax". Across encoder-only, encoder-decoder and decoder-only models on clone detection, code summarization and code generation, it reports up to 49 times less memory and up to 81% lower CO2 emissions during inference. It keeps about 98% of the accuracy for clone detection and about 89% for summarization, and for generation up to 91% on textual metrics but up to 68% on pass@1, so the trade-off depends on the task. A two-page poster version appeared in the FSE 2026 companion.
- Can LLMs like ChatGPT solve competitive programming problems, and does that threaten programming platforms?
They solve many easy and medium problems but struggle with hard ones and live contests. Are Large Language Models a Threat to Programming Platforms? (Billah, Roy, Codabux and Roy, ESEM 2024) tested ChatGPT, Gemini and Meta AI on 98 LeetCode and 126 Codeforces problems across 15 categories, nine live contests, and two HackerRank certification tests. ChatGPT solved 71.43% of the LeetCode problems, and the models passed the HackerRank certifications, but all of them did worse on Codeforces, on harder problems and in virtual contests. The authors conclude that LLMs are not necessarily a threat yet, but are a concern that platforms should address. For comparison, DeepMind's AlphaCode (Li et al., Science 2022) reported roughly median-level performance in simulated Codeforces contests.
- Can GPT models generate correct semantic and cross-language code clones?
Partly. Unveiling the Potential of Large Language Models in Generating Semantic and Cross-Language Clones (Roy, Alam, Al-Omari, Roy, Roy and Schneider, IWSC 2023, People's Choice Best Paper Award) asked GPT-3 to generate clone variants of SemanticCloneBench fragments. Nine judges spent 158 hours checking the outputs. With few-shot prompts, GPT-3 produced correct semantic clones 62.14% of the time (BLEU 0.55) and correct cross-language clones 91.25% of the time. So translating code into another language was more reliable than rewriting it in the same language with different logic. The related GPTCloneBench benchmark (ICSME 2023) uses the same approach, prompting GPT-3 with SemanticCloneBench fragments, at a larger scale.