Skip to content

AutoCodeRover

One of the first coding agents, acquired by Sonar

early employee · research engineer · advised by Prof. Abhik Roychoudhury · 2024–25

Why it exists

In early 2024, before Claude Code or Codex, coding agents were still a research question. AutoCodeRover was one of the first to answer it: give it a real GitHub issue, and it found the cause in the code and wrote the fix on its own.

What I built

I joined early and worked on lifting it to 51.6% on SWE-bench Verified. I built Self-Fix: when no patch the agent writes will apply to the code, it works out which agent went wrong and reruns from there instead of starting over. And I built the JetBrains plugin end to end, which put the agent inside the IDE and merges its fixes with the developer’s own edits.

Ask in the IDE0:39

A developer asks for a rename across two files. The agent’s run streams into the panel: where it searched, the locations it chose, the patch. Apply edits both files and highlights every changed line.

Underneath. The plugin sends the request with the open files, recent cursor positions and the code it names, found through the IDE’s program structure (PSI), and streams each agent step back over Server-Sent Events.

The plugin, as recorded. Four real recordings of the JetBrains plugin I built, cropped to the editor and played back to back: 70 seconds in all.

The repair agent

With my changes

When no patch will apply, Self-Fix finds the agent at fault and reruns from there, and a developer can step in from the IDE. Point at any part to see what it does.

  1. Issue + code

    A real GitHub issue and the project’s code at the buggy version. That is all the agent is given.

  2. Reproducer

    Writes a small test that should fail the way the issue describes, then runs it. If it can’t reproduce the bug, the run goes on without one.

  3. Context retrieval

    Searches the code the way a developer would, by class, method and snippet, a few searches a round. It ends with the likely buggy spots and a plain-English note on what each should do.

  4. Patching

    Writes the fix at those spots, guided by the notes. If an edit doesn’t match the real code, it tries again, up to three times.

  5. Self-FixAdded

    When no patch will apply, Self-Fix reads the run and works out which agent went wrong, most often the search that pointed at the wrong code. It writes that agent a note and reruns from there, reloading the steps that were fine.

  6. Developer, in the IDEAdded

    From the plugin, a developer can comment on a search answer or a patch the agent showed. The agent reruns from that point with the comment, keeps earlier comments in mind, and streams the new attempt.

  7. Reviewer

    Runs the test before and after the fix and judges both, since either can be wrong. A no comes with advice for whichever agent wrote it.

  8. Regression tests

    An approved fix must still pass the project’s existing tests. If it breaks them, the run goes again, up to three times.

  9. Selection

    Picks one patch from all the attempts and says why: first one the reviewer approved that passes the tests; otherwise the smallest sound change, by a vote of three.

  10. Patch + evidence

    One patch, with its evidence: where the bug was, what the code should do, the test, and why it was approved.

What changed
CaseAs publishedWith my changes
When no patch will applyThe attempt is thrown away and the whole run starts over.Self-Fix names the agent at fault, writes it a note and reruns from there.
When a developer disagreesStart a new run.Comment on a search answer or a patch in the IDE; the agent reruns from that point.
What a rerun repeatsEverything, from the issue on.Only the faulty step and what follows; earlier steps are reloaded from their saved results.
The repair agent, before and after my changes. The pipeline is the team’s, from the AutoCodeRover and SpecRover papers. Self-Fix, the targeted rerun and feedback from the IDE are what I added.

Your edits, kept: the three-way merge

Last commitWhat the agent saw

User lookup(String key) {
  if (key == null && key.isEmpty())
    return User.missing();
  return cache.get(key);
}

Your working copyYou renamed the method

User find(String key) {
  if (key == null && key.isEmpty())
    return User.missing();
  return cache.get(key);
}

The agent’s patchWritten against the last commit

User lookup(String key) {
  if (key == null || key.isEmpty())
    return User.missing();
  return cache.get(key);
}

Merged into the editorBoth edits, one method

User find(String key) {
  if (key == null || key.isEmpty())
    return User.missing();
  return cache.get(key);
}

How each change was decided

  1. Method name: lookup to findOnly you changed it. Keep yours.
  2. Guard operator: && to ||Only the patch changed it. Take the patch.

Underneath. The plugin parses all three versions into syntax trees and, with GumTree, matches each node of yours and of the patch to the last commit. A node one side changed takes that side; new nodes attach under their matched parent; a node both sides changed differently keeps the last commit. As text, the two edits sit on neighbouring lines, so the patch alone would no longer apply to your file.

Your edits, kept. An example of the merge the JetBrains plugin runs when a patch comes back to a file you have changed: your edit, the agent’s repair. The merge code.
AutoCodeRover · plugin and repair backend

Scroll across to follow the full system

The JetBrains plugin collects developer context and streams feedback to the repair backend. Reproduction, context retrieval, patching, review, and selection are coordinated with Self-Fix and targeted replay. The developer receives a patch, test, intent, and review evidence.ACR plugin · Kotlin / IntelliJ Platform SDKAutoCodeRover backend · Python / DockerRESTSSE streamtargeted replayFeedbackContext / FeedbackPatchJetBrains IDE · IntelliJ IDEAPSI traversal · build and test listeners · Git4Idea · editor APIsChat UI + SSEStreamed reasoning and feedbackSonarLint engineJava / Python static analysisGumTree three-way mergeBaseline · local edits · agent patchContext enrichmentPSI references · cursor · open filesDeveloper feedbackCritique any reasoning stepDirect context and patch revisionsReview changes before applying themMeta-agent orchestratorCoordinate the repair workflowReproduceragentExpose the failureContextretrievaltree-sitterEight languagesPatching agentPropose the repairReviewer agentCheck patch and testSelectionagentCandidates +regressionSelf-Fix agentDiagnose & redirectPatched code + evidenceApply through a three-way AST mergeReconcile independent developer and agent editsIntent + reproducer + reviewThe reasoning and tests behind the repairAvailable for developer inspection51.6% on SWE-bench Verified · January 2025

How it works

The plugin

Kotlin, end to end. It has chat with live streaming and build and test failure capture. SonarLint findings go straight to the agent. Context from the code itself (references, cursor history, open files) narrows the agent’s search.

The merge

When the developer edits a file the agent is patching, the plugin compares the baseline, the working copy and the patch as Java syntax trees (GumTree). It keeps each side’s independent changes, and falls back to the baseline where they conflict.

Self-Fix and targeted replay

When no patch will apply to the code, Self-Fix works out which agent caused it, writes that agent a note and reruns from there, reloading the steps that were fine. The same rerun lets a developer comment on a search answer or a patch from the IDE.

Two repositories, one system

auto-code-rover

Repair backend · Python · my additions

My additions to the team’s repair agent.

  • Self-Fix: when no patch applies, it reruns the agent at fault
  • Targeted replay: earlier steps are reloaded, not repeated
  • A developer can correct the code search or the patch from the IDE

Python · LiteLLM · tree-sitter · Claude 3.5 Sonnet · GPT-4o

Private repository

jetbrains-ide-plugin

IDE plugin · Kotlin

Brings the agent into the IDE.

  • A three-way merge on the syntax tree keeps the developer’s edits
  • Build failures, test failures and SonarLint findings go straight to the agent
  • The agent’s reasoning streams into the editor

Kotlin · IntelliJ Platform SDK · PSI · GumTree · SonarLint Core 10.3 · OkHttp · JGit

zanwenfu/jetbrains-ide-plugin·DeepWiki