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.
ACR paper (ISSTA '24) (opens in new tab)SpecRover paper (ICSE ’25) (opens in new tab)Blog post
Impact
- 51.6% on SWE-bench Verified, January 2025.
- Acquired by Sonar (opens in new tab), February 2025.
- The same team’s Foundation Agent (opens in new tab) later reached 79.2% and the top of SWE-bench’s unfiltered leaderboard (opens in new tab).
- Its technology now powers SonarQube’s Remediation Agent (opens in new tab).
- Papers: ISSTA 2024 (opens in new tab) and ICSE 2025 (opens in new tab).
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 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.
Issue + code
A real GitHub issue and the project’s code at the buggy version. That is all the agent is given.
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.
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.
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.
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.
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.
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.
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.
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.
Patch + evidence
One patch, with its evidence: where the bug was, what the code should do, the test, and why it was approved.
| Case | As published | With my changes |
|---|---|---|
| When no patch will apply | The 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 disagrees | Start a new run. | Comment on a search answer or a patch in the IDE; the agent reruns from that point. |
| What a rerun repeats | Everything, from the issue on. | Only the faulty step and what follows; earlier steps are reloaded from their saved results. |
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
- Method name:
lookuptofindOnly you changed it. Keep yours. - 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.
Scroll across to follow the full system
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 additionsMy 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 · KotlinBrings 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