atlas

Research map / Large language models / Agents, code and math

Otter: Generating Tests from Issues to Validate SWE Patches

ICML 2025 · Large language models › Agents, code and math · approach: Software engineering agents · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces Otter, an LLM-based system with a self-reflective action planner and rule-based pre/post-processing that generates fail-to-pass tests from GitHub issues, plus the TDD-Bench-Verified benchmark and a coverage-aware tddScore metric.

Problem

Generating reproduction/acceptance tests from natural-language issue descriptions alone, before the code patch resolving the issue exists, so the tests must fail on old code and pass on the new code.

Approach

A three-stage pipeline (LLM-based test and focal localization, a self-reflective action planner that proposes read/write/modify actions with validation, and a test generator with import fixing), plus an ensemble (Otter++) that mixes heterogeneous prompts and selects tests using execution logs on the old code.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Otter instead of zero-shot test generationGPT-4o · TDD-Bench-Verifiedfail-to-pass tests (%): 18.7 -> 31.4Helped
Use Otter++ ensemble instead of OtterGPT-4o · TDD-Bench-Verifiedfail-to-pass tests (%): 31.4 -> 37.0Helped
Use Otter instead of SWE-Agent+GPT-4o test generation on SWT-Lite · SWT-Litefail-to-pass tests (%): 19.2 -> 25.4Helped
Remove action planning (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 23.6Hurt
Remove plan refinement (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 27.5Hurt
Remove action validation (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 25.7Hurt
Remove focal localization (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 25.2Hurt
Remove test localization (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 24.2Hurt
Remove both focal and test localization (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 24.2Hurt
Remove import fixing (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 26.7Hurt
Remove imports from generation prompt (ablation)Otter with GPT-4o · TDD-Bench-VerifiedtddScore: 29.4 -> 26.7Hurt
Use five heterogeneous prompts instead of five high-temperature samplesOtter++ with GPT-4o · TDD-Bench-VerifiedTop-1 fail-to-pass tests: 146 -> 166Helped

Surprising findings

Limitations

Experimental setup

Datasets: SWE-bench SWE-bench Verified SWT-bench Lite

Benchmarks: TDD-Bench-Verified SWT-bench Lite SWE-bench Verified

Metrics: fail-to-pass rate tddScore coverage precision recall cost per sample

Baselines: Zero-shot test file generation LIBRO SWE-Agent SWE-Agent+ AutoCodeRover ZeroShotPlus

Builds on: SWE-bench SWE-bench Verified Agentless CodeT

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy