@inproceedings{kulkarni-etal-2026-debug,
title = "Debug or Regenerate? Test-Guided Selection for {LLM} Code Repair",
author = "Kulkarni, Atharv and
Prasad, Archiki and
Srikumar, Vivek and
Stengel-Eskin, Elias and
Lee, Hyunji and
Bansal, Mohit",
editor = "Lee, Hung-Yi and
Dev, Sunipa and
Li, Jessy and
Elliott, Desmond",
booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {EMNLP} 2026",
month = oct,
year = "2026",
address = "Budapest, Hungary",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.findings-emnlp.2173/",
pages = "46494--46508",
ISBN = "979-8-89176-462-0",
abstract = "Large language models (LLMs) are increasingly used as coding assistants, but the programs they generate often fail. Such failures can be addressed by debugging the existing implementation or regenerating a new solution from the problem specification, with existing repair workflows typically defaulting to debugging. We find that the effectiveness of debugging and regeneration depends strongly on initial program quality, suggesting that no single repair strategy is universally optimal. Motivated by this observation, we present PATSSEL (Program-Adaptive Test-guided Repair Strategy Selection), a test-guided repair selection framework that dynamically chooses between debugging and regeneration. Rather than committing to a single repair strategy, PATSSEL generates debugged and regenerated candidates for each buggy program, evaluates them using generated verifier tests, and selects the stronger candidate, leveraging the complementary strengths of debugging and regeneration. Experiments on LeetCodeDataset, LiveCodeBench, and HE+Fix show that PATSSEL achieves average absolute improvements of 2.7{\%} with Qwen3-8B and 3.2{\%} with Llama3-8B over the best single-strategy baselines under the same inference compute budget and routing using gold unit tests. The gains persist across repair models, routing models, and stronger debugger models. Further analysis shows that PATSSEL benefits from the complementary strengths of debugging and regeneration, highlighting the importance of adaptive strategy selection for reliable LLM-based code repair."
}<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3">
<mods ID="kulkarni-etal-2026-debug">
<titleInfo>
<title>Debug or Regenerate? Test-Guided Selection for LLM Code Repair</title>
</titleInfo>
<name type="personal">
<namePart type="given">Atharv</namePart>
<namePart type="family">Kulkarni</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Archiki</namePart>
<namePart type="family">Prasad</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Vivek</namePart>
<namePart type="family">Srikumar</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Elias</namePart>
<namePart type="family">Stengel-Eskin</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Hyunji</namePart>
<namePart type="family">Lee</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Mohit</namePart>
<namePart type="family">Bansal</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<originInfo>
<dateIssued>2026-10</dateIssued>
</originInfo>
<typeOfResource>text</typeOfResource>
<relatedItem type="host">
<titleInfo>
<title>Findings of the Association for Computational Linguistics: EMNLP 2026</title>
</titleInfo>
<name type="personal">
<namePart type="given">Hung-Yi</namePart>
<namePart type="family">Lee</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Sunipa</namePart>
<namePart type="family">Dev</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Jessy</namePart>
<namePart type="family">Li</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Desmond</namePart>
<namePart type="family">Elliott</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<originInfo>
<publisher>Association for Computational Linguistics</publisher>
<place>
<placeTerm type="text">Budapest, Hungary</placeTerm>
</place>
</originInfo>
<genre authority="marcgt">conference publication</genre>
<identifier type="isbn">979-8-89176-462-0</identifier>
</relatedItem>
<abstract>Large language models (LLMs) are increasingly used as coding assistants, but the programs they generate often fail. Such failures can be addressed by debugging the existing implementation or regenerating a new solution from the problem specification, with existing repair workflows typically defaulting to debugging. We find that the effectiveness of debugging and regeneration depends strongly on initial program quality, suggesting that no single repair strategy is universally optimal. Motivated by this observation, we present PATSSEL (Program-Adaptive Test-guided Repair Strategy Selection), a test-guided repair selection framework that dynamically chooses between debugging and regeneration. Rather than committing to a single repair strategy, PATSSEL generates debugged and regenerated candidates for each buggy program, evaluates them using generated verifier tests, and selects the stronger candidate, leveraging the complementary strengths of debugging and regeneration. Experiments on LeetCodeDataset, LiveCodeBench, and HE+Fix show that PATSSEL achieves average absolute improvements of 2.7% with Qwen3-8B and 3.2% with Llama3-8B over the best single-strategy baselines under the same inference compute budget and routing using gold unit tests. The gains persist across repair models, routing models, and stronger debugger models. Further analysis shows that PATSSEL benefits from the complementary strengths of debugging and regeneration, highlighting the importance of adaptive strategy selection for reliable LLM-based code repair.</abstract>
<identifier type="citekey">kulkarni-etal-2026-debug</identifier>
<location>
<url>https://aclanthology.org/2026.findings-emnlp.2173/</url>
</location>
<part>
<date>2026-10</date>
<extent unit="page">
<start>46494</start>
<end>46508</end>
</extent>
</part>
</mods>
</modsCollection>
%0 Conference Proceedings
%T Debug or Regenerate? Test-Guided Selection for LLM Code Repair
%A Kulkarni, Atharv
%A Prasad, Archiki
%A Srikumar, Vivek
%A Stengel-Eskin, Elias
%A Lee, Hyunji
%A Bansal, Mohit
%Y Lee, Hung-Yi
%Y Dev, Sunipa
%Y Li, Jessy
%Y Elliott, Desmond
%S Findings of the Association for Computational Linguistics: EMNLP 2026
%D 2026
%8 October
%I Association for Computational Linguistics
%C Budapest, Hungary
%@ 979-8-89176-462-0
%F kulkarni-etal-2026-debug
%X Large language models (LLMs) are increasingly used as coding assistants, but the programs they generate often fail. Such failures can be addressed by debugging the existing implementation or regenerating a new solution from the problem specification, with existing repair workflows typically defaulting to debugging. We find that the effectiveness of debugging and regeneration depends strongly on initial program quality, suggesting that no single repair strategy is universally optimal. Motivated by this observation, we present PATSSEL (Program-Adaptive Test-guided Repair Strategy Selection), a test-guided repair selection framework that dynamically chooses between debugging and regeneration. Rather than committing to a single repair strategy, PATSSEL generates debugged and regenerated candidates for each buggy program, evaluates them using generated verifier tests, and selects the stronger candidate, leveraging the complementary strengths of debugging and regeneration. Experiments on LeetCodeDataset, LiveCodeBench, and HE+Fix show that PATSSEL achieves average absolute improvements of 2.7% with Qwen3-8B and 3.2% with Llama3-8B over the best single-strategy baselines under the same inference compute budget and routing using gold unit tests. The gains persist across repair models, routing models, and stronger debugger models. Further analysis shows that PATSSEL benefits from the complementary strengths of debugging and regeneration, highlighting the importance of adaptive strategy selection for reliable LLM-based code repair.
%U https://aclanthology.org/2026.findings-emnlp.2173/
%P 46494-46508
Markdown (Informal)
[Debug or Regenerate? Test-Guided Selection for LLM Code Repair](https://aclanthology.org/2026.findings-emnlp.2173/) (Kulkarni et al., Findings 2026)
ACL
- Atharv Kulkarni, Archiki Prasad, Vivek Srikumar, Elias Stengel-Eskin, Hyunji Lee, and Mohit Bansal. 2026. Debug or Regenerate? Test-Guided Selection for LLM Code Repair. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 46494–46508, Budapest, Hungary. Association for Computational Linguistics.