Agentic Repository Mining: A Multi-Task Evaluation
This paper demonstrates that LLM agents capable of dynamically exploring software repositories via bash commands achieve competitive classification accuracy compared to pre-engineered context approaches while offering superior robustness against context-window limitations and scaling independently of artifact size.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to figure out what a specific piece of code in a massive software project actually does. Is it fixing a bug? Is it just a typo? Is it a security risk?
In the past, humans had to do this detective work. They would read the code, look at related files, check the history, and make a judgment call. This is slow, expensive, and sometimes people get tired and make mistakes.
Recently, we've tried using AI (Large Language Models, or LLMs) to do this. But there's a catch: Context is King.
The Two Detectives: The "Briefcase" vs. The "Explorer"
The paper compares two ways of using AI to solve these puzzles:
1. The "Briefcase" Detective (Simple LLM)
Imagine a detective who is handed a single, pre-packed briefcase. Inside is a specific file, a specific comment, and maybe a summary of the project. The detective is told, "Read only what's in this briefcase and tell me what's going on."
- The Problem: If the case is too heavy (too much text), the detective's brain overflows, and they can't answer. If the briefcase is missing a crucial clue (like a file from three folders up), the detective has to guess, often getting it wrong.
- The Paper's Finding: These detectives are cheap and fast, but they struggle when the "briefcase" gets too big or when they need to look outside the box.
2. The "Explorer" Detective (Agentic LLM)
Now, imagine a detective who is dropped into the actual software factory with a set of standard tools (like a flashlight, a magnifying glass, and a map). They are given a starting point (e.g., "Look at this specific line of code").
- How they work: They don't wait for a briefcase. They walk around. They open the door to the next room (
ls), read the specific page they need (cat), search for a keyword (grep), and check the history logs (git log). They only read what they need to solve the specific puzzle. - The Paper's Finding: These detectives are a bit more expensive (they take more time and "tokens" to think) and move slower because they have to walk around. However, they never get overwhelmed by a huge factory because they only pick up the clues they need. They are much more robust.
The Big Experiment
The researchers tested these two detectives on four different types of "puzzles" found in software:
- Tangled Commits: Is this line of code actually fixing a bug, or is it just cleaning up whitespace?
- Security Reviews: Is this comment in a code review talking about a security hole?
- Maintenance: Is this update fixing a bug, adapting to a new system, or just making things prettier?
- Project Type: Is this GitHub repository a real software project, or just a student's homework assignment?
They ran nearly 5,000 tests.
The Results: Who Won?
Accuracy: It was a tie.
Surprisingly, the "Explorer" (Agent) was just as accurate as the "Briefcase" (Simple LLM), even though the Explorer had to find the clues itself while the Briefcase was handed the clues. This is a big deal because it means the AI can figure out what to look for without a human having to pre-select the files.
Robustness (The Real Winner):
The "Briefcase" detectives kept failing when the files were too big. Their "briefcases" got too heavy, and they crashed (this is called a "context overflow").
The "Explorer" detectives never crashed. They just kept walking, reading only the small bits they needed, no matter how huge the software project was.
Cost:
The Explorers were more expensive (about 1.2 to 3 times the cost), but only because they took more steps. However, if the project is huge, the Explorers actually become cheaper because the Briefcase detectives crash and have to be restarted or fail entirely.
The "Ground Truth" Surprise
The researchers also looked at cases where both detectives disagreed with the human experts (the "Ground Truth").
They found that often, the human experts were wrong or the rules were confusing.
- Example: Sometimes a human labeled a change as "unclear" because they didn't have enough context. The "Explorer" AI, having walked around the whole factory, found the missing piece of evidence and gave a clear answer.
- The Lesson: The "correct" answer might actually be the one the AI found, not the one the human originally wrote down. The AI's ability to see the whole picture revealed that the original labels were sometimes based on limited information.
Summary in One Sentence
Using AI agents that can "walk around" and search a code repository themselves is just as smart as giving AI a pre-packaged summary, but it's much more reliable when the code is huge, and it often reveals that the original human labels were missing important context.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.