Leveraging LLMs for Legacy Code Modernization: Evaluation of LLM-Generated Documentation

Legacy software systems, written in outdated languages like MUMPS and mainframe assembly, pose challenges in efficiency, maintenance, staffing, and security. While LLMs offer promise for modernizing these systems, their ability to understand legacy languages is largely unknown. This paper investigates the utilization of LLMs to generate documentation for legacy code using two datasets: an electronic health records (EHR) system in MUMPS and an open-source application in IBM mainframe Assembly Language Code (ALC). We propose a prompting strategy for generating line-wise code comments and a rubric to evaluate their completeness, readability, usefulness, and hallucination. Our study assesses the correlation between human evaluations and automated metrics, such as code complexity and reference-based metrics. We find that LLM-generated comments for MUMPS and ALC are generally hallucination-free, complete, readable, and useful compared to ground-truth comments, though ALC poses challenges. However, no automated metrics strongly correlate with comment quality to predict or measure LLM performance. Our findings highlight the limitations of current automated measures and the need for better evaluation metrics for LLM-generated documentation in legacy systems.

Authors

Institutions

Publication Details

Published
2025-05-03
DOI
https://doi.org/10.1109/llm4code66737.2025.00027
Citations
3
Primary Topic
Library Science and Information Systems
Type
article
Field-Weighted Citation Impact
9.74
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Leveraging LLMs for Legacy Code Modernization: Evaluation of LLM-Generated Documentation

Paul M. Kirk, S. Rosen, Anand Patel, Michael W. Doyle et al.
3 citations
Library Science and Information Systems
9.74
article

Leveraging LLMs for Legacy Code Modernization: Evaluation of LLM-Generated Documentation

Paul M. Kirk, S. Rosen, Anand Patel, Michael W. Doyle, Emily Escamilla, John P. Phillips, Eric O. Scott, A. Madan, Nitin Naik, William Macke, A. Sridharan, J. A. Zimmer, Colin Diggs, Zachary Robin, Chris Glasz, Doug Wendt, Justin F. Brunelle, Samruddhi Thaker, Naveed Nekoo, Paul Ursino, Michael Bartholf
article en
3 citations

Abstract

Legacy software systems, written in outdated languages like MUMPS and mainframe assembly, pose challenges in efficiency, maintenance, staffing, and security. While LLMs offer promise for modernizing these systems, their ability to understand legacy languages is largely unknown. This paper investigates the utilization of LLMs to generate documentation for legacy code using two datasets: an electronic health records (EHR) system in MUMPS and an open-source application in IBM mainframe Assembly Language Code (ALC). We propose a prompting strategy for generating line-wise code comments and a rubric to evaluate their completeness, readability, usefulness, and hallucination. Our study assesses the correlation between human evaluations and automated metrics, such as code complexity and reference-based metrics. We find that LLM-generated comments for MUMPS and ALC are generally hallucination-free, complete, readable, and useful compared to ground-truth comments, though ALC poses challenges. However, no automated metrics strongly correlate with comment quality to predict or measure LLM performance. Our findings highlight the limitations of current automated measures and the need for better evaluation metrics for LLM-generated documentation in legacy systems.

Mitre (United States) (US)
Openalex Percentile: Top 2%
Library Science and Information Systems
9.74
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.