Advancing Automated In-Isolation Validation in Repository-Level Code Translation
Kaiyao Ke, Ali Reza Ibrahimzada, Rangeet Pan, Saurabh Sinha, Reyhaneh Jabbarvand

TL;DR
This paper introduces TRAM, a novel approach for repository-level code translation that combines context-aware type resolution with mock-based in-isolation validation, significantly improving translation quality and validation efficiency.
Contribution
TRAM integrates RAG-based type resolution with mock-based validation to enable high-quality, in-isolation repository-level code translation, reducing manual effort and validation costs.
Findings
Achieves state-of-the-art Java-to-Python translation performance.
Effectively resolves type mappings using contextual information and LLMs.
Enables validation of code fragments in isolation without heavy manual effort.
Abstract
Repository-level code translation aims to migrate entire repositories across programming languages while preserving functionality automatically. Despite advancements in repository-level code translation, validating the translations remains challenging. This paper proposes TRAM, which combines context-aware type resolution with mock-based in-isolation validation to achieve high-quality translations between programming languages. Prior to translation, TRAM retrieves API documentation and contextual code information for each variable type in the source language. It then prompts a large language model (LLM) with retrieved contextual information to resolve type mappings across languages with precise semantic interpretations. Using the automatically constructed type mapping, TRAM employs a custom serialization/deserialization workflow that automatically constructs equivalent mock objects in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Scientific Computing and Data Management · Software Testing and Debugging Techniques
