AutoCodeRover: Autonomous Program Improvement

  • 2024-07-25 17:54:41
  • Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, Abhik Roychoudhury
  • 0

Abstract

Researchers have made significant progress in automating the softwaredevelopment process in the past decades. Recent progress in Large LanguageModels (LLMs) has significantly impacted the development process, wheredevelopers can use LLM-based programming assistants to achieve automatedcoding. Nevertheless, software engineering involves the process of programimprovement apart from coding, specifically to enable software maintenance(e.g. bug fixing) and software evolution (e.g. feature additions). In thispaper, we propose an automated approach for solving GitHub issues toautonomously achieve program improvement. In our approach called AutoCodeRover,LLMs are combined with sophisticated code search capabilities, ultimatelyleading to a program modification or patch. In contrast to recent LLM agentapproaches from AI researchers and practitioners, our outlook is more softwareengineering oriented. We work on a program representation (abstract syntaxtree) as opposed to viewing a software project as a mere collection of files.Our code search exploits the program structure in the form of classes/methodsto enhance LLM's understanding of the issue's root cause, and effectivelyretrieve a context via iterative search. The use of spectrum-based faultlocalization using tests, further sharpens the context, as long as a test-suiteis available. Experiments on SWE-bench-lite (300 real-life GitHub issues) showincreased efficacy in solving GitHub issues (19% on SWE-bench-lite), which ishigher than the efficacy of the recently reported SWE-agent. In addition,AutoCodeRover achieved this efficacy with significantly lower cost (on average,$0.43 USD), compared to other baselines. We posit that our workflow enablesautonomous software engineering, where, in future, auto-generated code fromLLMs can be autonomously improved.

 

Quick Read (beta)

loading the full paper ...