JAVAREFACTORING STUDIO

Runs fully local with no cloud dependency or API keys. Targets consumer GPUs (as low as 4GB VRAM) with automatic CPU fallback.

01 / Setup

INSTALLATION

No build required. Everything (app code + models) is bundled inside the pre-built image and pulled from GitHub Container Registry.

$curl -sL https://raw.githubusercontent.com/horizon-ai-code/horizon/main/docker-compose.yml | docker compose -f - up -d
Docker-readyLocal-firstPre-built modelsNo telemetry

What happens next?

01 / Copy & Run

Run the compose command in your terminal to automatically pull the pre-quantized models and configure local VRAM serialization.

02 / Access Studio

Navigate to http://localhost:3000 to load the desktop refactoring studio workspace.

03 / Refactor

Upload your Java source files. The multi-agent pipeline immediately kicks off analysis, displaying live AST changes in the workspace.

02 / Pipeline

PIPELINE PHASES

01
Lizard / Halstead Analyzer

Baseline

Establishes cyclomatic complexity and structural signatures of the original code.

02
Planner Agent (Qwen2.5-Coder 3B)

Strategy

Classifies refactoring intent and synthesizes an AST modification plan.

03
Generator Agent (Qwen2.5-Coder 3B)

Execution

Applies mutations sequentially or single-shot, generating multiple scored variants.

04
javalang AST Validator

Validation

Runs syntax, complexity-gate, and boundary checks to catch unintended side effects.

05
Judge Agent (Llama-3.2 3B)

Adjudication

Audits the change for semantic correctness and overrides hallucinated diffs.

06
Insights & Save

Finalization

Cleans up, persists results, and extracts developer-facing insights.

01
Lizard / Halstead Analyzer

Baseline

Establishes cyclomatic complexity and structural signatures of the original code.

02
Planner Agent (Qwen2.5-Coder 3B)

Strategy

Classifies refactoring intent and synthesizes an AST modification plan.

03
Generator Agent (Qwen2.5-Coder 3B)

Execution

Applies mutations sequentially or single-shot, generating multiple scored variants.

04
javalang AST Validator

Validation

Runs syntax, complexity-gate, and boundary checks to catch unintended side effects.

05
Judge Agent (Llama-3.2 3B)

Adjudication

Audits the change for semantic correctness and overrides hallucinated diffs.

06
Insights & Save

Finalization

Cleans up, persists results, and extracts developer-facing insights.

03 / Features

CORE FEATURES

Architecture

Multi-agent orchestration

Three small language models (planner, generator, judge) collaborate to produce high-quality refactoring.

01
Pipeline

6-phase refactoring pipeline

Plan, generate, verify, mutate, deduplicate, and rank in one automated workflow.

02
Deployment

GPU + CPU support

A single pre-built image auto-detects GPU at runtime; machines without a GPU run CPU-only automatically.

03
Communication

Real-time WebSocket

Live streaming of analysis, code diffs, and progress updates to the UI.

04
Privacy

No cloud dependency

Everything runs fully local on commodity hardware; no API keys, no data leaving the machine.

05
Integration

REST API

A full HTTP API for headless integration and automation.

06
04 / Studio Demo

REFACTORING IN ACTION

See how the SLM orchestration translates complex, nested conditionals into structured, clean, and optimized Java patterns.

Input.java
# 17 lines
1234567891011121314151617
public class OrderTracker {
public String getStatusMessage(int s) {
String msg = "";
if (s == 0) {
msg = "Order Placed";
} else if (s == 1) {
msg = "Processing";
} else if (s == 2) {
msg = "Shipped";
} else if (s == 3) {
msg = "Delivered";
} else {
msg = "Unknown";
}
return msg;
}
}
Ready
12345678910111213
public class OrderTracker {
 
private static final String[] messages = {
"Order Placed",
"Processing",
"Shipped",
"Delivered"
};
 
public String getStatusMessage(int s) {
return messages[s];
}
}
05 / Principles

ARCHITECTURE

01 / FULLY

FULLY LOCAL

Zero cloud dependency. Runs fully local using quantized GGUF models.

02 / DETERMINISTIC

DETERMINISTIC OUTPUTS

Grammar-constrained generation (GBNF) forces structural JSON alignment, backed by deep syntactic and semantic validation.

03 / FEEDBACK

FEEDBACK LOOPS

Graceful failure logic. Failed phases accumulate structured feedback to guide the next retry instead of failing silently.

04 / SERIALIZED

SERIALIZED EXECUTION

Single concurrency execution. Heavy model operations are serialized to prevent VRAM overflow on consumer hardware.

06 / Team

Meet the builders

This is the team that built the Multi Agent Orchestration system behind Horizon, driving automated AST checks, telemetry flows, and refactoring pipelines.

Project Lead

Orchestrates overall direction, multi-agent workflows, and coordination across the refactoring pipeline to align local agent orchestration with system goals.

View portfolio

Want to refactor your java code fully offline and no ai cloud dependency?

Deploy Horizon locally inside your secure intranet environment using pre-built GGUF models.

Install Horizon
Horizon LogoHorizon AI

Privacy-first, local multi-agent LLM orchestration for an automated Java AST refactoring pipeline.

Architecture

  • AST Verification
  • GBNF Grammars
  • Quantized GGUF
  • Feedback Loops

Builders

© 2026 Horizon AI.