CodeTransBenchmark: Evaluating LLM-based Code Translation and Repair Across Programming Languages
Source
Vera Kowalczuk, Oliver Wei{\ss}l, Severin Kacianka, Andrea Stocco
Author
Vera Kowalczuk, Oliver Wei{\ss}l, Severin Kacianka, Andrea Stocco
Date
Key takeaways · AI-distilled
Across 8 models, 3 datasets, and 12 language pairs, models trained specifically for multilingual code (like Codestral) correctly translated the majority of snippets, while most general-purpose LLMs struggled with the target language's syntax rules.
Error analysis found translation accuracy is heavily shaped by the specific pairing of source and target languages and by what each model was trained on, not just overall model quality.
A post-processing step built to tolerate inconsistent LLMA large language model — the neural network behind tools like Claude and ChatGPT, trained on huge amounts of text to predict what comes next.Full definition → output formatting, plus iterative repair using automated feedback on translation errors, significantly improved translation accuracy.
The authors conclude that reliable production use of LLM code translation would require models with larger context windowThe maximum amount of text a model can consider at once — its working memory for the current conversation or task.Full definition → windows than tested here.
Terms in this piece · Glossary
LLM — A large language model — the neural network behind tools like Claude and ChatGPT, trained on huge amounts of text to predict what comes next.
context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Why it matters
General-purpose LLMs frequently fail on target-language syntax during code translation, so purpose-tuned coding models are the safer default for cross-language migration work.