Lune

ICSE2026Top-tier venue

AssertFlip: Reproducing Bugs via Inversion of LLM-Generated Passing Tests

Lara Khatib, Noble Saji Mathews, Meiyappan Nagappan

Abstract

Bug reproduction is critical in the software debugging and repair process, yet the majority of bugs in open-source and industrial settings lack executable tests to reproduce them at the time they are reported, making diagnosis and resolution more difficult and time-consuming. To address this challenge, we introduce AssertFlip, a novel technique for automatically generating Bug Reproducible Tests (BRTs) using large language models (LLMs). Unlike existing methods that attempt direct generation of failing tests, AssertFlip first generates passing tests on the buggy behaviour and then inverts these tests to fail when the bug is present. We hypothesize that LLMs are better at writing passing tests than ones that crash or fail on purpose. Our results show that AssertFlip outperforms all known techniques in the leaderboard of SWT-Bench, a benchmark curated for BRTs. Specifically, AssertFlip achieves a fail-to-pass success rate of 43.6% on the SWT-Bench-Verified subset.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents cites Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
  • iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation cites SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  • iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation cites SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
  • iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation cites Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection
  • iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation cites Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
  • SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering cites Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
  • Can Old Tests Do New Tricks for Resolving SWE Issues? cites SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  • Can Old Tests Do New Tricks for Resolving SWE Issues? cites Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection
  • Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection cites Can Old Tests Do New Tricks for Resolving SWE Issues?
  • Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection cites SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  • Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection cites SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
  • Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and Selection cites Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Heterogeneous Prompting and Execution Feedback for SWE Issue Test Generation and SelectionToufique Ahmed, Jatin Ganhotra, Avraham Shinnar, Martin HirzelICSE 2026 · 2 citations
  2. iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test GenerationJunyi Wang, Jialun Cao, Zhongxin LiuFSE 2026
  3. Can Old Tests Do New Tricks for Resolving SWE Issues?Yang Chen, Toufique Ahmed, Reyhaneh Jabbarvand, Martin HirzelFSE 2026

Builds on10

  1. SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret et al.NeurIPS 2024 · 2,059 citations
  2. CRITIC: Large Language Models Can Self-Correct with Tool-Interactive CritiquingZhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen et al.ICLR 2024 · 699 citations
  3. SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code AgentsNiels Mündler, Mark Niklas Müller, Jingxuan He, Martin T. VechevNeurIPS 2024 · 172 citations
  4. Large Language Models are Few-shot Testers: Exploring LLM-based General Bug ReproductionSungmin Kang, Juyeon Yoon, Shin YooICSE 2023 · 163 citations
  5. Automated Program Repair via Conversation: Fixing 162 out of 337 Bugs for $0.42 Each using ChatGPTChunqiu Steven Xia, Lingming ZhangISSTA 2024 · 105 citations

Related papers

  1. Generating Failure-Based Oracles to Support Testing of Reported Bugs in Android AppsJack Johnson, Junayed Mahmud, Oscar Chaparro, Kevin Moran et al.ASE 2025 · 1 citation
  2. ReproCopilot: LLM-Driven Failure Reproduction with Dynamic RefinementTanakorn Leesatapornwongsa, Fazle Elahi Faisal, Suman NathFSE 2025
  3. Prompting Is All You Need: Automated Android Bug Replay with Large Language ModelsSidong Feng, Chunyang ChenICSE 2024 · 143 citations
  4. A Quantitative and Qualitative Evaluation of LLM-Based Explainable Fault LocalizationSungmin Kang, Gabin An, Shin YooFSE 2024 · 69 citations
  5. Issue2Test: Generating Reproducing Test Cases from Issue ReportsNoor Nashid, Islem Bouzenia, Michael Pradel, Ali MesbahICSE 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines