Pith. sign in

REVIEW 2 cited by

Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2308.03109 v3 pith:2CF3HZ2Q submitted 2023-08-06 cs.SE

classification cs.SE
keywords codetranslationllmsbugslanguagellm-basedtranslationsautomate
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Code translation aims to convert source code from one programming language (PL) to another. Given the promising abilities of large language models (LLMs) in code synthesis, researchers are exploring their potential to automate code translation. The prerequisite for advancing the state of LLM-based code translation is to understand their promises and limitations over existing techniques. To that end, we present a large-scale empirical study to investigate the ability of general LLMs and code LLMs for code translation across pairs of different languages, including C, C++, Go, Java, and Python. Our study, which involves the translation of 1,700 code samples from three benchmarks and two real-world projects, reveals that LLMs are yet to be reliably used to automate code translation -- with correct translations ranging from 2.1% to 47.3% for the studied LLMs. Further manual investigation of unsuccessful translations identifies 15 categories of translation bugs. We also compare LLM-based code translation with traditional non-LLM-based approaches. Our analysis shows that these two classes of techniques have their own strengths and weaknesses. Finally, insights from our study suggest that providing more context to LLMs during translation can help them produce better results. To that end, we propose a prompt-crafting approach based on the symptoms of erroneous translations; this improves the performance of LLM-based code translation by 5.5% on average. Our study is the first of its kind, in terms of scale and breadth, that provides insights into the current limitations of LLMs in code translation and opportunities for improving them. Our dataset -- consisting of 1,700 code samples in five PLs with 10K+ tests, 43K+ translated code, 1,748 manually labeled bugs, and 1,365 bug-fix pairs -- can help drive research in this area.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. JsDeObsBench: Measuring and Benchmarking LLMs for JavaScript Deobfuscation

    cs.CR 2025-06 conditional novelty 7.0 of 10

    On a new execution-verifiable benchmark, LLMs simplify obfuscated JavaScript far better than rule-based tools but preserve syntax and runtime behavior much less reliably.

  2. From over-reliance to smart integration: using Large-Language Models as translators between specialized modeling and simulation tools

    cs.SE 2025-06 conditional novelty 3.0 of 10

    Large language models should serve as translators in modeling and simulation workflows, coordinated with specialized tools and supported by LoRA-based task adapters on a shared backbone.

Pith tools