AI migrated legacy COBOL programs to Java, bugs included

Migrating legacy COBOL to Java is notoriously tricky, especially without test data. Researchers propose the 'Locksmith Loop,' an agentic method that instruments both the COBOL source and generated Java with mocks, then iteratively searches for inputs to penetrate branches and applies parity-preserving mutations. When stuck, an analyzer identifies a 'Locked Paragraph' blocking deeper exploration. Across three programs (430–4,114 lines), it achieved near-complete branch coverage on open-source code and 91.90% on an internal production-like program, with all accepted test cases matching the COBOL reference under deterministic parity checks.
When routing boundaries are reached, an analyzer identifies a Locked Paragraph: a condition preventing deeper exploration.