A Fully Automated Agent for End-to-End Code Translation and Validation
Software migration across programming languages is a critical yet labor-intensive task, often requiring deep code understanding and manual intervention. In this study, we develop a fully automated agent for end-to-end code translation and validation. First, we generate code comments from Java source code using various large language models (LLMs) to enhance code comprehension and facilitate cross-language translation. Second, leveraging these AI-generated comments, we automati- cally generate equivalent C# code, demonstrating the potential of AI in software migration and interoperability. Third, we complete both Java and generated C# code and prepare them to execute. Fourth, we apply automated unit testing to assess functional correctness and ensure the reliability of AI-generated code. Our results show that a fully automated LLM agent may effectively bridge programming languages with minimal human input. This approach opens new possibilities for scalable, AI-driven software modernization and cross-platform development. We recommend that such an LLM agent should be used to support human experts during the generation of reliable and correct code.