用分步测试修复漏洞,让大模型编程更精准可靠。
Repeton: Structured Bug Repair with ReAct-Guided Patch-and-Test Cycles
- 分步诊断+改代码+自动测试,逐步修复漏洞
- 在SWE-bench Lite上表现优于基于检索的方法
- 开源可复现,适合需要透明调试的开发者
大型语言模型在代码生成与理解方面表现出强大能力,但在复杂软件工程任务中常因精度低、可解释性差而受限。我们提出Repeton,一个完全开源的框架,利用大模型在真实Git仓库中实现精确且自动的代码操作。不同于一次性生成完整修复方案,Repeton通过结构化的补丁-测试循环运行:迭代诊断问题、提出代码变更,并通过自动化测试验证每个补丁。该过程由轻量级启发式规则和开发工具引导,无需依赖基于嵌入的检索系统。在SWE-bench Lite基准上的评估显示,该方法在补丁有效性和可解释性方面均优于基于RAG的方法。通过将软件工程任务分解为模块化、可验证的阶段,Repeton为可扩展、透明的自主调试提供了可行路径。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have shown strong capabilities in code generation and comprehension, yet their application to complex software engineering tasks often suffers from low precision and limited interpretability. We present Repeton, a fully open-source framework that leverages LLMs for precise and automated code manipulation in real-world Git repositories. Rather than generating holistic fixes, Repeton operates through a structured patch-and-test pipeline: it iteratively diagnoses issues, proposes code changes, and validates each patch through automated testing. This stepwise process is guided by lightweight heuristics and development tools, avoiding reliance on embedding-based retrieval systems. Evaluated on the SWE-bench Lite benchmark, our method shows good performance compared to RAG-based methods in both patch validity and interpretability. By decomposing software engineering tasks into modular, verifiable stages, Repeton provides a practical path toward scalable and transparent autonomous debugging.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。