AI migrated legacy COBOL programs to Java, bugs included
3 hours ago
- The paper addresses challenges in migrating legacy COBOL programs to Java, including lack of test data and difficulty validating corner cases.
- A novel agentic test-synthesis method called the 'Locksmith Loop' is proposed, which uses two runtime environments (COBOL source and Java target) instrumented with mocks.
- The Locksmith Loop involves iterative Witness Search over input mocks to penetrate program branches, followed by parity-preserving mutations, and an analyzer identifies 'Locked Paragraphs' when routing boundaries are reached.
- Evaluated on three COBOL-Java case studies (two open-source and one internal production-like program, 430-4,114 source lines), the method consistently improved coverage beyond input-search plateaus.
- Achieved nearly complete coverage on open-source programs and 91.90% branch coverage on the internal program, with generated Java matching COBOL reference under deterministic parity checks.
- The approach demonstrates a novel method for validating agentic coding output using a deterministic oracle.