TriArchitect: A Shared-State Multi-Agent Framework for Safe Java Code Migration

Authors

  • Neeraj Kumar Singh Beshane Independent Researcher, USA

DOI:

https://doi.org/10.70917/ijcisim-2026-4917

Keywords:

Software Evolution, Large Language Models, Multi-Agent Systems, Automated Refactoring, Legacy Migration

Abstract

As the global software infrastructure ages, the modernization of legacy systems—particularly the migration of monolithic Java 8 applications to contemporary Long-Term Support (LTS) versions like Java 17 or 21—has become a critical imperative for security, performance, and maintainability. While Large Language Models (LLMs) have demonstrated exceptional proficiency in isolated code generation tasks, their application to repository-scale migration is severely constrained by "contextual hallucinations"—a phenomenon where models generate syntactically correct but structurally invalid code due to a lack of global state awareness. Recent empirical studies (e.g., Collu-Bench [1]) indicate that determining the hallucination status of generated code remains an unsolved problem, with prediction accuracy often below 33%. In this work, we introduce TriArchitect, a novel shared-state multi-agent framework designed to bridge the gap between probabilistic reasoning and deterministic structural integrity. TriArchitect introduces three key innovations: (1) the Typed Migration Graph (TMG), a formal directed acyclic graph that serves as a persistent semantic memory of the migration state; (2) a specialized role-based multi-agent architecture comprising an Archeologist (analysis), Architect (synthesis), and Validator (verification); and (3) a rigorous Validator-Veto Protocol, which enforces a "compilation-as-consensus" rule to reject hallucinated proposals before they corrupt the codebase. We evaluate TriArchitect on J8-to-J17-Bench, a comprehensive benchmark of 1,000 method-level and class-level migration tasks. Results demonstrate a System Success Rate (SSR) of 68.4%, statistically outperforming significant baselines including OpenRewrite (62.0%), SWE-Agent (63.5%), AutoCodeRover (64.8%), and raw GPT-5.1 (65.2%), while reducing token consumption by 40% through state-aware prompting.

Downloads

Download data is not yet available.

Downloads

Published

2026-08-19

How to Cite

Neeraj Kumar Singh Beshane. (2026). TriArchitect: A Shared-State Multi-Agent Framework for Safe Java Code Migration. International Journal of Computer Information Systems and Industrial Management Applications, 18(18s), 739–751. https://doi.org/10.70917/ijcisim-2026-4917

Issue

Section

Original Articles