Map the project deterministically
Codna traces packages, interfaces, implementations, injected beans, and blast radius across your Maven or Gradle modules — for zero LLM tokens.
Interfaces, dependency injection, and deep inheritance hierarchies scatter a Java bug far from where it surfaces. Codna is an AI Java debugging tool that builds the dependency graph deterministically, so the fix starts from facts about your code, not guesses.
The problem
A failing JUnit test in Java often points nowhere near the real cause: a Spring bean wired by annotation, an overridden method three classes up the hierarchy, or a generic resolved at runtime. Engineers lose hours stepping through stack traces, grepping for implementations of an interface, and reasoning about which Maven or Gradle module actually owns the broken behavior. Feeding the whole codebase to an AI coding agent is slow, expensive, and lossy — the model still has to guess where to look. Codna resolves the call paths and the blast radius first, so the fix targets the class that's actually wrong.
How Codna fixes it
Codna traces packages, interfaces, implementations, injected beans, and blast radius across your Maven or Gradle modules — for zero LLM tokens.
The AI Java pair programmer receives the failing JUnit test, the call chain, and the suspect classes in a roughly 600-token bundle — about 162x less context than reading the repo.
Codna re-runs your existing JUnit or TestNG suite and ships the patch only when it passes — every fix is test-verified before it lands.
codna fix . --issue "OrderServiceTest.testApplyDiscount fails after refactor"
What you get
Codna's deterministic engine maps your Java project — imports, interfaces, DI wiring, call paths — in milliseconds for zero LLM tokens. No embeddings, no RAG, no waiting.
Instead of streaming 100,000+ tokens of source at a model, Codna hands the agent a measured ~600-token bundle — about 162x less context — so the AI Java bug fix is focused and fast.
The patch runs against your own JUnit or TestNG suite before Codna proposes it. Verified fixes cost about $0.04 each at public model rates.
The proof
Point Codna at your repo and name the failing test or issue: codna fix . --issue "...". Codna maps the project deterministically, hands the agent a tiny evidence bundle, and verifies the patch against your JUnit suite before proposing it.
Yes. The deterministic graph resolves your modules, dependencies, and build configuration for both Maven and Gradle, so a fix accounts for its blast radius across the whole project.
JUnit (4 and 5) and TestNG are supported. Your existing test runner is the oracle — Codna ships a fix only when your suite passes.
Yes. Codna follows annotation-based wiring, injected beans, and method overrides across the class hierarchy, so the AI Java pair programmer fixes the cause rather than a symptom.
Because Codna fixes from a ~600-token evidence bundle instead of reading the whole repo, a verified fix costs about $0.04 at public model rates — far less than a typical agentic edit that ingests the entire codebase.
Yes. Codna self-hosts with your own keys (BYOK), uses fail-closed egress, and never trains on your code. It runs as a CLI, an MCP server in Cursor or Claude, or a native GitHub App.
Related