A large LLM translation can look uniform on the surface and still be inconsistent underneath. A team translated about 600,000 lines of RPG, DDS and CL into more than one million lines of Java with Claude Code and Opus 5.5. They then measured all 5,737 Java files and 49 snapshots, one after each phase, to see whether the code reads like it came from one author.
It matters because an application this size doesn’t fit in one agent session. The work was split into 49 phases following a dependency plan, and each phase was a separate session that could see only the files earlier ones had written. In effect, 49 translators worked on one codebase without talking to each other.
What looks consistent
At first glance, the answer is yes. Programs use the same runtime helpers for files and RPG operations, class names follow the source programs, and records and screens are uniform. Of the 2,738 classes in the translated-programs package, 1,353 access files through one KeyedFile abstraction and only 5 use JDBC directly. And 1,723 of 1,727 program classes carry names derived from the source member.
Part of that uniformity is no accident. The agent wrote code generators for a large subset of the code, and deterministic tools give consistent output.

Where it breaks down
- No revisiting. 97.9% of files were never touched after the phase that created them. The agent added 29 runtime helpers after phase 3, and no class created before a helper existed uses it.
- Style drift. RPG indicators set by file operations were translated away in 89% of early-phase programs that had them, but kept in an Indicators object in 88% of late-phase cases.
- Unused helpers. Since phase 6 the runtime has had a helper for numbers that must fit a field, yet 213 later classes do the arithmetic by hand. MOVE and MOVEL go through a dedicated helper in 42% of programs, a generic fixed-length-string function in 36% and a plain assignment in 15%. In 16% of programs, fixed-format arithmetic ignores field size entirely.
- Inconsistent structure. Programs that are variants of each other were handled three ways: 147 became subclasses, 78 forward to a shared helper and 128 were translated again from scratch, producing a class at least 90% identical to another.
Helpers rewritten again and again
The finding that worries the authors most for maintenance is duplication. When a session needed a small utility, it wrote one inside the program it was translating. A date-conversion method called dmy is declared in 27 classes with 20 different bodies. Five variants differ in return type and direction, and one handles negative dates differently, even though the runtime already has RpgDate.dmyNumber.
The same happens at scale. 52 classes declare their own private date conversion, 54 declare their own array helper, and 37 helper names appear in five or more program classes, 35 of them with more than one body. Measured duplication is 0.3% in the runtime but 32% in the hand-translated programs, growing from 24% in early phases to 45% in late ones. Part of that comes from the RPG itself, but the helper duplication is the agent’s doing.
Fixing a date bug would mean finding 20 versions and fixing each one. In a human team, the authors say, this wouldn’t have survived the first code review.
Generators that fall out of sync
Unprompted, the agent wrote seven Python generators for DDS, display files, print specifications, SQL tables, queries, CL and menus. They produce a large part of the million lines and are the most uniform part of the system.
They aren’t perfect, though. Re-running all seven and comparing against the delivered files, about 30 of roughly 3,700 generated files behaved differently. Most are old screens never regenerated after the generator learned new keywords, and one targeted test set an indicator in one version but not the other.
What to take from the measurements
Nobody decided to change conventions midway. Each session did what seemed best at the time, and nothing reconciled the results afterward. For teams planning big translations, the practical lesson is to fix a runtime and conventions before the first session, run checks for duplication, and schedule passes that revisit earlier work. A large LLM translation needs that kind of alignment step, or the drift compounds.
Source: Federico Tomassetti