Legacy codebases present ongoing challenges for organizations aiming to maintain, evolve, and integrate aging software systems. Large Language Models (LLMs) have emerged as a promising tool for a variety of software engineering tasks, including legacy code modernization.
However, evaluating the effectiveness of LLMs in this context remains an open problem. Existing evaluation methods often focus on isolated code snippets, failing to capture the complexity of real-world modernization efforts, or they require pre-defined references solutions, which may not always be feasible.
This thesis introduces an evaluation framework tailored to a LLM powered modernization tool, designed to assess the quality of the output of a modernization task.
The framework attempts to capture the complexity of a modernization process by evaluating for each core step of the process, producing interim evaluation scores which allows pinpointing of specific issues in the modernization process.
To demonstrate and validate its utility, the framework is applied to compare the performance of three open-source LLMs, to guide the selection of the most suitable model for the tool. Additionally, the scores generated by the framework is compared to an Acceleration score, which attempts to quantify the success of a modernization run based on the time saved.
The results show indicate that the proposed framework is effective in differentiating between runs of varying success, and that it is able to identify specific shortcomings in a modernization run.Föråldrade kodbaser utgör ett återkommande problem för organisationer och företag som vill underhålla, vidareutveckla eller integrera sina mjukvarusystem. Stora språkmodeller (LLMs) har under senaste åren framträtt som ett lovande verktyg för diverse programutvecklingsuppgifter, inklusive modernisering av mjukvarusystem.
Utvärdering av stora språkmodeller i kontexten av kodbasmodernisering är dock ännu ett öppet problem. Utvärderingsmetoder som används idag fokuserar ofta på isolerade funktioner, vilket missar den komplexitet som finns i verkliga moderniseringsprojekt. Flera metoder kräver också att referenslösningar definieras på förhand, vilket inte alltid är möjligt eller effektivt.
Denna avhandling presenterar ett utvärderingsramverk anpassat för ett LLM-baserat moderniseringsverktyg, med syftet att bedöma kvalitén på resultatet av en moderniseringsprocess. Ramverket försöker fånga komplexiteten i processen med att utvärdera centrala steg i moderniseringen och generera delpoäng, vilket möjliggör att specifika problem i processen kan identifieras.
För att demonstrera och validera ramverket, tillämpas det för att jämföra tre olika öppenkod modeller, i syfte att jämföra deras förmåga att producera moderniserade program av bra kvalité, och för att stöda i valet av de mest lämpliga modellerna för moderniseringsprocessen. Dessutom jämförs poängen genererade av ramverket med den verkliga tiden som sparats med verktyget under moderniseringen, I syfte av att kvantifiera kvalitén på en modernisering.
Resultaten indikerar att ramverket lyckas att skilja mellan resultat av olika kvalitet, och att den kan identifiera specifika problem i en moderniseringsprocess.