← Latest papers
💻 computer science

How and Why Agents Can Identify Bug-Introducing Commits

This paper demonstrates that LLM-based agents significantly outperform existing methods in identifying bug-introducing commits by deriving short, greppable patterns from fix commits to effectively search large candidate sets, thereby raising the F1-score on the Linux kernel dataset from 0.64 to 0.81.

Original authors: Niklas Risse, Marcel Böhme

Published 2026-04-01
📖 4 min read☕ Coffee break read

Original authors: Niklas Risse, Marcel Böhme

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 a detective trying to solve a mystery in a massive, ever-changing library.

The Mystery: A book (a piece of software) has a terrible typo or a broken page (a bug).
The Clue: Someone eventually wrote a note fixing the typo (a fix commit).
The Goal: You need to find the exact moment in history when the typo was first written into the book (the bug-introducing commit).

For 20 years, detectives have used a standard method called SZZ. It works like this: "If the fix removed a bad sentence, the bad sentence must have been written by the person who last touched that sentence." It's a decent guess, but it often gets confused. If the fix added a new sentence instead of removing an old one, the method hits a dead end. Even the best detectives in 2025 were only right about 64% of the time.

Enter the New Detective: The AI Agent

This paper introduces a new kind of detective: an AI Agent. Instead of just looking at the text, this agent has a superpower: it can talk to the library, search through thousands of years of history, and reason about why a mistake happened.

The researchers tried two different strategies with this AI detective.

Strategy 1: The "Binary Search" Detective (SZZ-Agent)

Imagine the library has a million books. The agent tries to find the bad book by splitting the library in half, checking the middle, and asking, "Is the bug in the first half or the second half?" It keeps cutting the search area in half until it finds the culprit.

  • Result: This was great! It raised the success rate to 77%.
  • The Surprise: The researchers realized the "cutting in half" part was actually slowing the agent down and costing too much money.

Strategy 2: The "Super Sniffer" (Simple-SZZ-Agent)

The researchers asked: "What if we just let the agent look at all the books at once?"
They expected the agent to get overwhelmed by the sheer number of books. Instead, they discovered something magical. The agent didn't read every book cover-to-cover. Instead, it acted like a super-sniffer.

The "Greppable Pattern" Analogy:
Imagine the fix note says: "We stopped using the fsleep function because it crashes the system."
The AI agent doesn't read the whole library. It instantly creates a mental "search term" (a pattern): fsleep.
It then runs a super-fast search (like using Ctrl+F on the entire library) to find every single time the word fsleep ever appeared.

  • It finds the first time fsleep was written.
  • Bingo! That's the moment the bug was introduced.

This strategy is so effective that the agent can find the needle in a haystack of 1,000 books just as fast as it can in a haystack of 10 books. It doesn't care how big the library is.

The Results: A Giant Leap

By using this "Super Sniffer" approach, the new AI detective raised the success rate from 64% (the old best) to 81%.

  • The Old Way: Like trying to find a lost key by checking every single drawer in a house one by one.
  • The New Way: Like using a metal detector that beeps the moment it gets close to the key, ignoring everything else.

Why Does This Matter?

  1. It's Smarter: The AI doesn't just look at what was deleted; it understands the story of the bug. It can even solve cases where the fix added code (which the old method couldn't do).
  2. It's Cheaper: Because the agent is so efficient at searching, it costs less money to run, even when looking at huge projects.
  3. It's a New Tool for Everything: The ability to turn a complex bug into a simple "search term" (a pattern) could help developers:
    • Understand why a bug happened in the first place.
    • Find similar bugs in other parts of the code.
    • Automatically write fixes for future bugs.

The Bottom Line

For two decades, software detectives were stuck making tiny, slow improvements. This paper shows that by giving AI agents simple tools (like a search function) and letting them "sniff" for patterns, we can solve these mysteries much faster, much cheaper, and much more accurately. It turns a tedious, manual search into a lightning-fast, intelligent hunt.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →