gersteinlab/LocAgent

[ACL 2025] Graph-guided agentic framework for code localization https://arxiv.org/abs/2503.09089

What it solves

LocAgent addresses the difficulty of code localization—the process of identifying the exact files or code snippets that need to be changed to fix a bug or implement a feature. Traditional methods often struggle to navigate complex codebases and bridge the gap between natural language problem descriptions and the actual code elements.

How it works

LocAgent parses codebases into directed heterogeneous graphs that represent code structures and their dependencies. This lightweight graph representation allows an LLM agent to perform multi-hop reasoning, navigating through the codebase's dependencies to search for and locate relevant entities more effectively than simple text search.

Who it’s for

This framework is designed for developers and researchers working on automated software maintenance, AI-driven bug fixing, and LLM-based code analysis tools.

Highlights

  • Graph-Guided Navigation: Uses heterogeneous graphs to capture code dependencies for better search accuracy.
  • Multi-Hop Reasoning: Enables agents to traverse the codebase structure to find relevant code.
  • Fine-Tuned Models: Provides specialized versions of Qwen2.5-Coder (7B and 32B) optimized for code localization.
  • Benchmark Integration: Compatible with Loc-Bench and SWE-bench for evaluating localization accuracy.

Related

  • Project
  • Project
  • Project
  • Project
  • Project