DEVOURED
Legacy Modernization with LLMs, measured
Translating large legacy applications with LLMs costs about $2 per thousand lines, but the resulting code is inconsistent and requires significant verification.
What: Federico Tomassetti conducted an empirical study translating over 500,000 lines of IBM i RPG code to Java using Claude Opus 5.5. The first generation of the translation cost approximately $1,100 in API fees, but the resulting code contained logical inconsistencies, varied design patterns between runs, and requires extensive manual validation before production use.
Why it matters: This research provides a necessary data-driven reality check against the hype surrounding AI-driven migrations, highlighting that code generation is only a small fraction of the total migration effort.
Takeaway: Expect a 5x cost multiplier for generating test scenarios compared to the initial translation cost, and budget for extensive manual validation.
Deep dive
- Translating 500k+ lines of RPG to Java cost ~$1,100 at API prices.
- Repeated translations of the same code resulted in different architectures, interfaces, and design decisions.
- The model struggled with off-the-path behavior (e.g., overflows, negative values) even when standard operations passed tests.
- Generated code was internally inconsistent across different phases of the migration.
- A significant amount of the cost was spent on 'context' tokens as the codebase grew.
- Automated testing and verification remain the most expensive and unresolved bottlenecks.
- The generated code is hard to maintain because it lacks a unified style and uses duplicate utility functions.
Decoder
- IBM i: A mid-range computer system platform from IBM, often running legacy ERP software written in languages like RPG.
- RPG (Report Program Generator): A high-level programming language used primarily on IBM i systems.
- DDS (Data Description Specifications): A language used on IBM i to define data records and files.
Original article
Full article content is not available for inline reading.
Explore all 40 articles in today's digest
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi