Master's Thesis

MigrationFlow: Automatic Code Upgrade of Java Libraries

Eduardo Filipe Lopes Mendes Vieira de Carvalho — 2025

Key information

Authors:

Eduardo Filipe Lopes Mendes Vieira de Carvalho (Eduardo Filipe Lopes Mendes Vieira de Carvalho)

Supervisors:

Vasco Miguel Gomes Nunes Manquinho (Vasco Miguel Gomes Nunes Manquinho); Eduardo Reanha

Published in

November 4, 2025

Abstract

Modern software systems depend on external frameworks and libraries that evolve over time, often introducing breaking changes that require code adaptations. Keeping projects up-to-date is essential for security, maintainability, and compatibility, but updating large Java applications remains a time-consuming and error-prone process. Manual migrations are particularly challenging in enterprise systems, where multiple dependencies, frameworks, and custom configurations interact in complex ways. This thesis presents MigrationFlow, a structured strategy designed to automate and streamline Java project migrations. The approach combines existing automated refactoring techniques with custom transformation rules developed to address specific migration issues that generic solutions cannot fully resolve. Community-maintained recipes are first applied to perform the baseline upgrade, followed by targeted declarative rules that correct the remaining compilation, runtime, and test-level errors. The strategy was validated through a set of experiments involving both open-source and internal enterprise projects from Critical Software. A benchmark of open-source repositories was created to evaluate the effectiveness of community recipes and to assess the generalizability of the developed rules. The results indicate that the proposed workflow can substantially reduce manual effort and mitigate many of the risks associated with framework upgrades, supporting more reproducible and reliable migrations while maintaining project-specific behavior.

Publication details

Authors in the community:

Supervisors of this institution:

Fields of Science and Technology (FOS)

electrical-engineering-electronic-engineering-information-engineering - Electrical engineering, electronic engineering, information engineering

Publication language (ISO code)

eng - English

Rights type:

Embargo lifted

Date available:

October 7, 2026

Institution name

Instituto Superior Técnico