LLM program repair tool RECAP slashes verbose patch bloat by 99%
New adapter RECAP reduces LLM-generated patch verbosity by 99% without sacrificing fixes
Researchers propose RECAP, a lightweight, plug-and-play adapter that refines LLM-generated code patches after generation. On SWE-bench Verified, RECAP cuts average patch size from +242.14% to +4.24% and net changes from +348.24% to -39.75% relative to developer patches, while preserving or improving resolution by up to 42 instances. The approach decouples patch minimization from generation, showing that minimality is more than just syntactic compression and offering a practical path to more reviewable AI-powered repairs.
- LLM-generated patches are 121.78% larger and 83.91% more complex than developer patches on average (SWE-bench Verified benchmark)
- RECAP reduces patch verbosity by 99% (total changes from +242% to +4.24%) without sacrificing correctness
- The adapter uses supervised fine-tuning and preference optimization to learn minimal patch patterns from paired examples
Why It Matters
RECAP transforms verbose AI patches into reviewable, developer-like fixes saving hours of debugging time per PR