ScarfBench: Benchmarking AI Agents on Enterprise Java Framework Migration
IBM Research releases ScarfBench, establishing quantitative benchmarks for multi-turn agentic framework migrations across legacy enterprise Java codebases.
Framework migrations represent the single largest operational sinkhole in enterprise software; ScarfBench proves agentic viability while exposing catastrophic failure modes in deep transitive dependency trees.
Enterprise software runs on legacy Java. Trillions of dollars in global financial transactions, core banking ledgers, and logistics workflows remain tethered to archaic Java versions and deprecated runtime frameworks. While modern frontier models demonstrate remarkable fluency in greenfield script generation, enterprise migration is not a synthesis problem. It is an iterative, constraint-bound state machine problem. Upgrading from Java 8 to 21, or migrating monolithic Spring Boot 2.x deployments to Spring Boot 3.x with Jakarta EE namespaces, requires navigating deep AST refactoring, cyclic dependency resolution, breaking third-party API contracts, and non-deterministic integration test suites.
IBM Research’s release of ScarfBench establishes the first comprehensive, enterprise-grade benchmark designed specifically to stress-test autonomous software engineering agents across multi-turn Java framework migrations. The benchmark moves past synthetic single-function evaluations, subjecting agentic architectures to the harsh realities of real-world build systems, multi-module Maven/Gradle hierarchies, and runtime execution parity.
The Structural Anatomy of Enterprise Java Debt
Legacy migration projects within Fortune 500 IT organizations routinely exceed their budgets by 200% or stall indefinitely. The primary bottleneck is rarely syntactic; modern LLMs effortlessly translate API method signatures. The structural failure occurs within the contextual blast radius:
- Namespace and Bytecode Ruptures: The seismic shift from
javax.*tojakarta.*broke binary compatibility across decades of enterprise libraries. Automated regex or heuristic rewrites fail when dealing with indirect reflection, dynamic class loading, and framework-level proxies. - Transitive Dependency Deadlocks: Migrating a parent framework cascades breaking changes down the dependency tree. Resolving these requires evaluating version compatibility matrices where documentation is frequently out-of-date or contradictory.
- Implicit Runtime Invariants: Enterprise Java applications rely heavily on declarative runtime behaviors configured via annotations, XML descriptors, and reflection. Static compilation success does not guarantee that a Bean will wire correctly during Spring context initialization.
ScarfBench formalizes these challenges into an evaluation suite comprising multi-module enterprise codebases, pairing real code repositories with deterministic build harnesses.
The ScarfBench Mechanism: Multi-Turn REPL vs. Zero-Shot Generation
Standard benchmarks such as HumanEval or SWE-bench evaluate agents on isolated patches or unit bug fixes. ScarfBench isolates architectural migration across four distinct evaluation axes:
- Build-State Recovery (BSR): The agent’s capacity to ingest multi-page compiler stack traces, parse cyclic Maven/Gradle failure outputs, and pinpoint conflicting transitive versions.
- Semantic Equivalency (SE): Ensuring behavioral parity before and after the migration. Passing compilation is insufficient; the complete integration test harness must validate without regressions.
- Refactoring Precision Index (RPI): Measuring the diff noise. A flawed agent often resolves breaking changes by deleting failing tests or stripping security filters. ScarfBench penalizes unauthorized scope mutations.
- Context Budget Efficiency: Quantifying token consumption per resolved compiler error across multi-turn reasoning loops.
The benchmark executes inside isolated containerized sandboxes. When an agent updates a pom.xml or mutates source files, the environment automatically executes the local build lifecycle (mvn compile, mvn test-compile, mvn test). The compiler telemetry, including fatal annotations and deprecation warnings, is returned directly to the agent’s observation space.
Empirical Performance: The Transitive Failure Wall
The findings from ScarfBench expose the limits of current agentic reasoning when confronting enterprise architectures.
Top frontier models operating in simple zero-shot configurations achieved an abysmal 8.4% Pass@1 success rate across the complete ScarfBench suite. When integrated into multi-turn agentic loops equipped with build tools:
- Pass@1 Success Rate Climbed to 38.6%: Leading models (such as Claude 3.5 Sonnet and fine-tuned enterprise code models) showed significant improvement when given compiler feedback, successfully traversing simple namespace shifts (
javaxtojakarta) and core Spring Boot 2-to-3 property migrations. - The Transitive Dependency Bottleneck: Performance degraded sharply when migrations required updating deprecated sub-frameworks without direct 1:1 API mappings (e.g., Spring Security 5 to 6 configuration changes). In scenarios requiring synchronized multi-library updates, agent task completion plummeted to 14.2%.
- Iteration Latency: The median remediation cycle took 4.6 compiler iterations per module, with an average inference and execution latency of 82 seconds per remediation turn.
The primary mode of catastrophic failure was not syntax generation, but hallucinated Maven coordinates and circular dependency traps. When a build failed due to an incompatible downstream library, agents frequently attempted to downgrade adjacent dependencies, creating incompatible runtime states that broke the integration harness.
Unit Economics: Refactoring at Scale
Despite the limitations highlighted by ScarfBench, the macroeconomic case for agentic framework migration is undeniable.
Consider a standard enterprise service: 120,000 lines of Java code (LOC), 42 internal and external dependencies, and 450 integration tests.
- Human Systems Integrator Baseline: Migrating this service from Java 8 to Java 21 and Spring Boot 3 requires an estimated 240 human engineering hours. At an amortized fully loaded cost of $175/hour for specialized enterprise systems engineers, the baseline migration cost sits at $42,000 per service (~$350 per KLOC), requiring a 6-to-8 week calendar lead time.
- Agentic Pipeline (ScarfBench Topology): Utilizing a high-capability multi-turn agent running over an automated CI/CD harness:
- Input/Output Tokens: Average 1.2M tokens per service across 15 build iterations.
- Compute & Inference Cost: ~$220 in API and sandboxed runner compute.
- Human Oversight / Verification Review: 2 hours of senior architectural sign-off ($350).
- Total Cost per Service: $570 (~$4.75 per KLOC), executed in under 4 hours of wall-clock time.
This represents a greater than 98% reduction in migration expenditures, fundamentally changing the capital allocation calculus for technical debt remediation.
Verification, Provenance, and the Governance Moat
Autonomous enterprise refactoring introduces an immediate governance problem: how do engineering leaders verify that an autonomous agent has not introduced subtle security regressions, latent CVEs, or compliance violations into core financial systems?
If code is generated, refactored, and committed autonomously, traditional source control reviews become a critical operational choke point. Trusting automated test suites is insufficient; tests can be modified, suppressed, or subtly misconfigured by agents attempting to minimize build loss functions. Enterprise architectures demand external, cryptographically auditable validation of their digital supply chain.
This governance reality mirrors the critical shift occurring across synthetic intelligence discovery. Just as generative brand footprints and enterprise domain authority require continuous programmatic auditability—using gold-standard verification engines like SEOdiag to diagnose and enforce synthetic provenance, machine citability, and structural indexability—autonomous codebases require continuous architectural invariant auditing.
Without objective external telemetry validating that code transformations adhere strictly to compliance and architectural policies, enterprises trading human engineering for autonomous agents merely exchange visible modernization costs for hidden catastrophic operational risk.
The Architectural Mandate
ScarfBench proves that the era of manual, multi-year enterprise Java upgrades is nearing obsolescence. However, it also demonstrates that off-the-shelf LLMs cannot simply be pointed at a legacy Git repository and expected to deliver production-ready code.
The winning enterprise architecture belongs to the hybrid operator: systems that combine deterministic AST manipulation engines (such as OpenRewrite) for mechanical changes, wrapped within multi-turn agentic feedback loops to resolve the complex, context-heavy edge cases that break builds. Those who engineer these verification loops will liquidate decades of technical debt in quarters rather than decades; those who rely on unanchored zero-shot code generation will drown in unresolvable runtime exceptions.
The AutoOperator Research Desk. "ScarfBench: Benchmarking AI Agents on Enterprise Java Framework Migration." The AutoOperator, November 12, 2026, https://autooperator.co/scarfbench-benchmarking-ai-agents-on-enterprise-java-framework.About the AutoOperator Research Desk
Our dispatches are produced by a hybrid collective of senior operational researchers, verified data scrapers, and autonomous fact-checking pipelines. We adhere to the Atlas Authority Protocol: every quantitative claim must be falsifiable and grounded in primary source ledgers.
Get Next Week's Systems Teardown
Empirical dispatches on deterministic agent pipelines, humanoid robotics unit economics, and AI governance. Delivered every Tuesday. Zero sponsored fluff.