An Automated Framework for Legacy Java Modernization Integrating Software Quality, Business Value, and GPT-4-Assisted Re-Engineering: An Empirical Evaluation
Legacy software systems remain operational in many organizations because of their long-standing business value, yet structural degradation and outdated documentation make them increasingly difficult to understand and modernize. Existing reverse-engineering and modernization approaches often address program comprehension, quality assessment, decision support, and code transformation separately, leaving a gap between understanding legacy code and prioritizing components for modernization. To address this gap, this study introduces a seven-step automated framework integrating program comprehension, Software Quality (SQ) and Business Value (BV) assessment, a BV × SQ decision mechanism, and GPT-4-assisted re-engineering with closed-loop quality validation within a unified pipeline. Architectural centrality, change-frequency signals, and structural quality metrics prioritize methods for re-engineering or maintenance, while transformed methods are iteratively re-evaluated against predefined quality criteria. Evaluated on 80 methods across four open-source legacy Java systems from the Qualitas Corpus, the framework achieved a 93.8% validation pass rate and a mean SQ improvement of 40.28 points. The closed-loop mechanism increased the pass rate from 92.5% to 93.8%, while the Maintainability Index evaluation on Apache Ant yielded a Cohen’s d of 4.964. These findings provide empirical evidence that integrating quality- and value-driven decision mechanisms with iterative LLM-assisted re-engineering can support systematic legacy software modernization.
Authors
- Samar Othman Alqahtani
- Ahmed Ghoneim (ORCID: https://orcid.org/0000-0003-2076-8925)
Institutions
- Prince Sattam Bin Abdulaziz University (SA)
- King Saud University (SA)
Publication Details
- Journal
- Applied Sciences
- Published
- 2026-10-04
- DOI
- https://doi.org/10.3390/app16199845
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00