Source note3 min read

SWE-Doctor: Guiding Software Engineering Agents with Runtime Diagnosis from Multi-Faceted Bug Reproduction Tests

Source

arXiv

arxiv.org/abs/2607.00990v1

Read the source

Source

Plain-Language Brief

Researchers propose a new software agent called SWE-Doctor that uses multiple bug reproduction tests (BRTs) to generate more effective patches for resolving software issues. The agent first generates multi-faceted BRTs, executes and debugs them, constructs runtime diagnosis records, and then uses the diagnoses to guide patch generation and reduce partial patches. SWE-Doctor outperforms existing agents on Python bug-fixing issues from two widely adopted datasets.

What the Document Says

  • SWE-Doctor is a software agent that guides patch generation with runtime diagnoses derived from multi-faceted BRT executions.
  • The agent generates multi-faceted BRTs for different behavioral requirements stated in the issue.
  • It executes and debugs these BRTs to construct runtime-grounded diagnosis records.
  • SWE-Doctor uses the diagnoses together with localization information inferred during BRT generation to guide patch generation.
  • The goal is to reduce partial patches and improve the resolution of software issues.

Key Concepts Mentioned

  • software engineering agents
  • patch generation
  • bug reproduction tests (BRTs)
  • runtime diagnoses
  • multi-faceted BRT executions

Claims Made by the Document

  • SWE-Doctor outperforms existing agents in resolving software issues.
  • On the SWE-bench Verified dataset, SWE-Doctor achieves an average resolution rate of 75.7%.

Evidence Used

  • SWE-Doctor consistently outperforms existing agents across all 10 LLM-benchmark combinations.
  • We evaluate SWE-Doctor on Python bug-fixing issues from the widely adopted SWE-bench Verified and SWE-bench Pro

Methods / Approach

  • generating multi-faceted BRTs
  • executing and debugging these BRTs
  • constructing runtime diagnosis records
  • guiding patch generation using diagnoses and localization information

Limitations Stated by the Authors

It is unclear whether direct use of advanced BRT generators to guide patch generation is beneficial.

Limitations Noted by the Agent

Agent interpretation — not from the source.

Not stated in source

Open Questions

  • What are the specific LLM backends used for evaluation?
  • How does SWE-Doctor perform on non-Python datasets?

Notes for Future Q&A

May include interpretation. Labeled where it does.

  • The text mentions 10 LLM-benchmark combinations but does not specify the individual benchmarks or their components.
  • The study focuses on Python bug-fixing issues, so it is unclear how SWE-Doctor would perform on other programming languages.

Raw Abstract / Excerpt

Large language model (LLM)-based software engineering agents are increasingly developed to resolve software issues by generating patches from issue reports and code repositories. Bug reproduction tests (BRTs) are an important building block for such agents and have been shown useful for patch validation. However, it remains unclear whether BRTs can also help the more central stage of patch generation. We first conduct a preliminary study and find that directly using advanced BRT generators to guide patch generation is not beneficial: fail-to-fail BRTs can mislead agents, while even fail-to-pass BRTs bring limited or negative gains. Our analysis reveals two reasons: fail-to-pass BRTs may cover only one manifestation of the reported issue, leading to partial patches, whereas fail-to-fail BRTs are unreliable as direct patch-generation targets. Motivated by these insights, we propose SWE-Doctor, a software issue resolution agent that guides patch generation with runtime diagnoses derived from multi-faceted BRT executions. SWE-Doctor first generates multi-faceted BRTs for different behavioral requirements stated in the issue, then executes and debugs these BRTs to construct runtime-grounded diagnosis records, and finally uses the diagnoses together with localization information inferred during BRT generation to guide patch generation and reduce partial patches. We evaluate SWE-Doctor on Python bug-fixing issues from the widely adopted SWE-bench Verified and SWE-bench Pro across five LLM backends. SWE-Doctor consistently outperforms existing agents across all 10 LLM-benchmark combinations, achieving average resolution rates of 75.7% on SWE-bench Verified and 59.4% on SWE-bench Pro. In particular, on the more challenging SWE-bench Pro, SWE-Doctor improves the average resolution rate by 8.0-8.9 percentage points over the baseline agents.