A new research paper published on arXiv (identifier 2607.28271) has highlighted a concerning reality: artificial intelligence (AI) tools tasked with migrating legacy COBOL codebases to Java have inadvertently "migrated" existing programming bugs as well. This study quickly garnered significant attention from the software development community on Hacker News, raising concerns about the safety and reliability of using AI for legacy system modernization.
Bối cảnh & Nguyên nhân
For decades, global financial institutions, banks, and government agencies have relied on COBOL codebases written in the last century. Maintaining these systems has become increasingly expensive due to a growing shortage of skilled COBOL developers. Consequently, leveraging Large Language Models (LLMs) to automatically translate COBOL into modern languages like Java has been viewed as a promising lifeline. However, the root cause of AI repeating human mistakes lies in how these models operate. Instead of deeply understanding business logic to refactor and optimize, AI often merely performs syntax-level and surface-semantic translations, resulting in the perfect replication of buggy code from the legacy systems.
Phân tích kỹ thuật & Công nghệ
Technically, AI-driven code transpilation faces massive hurdles due to the profound architectural differences between COBOL (a procedural programming language) and Java (an object-oriented language). Current LLMs utilize attention mechanisms to predict the next token based on training data. When encountering complex, obsolete control structures in COBOL, such as "GO TO" statements or shared memory areas, AI tends to mimic these behaviors mechanically in Java. As a result, the generated Java code is not only hard to maintain but also inherits edge-case logic bugs and legacy buffer overflow vulnerabilities without any filtering or remediation.
Ý kiến chuyên gia & Nhận định
On prominent tech forums like Hacker News, many experts expressed skepticism about fully delegating critical codebase migrations to AI. Multiple commentators emphasized that "translating code is not equivalent to modernizing a system," and without rigorous testing, companies are merely moving technical debt from one platform to another at a high cost. Industry specialists recommend that developers view AI as an initial drafting assistant rather than a fully automated, end-to-end replacement for human software engineers.
Tác động & Tương lai
This research serves as a wake-up call for large enterprises planning to cut costs by automating software modernization. For the technology community in Vietnam, where many banks and financial institutions are also in the process of transitioning legacy core banking systems, this lesson highlights the critical importance of investing in automated testing and manual code reviews. In the future, next-generation AI tools must integrate static analysis and deep architectural understanding to proactively detect and patch bugs during the migration of legacy codebases.