Study: AI Can Translate Code, But Whole Apps Still Stump It
AI could save developers hours, but big translation jobs still fail.
Imagine moving your home from one country to another — packing is easy, but rebuilding the whole house exactly right is much harder. That's the idea behind a new study on code translation, which is the process of converting software written in one programming language (like Java) into another (like Python). Companies do this to modernize old systems, cut costs, or move to new platforms. The study, from researchers at several universities, compared three kinds of tools: older learning-based systems, newer large language models (LLMs like the ones behind ChatGPT), and general-purpose AI chatbots.
The results, posted on the arXiv research site, show that LLMs are clearly better than older methods at translating individual chunks of code, like a single function. However, the study found a big catch: just because translated code looks similar to the original doesn't mean it actually works correctly. Some tools produce code that looks right but fails when run. So developers can't just trust a "looks good" check — they need to actually test it.
The hardest challenge is translating whole classes or programs, which involve many connected parts. Here, even the best AI struggles to keep track of how different pieces interact, like preserving data structures and dependencies. The errors are mostly logical and semantic — meaning the AI misunderstands what the code is supposed to do, not just its grammar.
For everyday people, this is good news and a warning. It means the apps you use may soon be updated faster and more cheaply as companies use AI to convert old code. But it also means we're not at the point where AI can independently rewrite entire software systems without bugs. Human developers still matter — a lot.
- AI code translation tools work well for small pieces of code, like a single function, especially large language models.
- A key finding: code that looks similar to the original may still not work correctly, so testing is essential.
- Translating entire programs or classes is still very difficult for AI, so human developers are still needed for complex projects.
Why It Matters
Better code translation could mean faster app updates and lower software costs, but bugs mean humans still needed.