The Hardest Part of Rewriting Old Software Is Deciding What It Should Do
A decades-old program is rarely just code. It is also an accumulation of business decisions, emergency patches, undocumented exceptions and accidental behavior that users may have learned to depend on. That makes automated modernization more complicated than translating syntax. According to a recent [research paper](https://arxiv.org/abs/2607.28271), AI systems were able to migrate legacy COBOL programs into Java while retaining bugs from the originals. At first glance, that sounds like a failure. In another sense, it is evidence of impressive semantic fidelity. The deeper problem is that neither a human translator nor an AI model can reliably distinguish a requirement from a defect by looking at implementation alone. A perfect mirror can reflect the wrong thing Organizations often frame legacy migration as a language problem: take code written in an old language, express it in a modern one and preserve the outputs. This framing encourages teams to measure success through behavioral equivalence. If the Java replacement produces the same result as the COBOL system for a broad collection of inputs, the migration appears successful. Yet equivalence only proves that the two syste