← Latest papers
💻 computer science

ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports

ReProAgent is a multi-stage, tool-augmented agent framework that outperforms existing prompt-based approaches by decomposing bug reproduction test generation into localized stages of bug identification, root cause analysis, planning, and generation, achieving significantly higher success rates across diverse benchmarks.

Original authors: Quanjun Zhang, Yi Zheng, Ye Shang, Weifeng Sun, Haichuan Hu, Chunrong Fang, Zhenyu Chen, Liang Xiao

Published 2026-07-13
📖 5 min read🧠 Deep dive

Original authors: Quanjun Zhang, Yi Zheng, Ye Shang, Weifeng Sun, Haichuan Hu, Chunrong Fang, Zhenyu Chen, Liang Xiao

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you're a detective trying to solve a mystery, but the only clue you have is a blurry, handwritten note from a witness saying, "Something weird happened in the kitchen!" In the world of software, this note is an issue report. Usually, developers have to guess what went wrong, write a test to prove it, and then try to fix it. But often, they don't have a test, making the whole process slow and frustrating.

For a while, smart computer programs (called Large Language Models or LLMs) tried to write these tests automatically. They were like detectives who just read the note and immediately shouted, "I think the culprit is the toaster!" They grabbed a few nearby clues (text from the code) and guessed the answer. But the paper argues this approach is too simple. It's like trying to solve a complex murder mystery by only looking at the crime scene photo without ever interviewing the suspects or checking the alibis. These older methods often missed the real problem because they didn't understand how different parts of the code (the "kitchen," the "living room," and the "basement") were connected.

Enter ReProAgent: The Super-Detective Team

The authors of this paper built a new system called ReProAgent. Instead of one detective guessing the answer, ReProAgent is a team of specialized agents working in a strict, four-step investigation process. They don't just guess; they investigate, analyze, plan, and then act.

Here is how their "detective workflow" works:

  1. The Search (Bug Localization): First, the team doesn't just look at the whole building. They use special tools to search through the code like a librarian finding a specific book. They look for keywords and follow the "breadcrumbs" (dependencies) to find exactly which file and line of code is acting up.
  2. The Interrogation (Root Cause Analysis): Once they find the suspect, they don't just arrest them. They trace the exact path the bug took. They ask, "How did the error travel from the front door to the back window?" They build a map of the execution path to understand why the bug happened, not just where.
  3. The Trap Design (Test Planning): Before setting a trap, they plan it out. They figure out exactly what conditions need to be met to make the bug show up again. It's like setting up a specific scenario where the suspect must reveal their crime.
  4. The Sting Operation (Test Generation & Review): Finally, they write the test (the trap) and run it in a safe, isolated sandbox (a digital playpen). But here's the cool part: if the test fails to catch the bug, or if it catches the wrong thing, the team doesn't just give up. They review the result, ask, "Did we catch the right criminal?" and then refine their test. They keep looping this process until the test perfectly reproduces the bug.

The Results: Did It Work?

The team tested ReProAgent on two big sets of real-world software problems (called SWT-bench-lite and SWT-bench-verified). The results were impressive.

  • On the smaller set (SWT-bench-lite), ReProAgent successfully recreated the bug in 58.43% of the cases.
  • On the harder, verified set (SWT-bench-verified), it succeeded in 70.30% of the cases.

To put this in perspective, the next best method (a system called AssertFlip) only managed to solve about 38.0% of the problems on the smaller set. ReProAgent didn't just beat the competition; it left them in the dust, solving about 20 percentage points more cases than the next best system when using the same brain (a model called GPT-5-mini).

The paper also checked if this team worked with different "brains" (other AI models like Qwen3-Coder and DeepSeek-V3.2). It did! The system worked well across all of them, suggesting that the process of being a detective is more important than just having the smartest single detective.

What It's NOT

The paper is very clear about what ReProAgent is not. It is not a magic wand that fixes the bugs itself. Its job is strictly to write the test that proves the bug exists. However, the authors found that when they gave these tests to other systems that do fix bugs, those systems got better. For example, when ReProAgent's tests were used to help a system called SWE-agent, the number of successfully fixed issues went from 143 to 153.

The Cost

Being a super-detective costs a little bit of money. The paper calculated that running ReProAgent costs about $0.14 per case. This is slightly more expensive than some simpler methods (which cost around $0.11), but the paper argues it's worth the extra few cents because it actually solves the problem much more often. Most of the time, the system only needed to run its "sting operation" about 1.29 times on average before getting it right.

The Bottom Line

The paper suggests that to solve complex software mysteries, you can't just rely on a quick guess based on a few words. You need a structured, multi-stage investigation that looks at the whole picture, traces the path of the error, and double-checks the evidence. ReProAgent shows that when you give AI agents a proper workflow to follow, they can become incredibly effective at finding and proving software bugs, turning a blurry witness note into a crystal-clear case file.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →