Search papers, labs, and topics across Lattice.
This paper introduces REAgent, a framework that leverages software requirements engineering principles to improve LLM-based patch generation for software issue resolution. REAgent constructs structured issue-oriented requirements, identifies low-quality requirements, and iteratively refines them to enhance patch correctness. Experiments on three benchmarks show REAgent outperforms state-of-the-art baselines by an average of 17.40% in the number of successfully resolved issues.
LLMs can generate significantly better software patches by first distilling issue descriptions into structured, refined requirements.
Issue resolution aims to automatically generate patches from given issue descriptions and has attracted significant attention with the rapid advancement of large language models (LLMs). However, due to the complexity of software issues and codebases, LLM-generated patches often fail to resolve corresponding issues. Although various advanced techniques have been proposed with carefully designed tools and workflows, they typically treat issue descriptions as direct inputs and largely overlook their quality (e.g., missing critical context or containing ambiguous information), which hinders LLMs from accurate understanding and resolution. To address this limitation, we draw on principles from software requirements engineering and propose REAgent, a requirement-driven LLM agent framework that introduces issue-oriented requirements as structured task specifications to better guide patch generation. Specifically, REAgent automatically constructs structured and information-rich issue-oriented requirements, identifies low-quality requirements, and iteratively refines them to improve patch correctness. We conduct comprehensive experiments on three widely used benchmarks using two advanced LLMs, comparing against five representative or state-of-the-art baselines. The results demonstrate that REAgent consistently outperforms all baselines, achieving an average improvement of 17.40% in terms of the number of successfully-resolved issues (% Resolved).