AI migrates legacy COBOL programs to Java, but inherits existing bugs. The migration process is complex and error-prone, posing challenges for industries relying on legacy code.