Fine-Tuning Multilingual Language Models for Code Review: An Empirical Study on Industrial C# Projects
By: Igli Begolli, Meltem Aksoy, Daniel Neider
Potential Business Impact:
Helps computers find bugs in code faster.
Code review is essential for maintaining software quality but often time-consuming and cognitively demanding, especially in industrial environments. Recent advancements in language models (LMs) have opened new avenues for automating core review tasks. This study presents the empirical evaluation of monolingual fine-tuning on the performance of open-source LMs across three key automated code review tasks: Code Change Quality Estimation, Review Comment Generation, and Code Refinement. We fine-tuned three distinct models, CodeReviewer, CodeLlama-7B, and DeepSeek-R1-Distill, on a C\# specific dataset combining public benchmarks with industrial repositories. Our study investigates how different configurations of programming languages and natural languages in the training data affect LM performance, particularly in comment generation. Additionally, we benchmark the fine-tuned models against an automated software analysis tool (ASAT) and human reviewers to evaluate their practical utility in real-world settings. Our results show that monolingual fine-tuning improves model accuracy and relevance compared to multilingual baselines. While LMs can effectively support code review workflows, especially for routine or repetitive tasks, human reviewers remain superior in handling semantically complex or context-sensitive changes. Our findings highlight the importance of language alignment and task-specific adaptation in optimizing LMs for automated code review.
Similar Papers
Exploring the Potential of Large Language Models in Fine-Grained Review Comment Classification
Software Engineering
Helps computers understand code feedback better.
Automated Code Review Using Large Language Models at Ericsson: An Experience Report
Software Engineering
Helps computers find mistakes in code automatically.
Automated Code Review Using Large Language Models at Ericsson: An Experience Report
Software Engineering
Helps computers find mistakes in code automatically.