Decoded
Feed

Agentic Method for Deterministic Validation of Legacy Code Migration

arXiv:2607.28271SEAI30 jul 20261 min readHN ×8PDF

An AI agent edits COBOL and its Java translation in lockstep to reach hidden code paths.

91.90%

Branch coverage, production-like program

4,114-line program, with Java matching COBOL on every test

How it works

  1. Search hits a ceiling

    Six input-search algorithms stall at the same coverage. Some COBOL branches can't be reached by changing inputs alone.

  2. Drill locked paragraphs

    An AI agent proposes matching edits to both COBOL and Java. A deterministic parity check keeps only edits that add coverage.

  3. Deeper coverage, full parity

    Mutations opened many paragraphs search missed. Java matched COBOL on all 166 production-run test cases.

plateaulocked paragraphboth sideskeep, recursedoneCOBOL mock+ JavaWitnessSearchAnalyzerfinds gatesAgentmutation skillParity GateValidatedtest suiteplateaulocked paragraphboth sideskeep, recursedoneCOBOL mock+ JavaWitnessSearchAnalyzerfinds gatesAgentmutation skillParity GateValidatedtest suite
From the paper