← Latest papers
💻 computer science

Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection

This paper introduces e-Otter++, a novel test generator that overcomes the challenge of missing or incorrect code in software engineering issues by leveraging heterogeneous prompting and execution feedback to automatically create reproduction tests, achieving a state-of-the-art 63% fail-to-pass rate on the TDD-Bench Verified benchmark.

Original authors: Toufique Ahmed, Jatin Ganhotra, Avraham Shinnar, Martin Hirzel

Published 2026-01-26
📖 5 min read🧠 Deep dive

Original authors: Toufique Ahmed, Jatin Ganhotra, Avraham Shinnar, Martin Hirzel

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 are a detective trying to solve a mystery in a massive, messy library (the software code). A patron (the developer) comes to you and says, "Something is wrong with this book, but I can't explain exactly what, and I don't have a specific example of the mistake happening."

In the world of software, this is called an SWE Issue. Usually, to fix a bug, you need a "reproduction test"—a specific script that says, "If you do X, the library should crash." This proves the bug exists. But often, these scripts don't exist yet.

This paper introduces a new detective tool called e-Otter++. Its job is to automatically write that "crash script" (the test) just by reading the messy description of the problem, even before the actual fix has been written.

Here is how e-Otter++ works, explained through simple analogies:

1. The Problem: The "Blind" Detective

Usually, if you ask a smart AI (a Large Language Model) to write a test, it tries to guess. If you ask it once, it might get it wrong. If you ask it 10 times with the exact same instructions, it might just give you 10 slightly different versions of the same wrong guess. It's like asking a friend to describe a movie they only saw once; if you ask them 10 times, they might just repeat the same mistake.

2. The First Trick: "Heterogeneous Prompting" (The Costume Party)

To get better guesses, e-Otter++ doesn't just ask the AI the same question 10 times. Instead, it changes the way it asks the question, like putting the AI in different costumes or giving it different perspectives.

  • The "Masks": Imagine the AI is looking at a puzzle. Sometimes, e-Otter++ covers up parts of the puzzle (the code context) so the AI has to guess based on less information. Other times, it shows only specific pieces. This forces the AI to look at the problem differently.
  • The "Morphs": Imagine the bug report is written in confusing jargon. e-Otter++ asks the AI to rewrite the report in different styles:
    • The "Standardizer": Turns a messy note into a formal, structured report.
    • The "Simplifier": Removes confusing technical jargon to make it easy to understand.
    • The "Dropper": Removes specific code snippets that might be misleading (like telling the AI to use a tool the library doesn't actually have).
    • The "Pre-Thinker": Asks the AI to guess a solution first, then use that guess to write the test.

By mixing these "Masks" and "Morphs," e-Otter++ generates a huge, diverse pool of potential tests. It's like asking 10 different people to describe a crime scene, but giving each person a different set of clues and a different way of speaking. This increases the chance that at least one of them gets it right.

3. The Second Trick: "Execution Feedback" (The Trial Run)

Once the AI generates a test, e-Otter++ doesn't just trust it. It runs the test on the old code (the buggy version).

  • The Goal: The test must fail. But it must fail for the right reason.
  • The Problem: Sometimes the test fails because of a silly mistake (like a typo), not because of the actual bug.
  • The Fix: e-Otter++ has a "Critic" (another AI) that looks at the failure. If the test failed for the wrong reason, the Critic says, "No, that's not the bug. Here is the specific line that is wrong, and here is some extra code you need to look at." Then, the system rewrites the test with this new information. It keeps doing this loop until the test fails exactly as the bug description says it should.

4. The Third Trick: The "Surrogate" Patch (The Dummy Fix)

Here is the hardest part: To know if a test is good, it needs to pass on the new code (the fix). But the fix doesn't exist yet! How can you pick the best test?

e-Otter++ uses a clever workaround:

  1. It asks a different AI system (called Agentless) to generate a bunch of fake fixes (surrogate patches). These aren't perfect, but they are close.
  2. It runs all the candidate tests against these fake fixes.
  3. If a test passes on the fake fix, it's likely a good test.
  4. Finally, it picks the single best test based on which one covers the most important parts of the code.

The Results: A Big Leap Forward

The paper tested this system on two major benchmarks (TDD-Bench and SWT-bench).

  • Previous Best: The top systems could generate a working test about 37% to 38% of the time.
  • e-Otter++: By using these new tricks (changing how it asks questions and using fake fixes to filter answers), e-Otter++ raised the success rate to 63% on one benchmark and 52.5% on the other.

Why This Matters

The authors say this helps in two main ways:

  1. For Humans: It automates the boring part of "Test-Driven Development" (writing tests before fixing bugs), making it easier for developers to confirm bugs and fix them.
  2. For AI Agents: Many AI coding agents rely on these tests to know if they fixed a bug. By providing better tests, e-Otter++ helps other AI agents do their jobs better, too.

In short, e-Otter++ is a smarter, more creative, and more rigorous way to ask AI to write the "proof" that a software bug exists and has been fixed, without needing a human to write that proof first.

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 →