mlsanityData to 14 Oct 2026

Revisiting the Role of Natural Language Code Comments in Code Translation

arXiv 2601.16661 ↗First posted 23 Jan 2026cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

The advent of large language models (LLMs) has ushered in a new era in automated code translation across programming languages. Since most code-specific LLMs are pretrained on well-commented code from large repositories like GitHub, it is reasonable to hypothesize that natural language code comments could aid in improving translation quality. Despite their potential relevance, comments are largely absent from existing code translation benchmarks, rendering their impact on translation quality inadequately characterised. In this paper, we present a large-scale empirical study evaluating the impact of comments on translation performance. Our analysis involves more than 80,000 translations, with and without comments, of 1100+ code samples from two distinct benchmarks covering pairwise translations between five different programming languages: C, C++, Go, Java, and Python. Our results provide strong evidence that code comments, particularly those that describe the overall purpose of the code rather than line-by-line functionality, significantly enhance translation accuracy. Based on these findings, we propose COMMENTRA, a code translation approach, and demonstrate that it can potentially double the performance of LLM-based code translation. To the best of our knowledge, our study is the first in terms of its comprehensiveness, scale, and language coverage on how to improve code translation accuracy using code comments.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 25 of its 39 references that are in the map. First posted on arXiv 23 Jan 2026.

Builds on

25 of 39 references.

References · 25

  1. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  2. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  3. 2023StarCoder: may the source be with you!cited by 799
  4. 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
  5. 2020Unsupervised Translation of Programming Languagescited by 263
  6. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  7. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
  8. 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
  9. 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
  10. 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 57
  11. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  12. 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 35
13 more
  1. 2021Code Structure Guided Transformer for Source Code Summarizationcited by 30
  2. 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
  3. 2023CoTran: An LLM-based Code Translator using Reinforcement Learning with Feedback from Compiler and Symbolic Executioncited by 22
  4. 2024Rectifier: Code Translation with Corrector via LLMscited by 20
  5. 2024Unraveling the Potential of Large Language Models in Code Translation: How Far Are We?cited by 17
  6. 2024InterTrans: Leveraging Transitive Intermediate Translations to Enhance LLM-based Code Translationcited by 16
  7. 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
  8. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  9. 2022Summarize and Generate to Back-translate: Unsupervised Translation of Programming Languagescited by 12
  10. 2023Explain-then-Translate: An Analysis on Improving Program Translation with Self-generated Explanationscited by 12
  11. 2024ClassEval-T: Evaluating Large Language Models in Class-Level Code Translationcited by 8
  12. 2024Specification-Driven Code Translation Powered by Large Language Models: How Far Are We?cited by 5
  13. 2025Collaboration is all you need: LLM Assisted Safe Code Translationcited by 1

Built on by

Not cited yet.