AI & Machine Learning

Transforming legacy code documentation with GenAI  

For a UK-based healthcare company, we used GenAI and Azure OpenAI Services to transform legacy code documentation and optimise poorly documented systems. The solution enabled automated analysis, duplicate detection, refactoring, and architecture visualisation, improving maintainability, performance, and scalability.

Transforming legacy code documentation with GenAI

arrow_circle_right Legacy code transformation

About the client

A global partner in providing healthcare services that strives for the sustainable development of the healthcare system. 

Industry: 

Healthcare

Location: 

UK

Services

Legacy code analysis

Code refactoring & optimisation

Architecture & data flow visualisation

Technologies

GenAI
Azure OpenAI

Challenge and business need

Our client’s primary business need was to improve the documentation and optimisation of their legacy systems. The legacy systems, characterised by complex and often poorly documented code, present significant maintenance, scalability and performance challenges.

By improving the understanding and performance of these systems, the client aims to provide a robust foundation for ongoing and future technological advancements in line with business objectives.

Our responsibilities

To address these issues, we leveraged Azure OpenAI Services to automate and improve the analysis, documentation, and optimisation processes. Our approach to this project ensures that the legacy systems are not only thoroughly documented but also optimised to efficiently support current and future business requirements.

The scope of our work focused primarily on 4 areas:

Automatic analysis

  • Analysing and documenting legacy code – we used GenAI technology to automatically analyse the legacy code base, which involved systematically reading and understanding the code and then generating detailed documentation describing the intricacies of the existing code.
  • Highlight dependencies – our tools created visual representations, such as dependency graphs, that illustrate how different parts of the code interact.

Duplicate detection

  • Identify duplicate code – we used advanced algorithms to scan the code base for duplicated code segments. These duplications are common in legacy systems and can lead to maintenance challenges.
  • Reporting for cleanup – once duplications were identified, we generated detailed reports highlighting these issues and providing clear guidance on where cleanup is required.

Refactoring and optimisation

  • AI-powered refactoring suggestions – we harnessed AI to provide actionable recommendations for code refactoring. These suggestions were designed to improve the code’s performance, readability, and maintainability.
  • Performance improvement – our AI tools analysed performance bottlenecks in the system and recommended specific changes to improve performance. Thanks to this, we ensured that the legacy system meets current performance standards and is scalable for future requirements.

Data flow and architecture visualisation

  • Data flow documentation – we automated the data flow documentation in the system, which includes mapping how data moves through different system components and improving understanding and management of data processes.
  • UML diagram generation – to provide a clear and comprehensive visualisation of the system architecture, we generated Unified Modelling Language (UML) diagrams, which are a standardised way of visualising system components.
Transforming legacy code documentation with GenAI

The result

Our team efforts resulted in significant improvements to the legacy systems, including improved documentation, a streamlined codebase through duplicate cleanup, optimised performance through AI-driven refactoring, and more precise visualisation of the system architecture.

Together, these outcomes improved the systems’ maintainability, efficiency and scalability, ensuring they can effectively support current and future business needs.

If you need to modernise the legacy system in your company, check out our offering or contact us directly via the form below.

arrow_circle_rightContact us

Interested in working together? Get in touch.

Tomasz Smolarczyk

Tomasz Smolarczyk

Director of Artificial Intelligence