Skip to main content

Legacy code migration using Generative AI

Legacy code migration using Generative AI

The client

Our client is a global player in the travel industry.

Business Challenge

Migrating their legacy codebase, written in the now-obsolete TPF Assembler language, presented a significant hurdle. Due to limited maintainability and upgradeability, they began a multi-year effort to convert the code to Java nearly a decade ago. However, after years of manual effort, only 70% of the code has been successfully migrated. For the remaining 30% of code migration, they were looking for an approach where code could automatically be converted into Java, partially if not completely.

Coforge AI & Automation team developed an approach where the Product Technical Specification Document (PTSD) needs to be created manually using a pseudocode approach which is then provided to GitHub CoPilot to generate the Java code.

Coforge Solution

The proposed approach was able to generate Java code, unit tests, and code documentation automatically.

A business case-driven development approach was used which involved-

  • Generating graphical representations from assembler code like call-calling graphs, flow charts, and data dictionary by analysis tools.
  • Creating business scenarios based on the functional entries and creating test data for unit testing.
  • Using business scenarios to generate the java code snippets and integrate them as per the framework.
  • GitHub-Copilot is used for code generation, unit test generation, and code documentation.
  • With minimum manual efforts, generated code can compile and generate a similar output.

Result

  • Code gets generated in Java (Spring Boot) automatically with the least manual intervention.
  • Average Java developers can generate and validate the code.
  • Junit can be created automatically. Functional Test scripts can also be created automatically.
  • Code generation and testing efforts can be reduced by 70 to 80 percent.

For more information about our services, visit: https://www.coforge.com/services/digital/connected-enterprise

About Coforge

Coforge is a global digital services and solutions provider, that leverages emerging technologies and deep domain expertise to deliver real-world business impact for its clients. A focus on very select industries, a detailed understanding of the underlying processes of those industries, and partnerships with leading platforms provide us with a distinct perspective. Coforge leads with its product engineering approach and leverages Cloud, Data, Integration, and Automation technologies to transform client businesses into intelligent, high-growth enterprises. Coforge’s proprietary platforms power critical business processes across its core verticals. The firm has a presence in 21 countries with 26 delivery centers across nine countries.

For more information on Coforge, please visit www.coforge.com

Let’s engage