AI migrated legacy COBOL programs to Java, bugs included

arxiv.org
August 3, 2026
2 min read
50/100
Summary
The "Locksmith Loop" is a novel agentic test-synthesis method designed for deterministic validation of legacy COBOL code migration to Java. It addresses challenges in testing by generating test cases to ensure correct functionality despite limited test data and complex corner cases.
Key Takeaways
- The "Locksmith Loop" method improves testing for legacy COBOL to Java migration by utilizing agentic test synthesis to enhance code coverage.
- The method achieved nearly complete coverage on two open-source COBOL programs and 91.90% branch coverage on an internal production-like COBOL program.
- The generated Java code matched the COBOL reference under deterministic parity checks in all accepted test cases.
- The approach demonstrates a novel way to validate agentic coding output using a deterministic oracle.
Coverage & discussions
Hacker News · arxiv.org
Community discussions
Historical count: 5 · 5 saved in sample · Historical sample
Analysis ready
Community Sentiment
Positives
- Using AI to translate COBOL brings extra understanding, which could help demystify legacy systems that are often seen as black boxes.
- There’s a chance that AI could write tests and prompt a better architecture, potentially making it easier for teams to work on legacy codebases.
Concerns
- The idea that a one-shot migration from COBOL to Java won't introduce a massive number of bugs is naive; AI's non-determinism could lead to a plethora of new issues.
- An AI rewrite doesn’t solve the fundamental problems of legacy systems; it just creates a new one that no one understands.
- Rewriting COBOL with AI doesn't address the complexities of job control and other mainframe dependencies that simply don't translate to Java.
Related Articles

Coding agents think ahead of time
Jul 14, 2026

Agentic Context Management: Memory and Cost as Architecture Problems
Aug 26, 2026

A Study of Microsoft's Early 2026 Rollout of Claude Code and GitHub Copilot CLI
Jul 13, 2026

Speed at the cost of quality: Study of use of Cursor AI in open source projects (2025)
Mar 16, 2026

Does code cleanliness affect coding agents? A controlled minimal-pair study
Jul 5, 2026