Ortem Technologies
    AI & Machine Learning

    AI Coding Agents on a Legacy Java Monolith: What Actually Worked

    Ortem AI Research TeamAugust 25, 202612 min read
    AI Coding Agents on a Legacy Java Monolith: What Actually Worked
    Quick Answer

    In this illustrative controlled trial on a legacy Java monolith, GPT-5.3-Codex-Spark completed the largest share of the migration backlog unaided at 74 percent, with 12 of 15 modules accepted first pass and an 80 percent CI pass rate. Opus 5 completed 68 percent with 11 of 15 accepted and a 73 percent CI pass rate, delivering a more balanced result on complex refactoring. Muse Code completed 57 percent with 8 of 15 accepted, a 60 percent CI pass rate and the highest median rework at 4.7 hours per module. These are illustrative pilot figures for editorial framing, not a verified benchmark.

    Commercial Expertise

    Need help with AI & Machine Learning?

    Ortem deploys dedicated AI & ML Engineering squads in 72 hours.

    Deploy Private AI

    Next Best Reads

    Continue your research on AI & Machine Learning

    These links are chosen to move readers from general education into service understanding, proof, and buying-context pages.

    Most AI coding-agent comparisons measure how quickly a model can generate a feature in a clean repository. Enterprise engineering teams face a different problem: upgrading and refactoring large, interdependent applications where an apparently correct patch can fail CI, break an undocumented integration, introduce a data risk, or make future maintenance harder.

    Ortem Technologies LLC ran an illustrative controlled evaluation of Opus 5, GPT-5.3-Codex-Spark, and Muse Code against the same legacy Java monolith. The goal was not to determine a universal "best AI coding tool." It was to measure the work that matters in a real modernisation engagement: how much migration could be accepted without engineers materially rewriting the agent's production code.

    Read this first. Results are illustrative pilot data created for article framing, not a verified benchmark. A production study should replace these placeholders with logged task outcomes, build reports, reviewer notes, and engineer-hour tracking.

    Short answer: In this illustrative trial, GPT-5.3-Codex-Spark completed the largest share of the migration backlog unaided, at 74%. Opus 5 delivered a close, more balanced result for complex refactoring. Muse Code was economical for contained changes but needed more architect and engineer intervention on cross-module work.


    Benchmark methodology

    Every agent received the same conditions:

    • The same anonymised legacy Java codebase and baseline commit
    • The same 15-task modernisation backlog
    • The same CI environment, build commands, time budget, and test suite
    • The same limited architecture notes and clarification policy
    • The same review gates: build, automated tests, security scan, architecture review, and regression checks

    A task was marked unaided accepted only when the agent-produced patch passed every defined gate without an engineer modifying production code. A patch that compiled but failed contract testing, required business-logic correction, or created an unsafe migration did not receive full credit.


    Headline results

    AgentMigration completed unaidedModules accepted first passEngineer-hours saved per accepted moduleMedian human rework per moduleCI pass rate
    GPT-5.3-Codex-Spark74%12 of 1515.6 hours2.4 hours80%
    Opus 568%11 of 1514.2 hours3.1 hours73%
    Muse Code57%8 of 1510.8 hours4.7 hours60%

    Figure 1. Illustrative benchmark results: GPT-5.3-Codex-Spark achieved the highest unaided migration completion rate, while Opus 5 delivered comparable value across legacy-code refactoring tasks.

    Results are illustrative pilot data created for article framing, not a verified benchmark. A production study should replace these placeholders with logged task outcomes, build reports, reviewer notes, and engineer-hour tracking.


    Which tasks were evaluated?

    The backlog combined predictable upgrade work with high-risk modernisation tasks:

    Task categoryExamples
    Runtime and dependency upgradesJava LTS migration, Maven and Gradle modernisation, CVE remediation
    Framework workSpring upgrade, security configuration updates, API compatibility checks
    RefactoringDomain-service extraction, controller and service decoupling, shared-model cleanup
    Data and jobsSchema migration, rollback plan, legacy batch-job conversion
    Quality and operationsTest coverage, observability, Docker, CI/CD hardening, performance remediation

    This mix matters because AI agents generally perform better when requirements are explicit and the change is local. Their reliability falls when they must infer hidden business rules, reason about database state, preserve undocumented interfaces, or make architectural trade-offs.


    Where the agents broke

    AgentFailure pointWhat happenedRequired intervention
    Opus 5Spring-security upgradeChanged legacy filter sequencing and interrupted an existing authentication flow5.5 hours
    Opus 5Database migrationProduced a correct forward migration but omitted a robust rollback path2.0 hours
    GPT-5.3-Codex-SparkBatch-job modernisationPreserved main output but allowed duplicate processing after retries3.8 hours
    GPT-5.3-Codex-SparkPerformance taskRefactor passed tests but created a database query-plan regression under load4.2 hours
    Muse CodeDomain-service extractionCreated circular dependencies by over-extracting shared classes6.0 hours
    Muse CodeTest generationAdded tests with weak assertions that did not catch a seeded regression2.9 hours

    Every one of these defects passed the agent's own checks and was caught downstream — by integration testing, DBA review, replay testing, load testing, architecture review, or mutation testing. The failures cluster in the same places: filter ordering, rollback steps, retry semantics, query plans, module boundaries, and assertion depth. These are all properties of a system rather than properties of a file, which is exactly what a model working from local context tends to miss.


    What engineering leaders should take from this

    AI coding agents can reduce the cost and elapsed time of a Java modernisation programme, but "generated" does not mean "ready to merge." The most reliable operating model is agent-assisted delivery with human acceptance gates:

    • Use agents for repository discovery, upgrade planning, dependency changes, test drafting, repetitive refactoring, and documentation.
    • Require senior engineers for security boundaries, data migrations, performance-sensitive paths, and architecture decisions.
    • Measure net hours saved after reviews and remediation — not code volume, token count, or the speed of an initial patch.
    • Preserve a complete audit trail: task prompt, branch, code diff, build logs, scan output, reviewer findings, and final outcome.

    Modernising a complex platform and want the review gates designed before the agents start writing code? Ortem Technologies combines AI-enabled development with hands-on architecture, cloud and DevOps delivery through its AI and ML solutions practice and application modernization service. See our AI-powered application modernization guide, or book an architecture review →.

    About Ortem Technologies

    Ortem Technologies is a premier custom software, mobile app, and AI development company. We serve enterprise and startup clients across the USA, UK, Australia, Canada, and the Middle East. Our cross-industry expertise spans fintech, healthcare, and logistics, enabling us to deliver scalable, secure, and innovative digital solutions worldwide.

    📬

    Get the Ortem Tech Digest

    Monthly insights on AI, mobile, and software strategy - straight to your inbox. No spam, ever.

    AI coding agentslegacy migrationJava monolithOpus 5GPT-5.3-Codex-SparkMuse Codeagent benchmark

    About the Author

    O
    Ortem AI Research Team

    Technology Division, Ortem Technologies

    The Ortem AI Research Team is a cross-functional group of ML engineers, data scientists, and software architects embedded across our product, platform, and client delivery divisions. The team researches and evaluates emerging technologies — including large language models, agentic AI systems, computer vision, and MLOps infrastructure — translating complex concepts into actionable guidance for engineering leaders and enterprise decision-makers. Each article published under this byline is the result of collaborative investigation: real-world experimentation, architecture reviews, and performance benchmarking drawn from live client projects and internal R&D initiatives. The team is committed to publishing technically rigorous, vendor-neutral content that helps organisations cut through AI hype and make confident, ROI-driven technology decisions.

    Artificial IntelligenceMachine LearningData Engineering

    Frequently Asked Questions

    Stay Ahead

    Get engineering insights in your inbox

    Practical guides on software development, AI, and cloud. No fluff — published when it's worth your time.

    Ready to Start Your Project?

    Let Ortem Technologies help you build innovative software solutions for your business.