Fine-Tuning Code Language Models to Detect Cross-Language Bugs
Not on the map. Why?
Abstract (arXiv)
Multilingual programming, which involves using multiple programming languages (PLs) in a single project, is increasingly common due to its benefits. However, it introduces cross-language bugs (CLBs), which arise from interactions between different PLs and are difficult to detect by single-language bug detection tools. This paper investigates the potential of pre-trained code language models (CodeLMs) in CLB detection. We developed CLCFinder, a cross-language code identification tool, and constructed a CLB dataset involving three PL combinations (Python-C/C++, Java-C/C++, and Python-Java) with nine interaction types. We fine-tuned 13 CodeLMs on this dataset and evaluated their performance, analyzing the effects of dataset size, token sequence length, and code comments. Results show that all 13 CodeLMs exhibited varying degrees of performance improvement after fine-tuning, with UniXcoder-base achieving the best F1 score (0.7407). Notably, within our experimental setup, small CodeLMs tended to performe better than large ones. CodeLMs fine-tuned on single-language bug datasets performed poorly on CLB detection, demonstrating the distinction between CLBs and single-language bugs. Additionally, increasing the fine-tuning dataset size significantly improved performance, while longer token sequences did not necessarily improve the model performance. The impact of code comments varied across models. Some fine-tuned CodeLMs' performance was improved, while others showed degraded performance.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 30 of its 91 references that are in the map. First posted on arXiv 29 Jul 2025.
Builds on
30 of 91 references.
References · 30
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 737
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
18 more
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 117
- 2024IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilitiescited by 103
- 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 91
- 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
- 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 59
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 54
- 2023Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Studycited by 44
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2025Evaluating Small Language Models for News Summarization: Implications and Factors Influencing Performancecited by 12
- 2022On the Use of Deep Learning in Software Defect Predictioncited by 6
- 2020Are Multi-language Design Smells Fault-prone? An Empirical Studycited by 5
- 2024Bug Priority Change: An Empirical Study on Apache Projectscited by 3
- 2023Understanding Resolution of Multi-Language Bugs: An Empirical Study on Apache Projectscited by 2
- 2024A Study of Undefined Behavior Across Foreign Function Boundaries in Rust Librariescited by 2
- 2024An Exploratory Study on Just-in-Time Multi-Programming-Language Bug Predictioncited by 2
- 2024MVD: A Multi-Lingual Software Vulnerability Detection Frameworkcited by 1
Built on by
Not cited yet.