An automated migration of legacy COBOL code to Java using artificial intelligence has revealed a troubling outcome: the translated programs carried forward the same bugs present in the original COBOL source. The finding, discussed in a recent case study, underscores the limitations of current AI-assisted code conversion tools and raises questions about their suitability for mission-critical legacy modernization projects.
The Migration Challenge
Legacy COBOL systems remain essential to many large enterprises, yet the pool of developers skilled in the language continues to shrink. As a result, organizations have turned to AI models for automated translation. The approach promises faster and cheaper conversions than manual rewriting. However, the new study shows that the AI’s literal translation creates a direct copy of the original program’s behavior, including any latent bugs.
How Bugs Propagate
The migration process typically involves feeding source COBOL code into a large language model that generates Java syntax. The model interprets the structure and semantics of the original program, but it lacks the ability to assess whether that logic is correct. If the original COBOL program contained a bug, the AI treats it as a feature to replicate. This means that organizations using AI migration without thorough testing may unknowingly inherit the same operational issues that plagued their legacy systems.
Why This Matters
For enterprises running mainframe COBOL applications, the inability of AI to correct bugs during migration represents a significant operational risk. A financial institution that relies on its COBOL-based core banking system, for example, cannot afford to move a buggy Java version into production. The finding suggests that AI migration tools must be paired with robust testing and validation frameworks, or that human oversight remains essential. The long-term cost of cleaning up replicated bugs could offset the short-term savings of automated migration.
What You Need to Know
Organizations planning to migrate COBOL to Java using AI should budget for extensive post-migration testing. The study highlights that AI translation is not a substitute for code review or quality assurance. Teams must treat the generated Java code as a first draft, not a final product, and invest in both automated and manual testing to catch inherited defects. Until AI models can reason about program correctness, the safest path remains a hybrid approach that combines automated translation with human expertise.



