{"slug": "ai-migrated-legacy-cobol-programs-to-java-bugs-included", "title": "AI migrated legacy COBOL programs to Java, bugs included", "summary": "A new agentic test-synthesis method called the 'Locksmith Loop' improved branch coverage in migrating legacy COBOL programs to Java, reaching 91.90% branch coverage on an internal production-like COBOL program and nearly complete coverage on two open-source programs, according to a paper submitted to arXiv on 30 Jul 2026. The method, developed by researchers, uses an iterative loop with Witness Search and parity-preserving mutations to validate generated Java code against the COBOL reference, achieving deterministic parity in all accepted test cases.", "body_md": "# Computer Science > Software Engineering\n\n[Submitted on 30 Jul 2026]\n\n# Title:Agentic Method for Deterministic Validation of Legacy Code Migration\n\n[View PDF](/pdf/2607.28271)\n\n[HTML (experimental)](https://arxiv.org/html/2607.28271v1)\n\nAbstract:Migration of legacy COBOL programs to Java requires extensive testing to ensure correct functionality. This effort is often complicated by the lack of test data and the difficulty of validating all corner cases. In this paper we propose a novel agentic test-synthesis method, the \"Locksmith Loop,\" which is initiated by preparing two runtime environments: the COBOL source and the generated Java target are each instrumented with mocks and executed off-mainframe on commodity hardware, then an iterative agentic loop performs Witness Search over input mocks to penetrate program branches, followed by parity-preserving mutations. When routing boundaries are reached, an analyzer identifies a Locked Paragraph: a condition preventing deeper exploration. Across three COBOL-Java case studies, spanning two open-source programs and one internal production-like COBOL program and ranging from 430 to 4,114 source lines, Locksmith consistently improved coverage beyond input-search plateaus, reaching nearly complete coverage on the two open-source programs and 91.90% branch coverage on the internal production-like COBOL program. The generated Java matched the COBOL reference under deterministic parity checks in all accepted test cases. Through these findings we demonstrate, to the best of our knowledge, a novel approach for validating agentic coding output using a deterministic oracle.\n\n### References & Citations\n\nLoading...\n\n# Bibliographic and Citation Tools\n\nBibliographic Explorer\n\n*(*[What is the Explorer?](https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer))\nConnected Papers\n\n*(*[What is Connected Papers?](https://www.connectedpapers.com/about))\nLitmaps\n\n*(*[What is Litmaps?](https://www.litmaps.co/))\nscite Smart Citations\n\n*(*[What are Smart Citations?](https://www.scite.ai/))# Code, Data and Media Associated with this Article\n\nalphaXiv\n\n*(*[What is alphaXiv?](https://alphaxiv.org/))\nCatalyzeX Code Finder for Papers\n\n*(*[What is CatalyzeX?](https://www.catalyzex.com))\nDagsHub\n\n*(*[What is DagsHub?](https://dagshub.com/))\nGotit.pub\n\n*(*[What is GotitPub?](http://gotit.pub/faq))\nHugging Face\n\n*(*[What is Huggingface?](https://huggingface.co/huggingface))\nScienceCast\n\n*(*[What is ScienceCast?](https://sciencecast.org/welcome))# Demos\n\n# Recommenders and Search Tools\n\nInfluence Flower\n\n*(*[What are Influence Flowers?](https://influencemap.cmlab.dev/))\nCORE Recommender\n\n*(*[What is CORE?](https://core.ac.uk/services/recommender))# arXivLabs: experimental projects with community collaborators\n\narXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.\n\nBoth individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.\n\nHave an idea for a project that will add value for arXiv's community? [ Learn more about arXivLabs](https://info.arxiv.org/labs/index.html).", "url": "https://wpnews.pro/news/ai-migrated-legacy-cobol-programs-to-java-bugs-included", "canonical_source": "https://arxiv.org/abs/2607.28271", "published_at": "2026-08-03 03:06:12+00:00", "updated_at": "2026-08-03 03:22:16.345842+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-research", "ai-agents"], "entities": ["arXiv", "Locksmith Loop"], "alternates": {"html": "https://wpnews.pro/news/ai-migrated-legacy-cobol-programs-to-java-bugs-included", "markdown": "https://wpnews.pro/news/ai-migrated-legacy-cobol-programs-to-java-bugs-included.md", "text": "https://wpnews.pro/news/ai-migrated-legacy-cobol-programs-to-java-bugs-included.txt", "jsonld": "https://wpnews.pro/news/ai-migrated-legacy-cobol-programs-to-java-bugs-included.jsonld"}}