IssueExec: A Test-Driven Approach for Localizing Software Engineering Issues
This paper proposes IssueExec, a novel test-driven approach that leverages domain-enhanced test representations and hierarchical trace analysis to bridge the semantic gap between issue descriptions and code, achieving state-of-the-art performance in localizing software engineering issues by significantly improving recall and resolution rates.
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, chaotic library. The library represents a huge piece of computer software, and the mystery is a "bug"—a mistake that makes the software act weird. Usually, when someone reports a bug, they write a note in plain English, like "The map won't load when I click here." Your job is to find the exact page in the library where the mistake is hiding so you can fix it. This is called "issue localization."
For a long time, detectives tried to solve this by reading the plain English note and guessing which page in the library it matched. But this is like trying to find a specific book by looking for the word "map" in a library where the books are organized by "geography," "cartography," and "navigation," and the note just says "map." The words don't match, and the library is too big to search every shelf. The paper you are about to read suggests a brilliant new way to solve this: instead of guessing, use the library's own "practice tests." These are like rehearsal scripts that librarians run to make sure the books are in the right order. The authors suggest that these scripts act as a secret bridge, translating the messy human note into the precise language of the library shelves, making the search for the bug much faster and more accurate.
The Problem: The "Vocabulary Gap"
The authors of this paper, a team of researchers from China and Singapore, noticed a frustrating pattern in how computers try to fix software bugs. When a human says, "The serverless feature isn't working," the computer often looks for code named "serverless." But in the real world, the code might be named something technical like _get_db_cluster_kwargs (which is just a fancy way of saying "get the settings for the database cluster").
It's like if you asked a librarian for a "book about space," and they only looked for books with the word "space" in the title, missing the ones actually about "astronomy" or "cosmology." This mismatch between what humans say (requirements) and how programmers name things (code) creates a huge "semantic gap." Existing tools try to jump this gap directly, but they often stumble, leading to long, expensive searches where the computer guesses wrong.
The New Idea: Tests as "Executable Requirements"
The paper proposes a clever detour. Instead of jumping straight from the bug report to the code, the authors suggest going through the tests.
Think of a software test as a "practice run" or a "rehearsal." A programmer writes a test to check if a feature works. Crucially, the name of the test often sounds exactly like the bug report. If the bug is about "Serverless," the test might be named test_create_serverless_db_cluster.
The authors argue that tests are the perfect middleman because they are executable requirements. They are written in human-readable language (like the bug report) but are also tightly connected to the actual code (because they have to run and pass). By finding the right test first, you create a "two-hop" path:
- Bug Report Test (Easy match: both use words like "serverless").
- Test Code (Guaranteed match: the test actually runs the code).
The Theory: Reducing the "Confusion"
Before building their tool, the authors did some math to see if this idea actually makes sense. They used a concept called "entropy," which is a fancy way of measuring confusion or uncertainty. Imagine you are looking for a needle in a haystack.
- Direct Search: If you just guess based on the bug report, you might have to look at 10,000 needles. That's high confusion.
- Test-Mediated Search: If you first find the right "box" (the test) that contains the needle, you might only have to look at 100 needles.
Their calculations showed that using tests as a middleman reduces the "confusion" by an average of 7.73 bits. In plain English, this means the search space becomes significantly smaller and more focused, making it much easier to find the right spot.
The Solution: IssueExec
To put this theory into practice, the team built a tool called IssueExec. It works in three main steps:
- Smart Test Retrieval: The tool looks at the bug report and tries to find the matching test. But it knows that programmers use abbreviations and inside jokes. So, it digs into the project's history (like reading old commit messages) to learn that "tz" means "timezone" or "ovr" means "OneVsRestClassifier." This helps it understand the test names better than a standard computer search could.
- Trace Analysis: Once it finds the right test, it doesn't just stop there. It runs the test and watches exactly which lines of code the test touches. This creates a "trace," like a breadcrumb trail. However, tests often touch too much code, including boring infrastructure stuff that has nothing to do with the bug.
- Noise Filtering: The tool uses a smart AI to look at the breadcrumb trail and filter out the noise. It asks, "Which of these touched lines actually caused the problem?" It ignores the boring parts and highlights the specific functions that are likely the culprits.
The Results: A Big Win
The team tested IssueExec on a famous benchmark called SWE-bench Lite, which contains 300 real-world software bugs. The results were impressive:
- Better Accuracy: IssueExec found the correct code location (at the function level) 41.57% more often than the previous best method.
- More Fixes: When they plugged IssueExec into an automated fixing system (called Agentless), that system solved 17.72% more bugs than before.
- Cost Efficiency: Even though it does extra work (running tests and analyzing traces), it actually saved money compared to other complex methods, costing about 35% less on average per bug.
What It Can't Do (The Limits)
The authors are honest about where their tool might fail.
- Missing Tests: If the software project doesn't have a test that covers the specific buggy code, IssueExec can't find it. Their study showed that existing tests cover about 96.98% of the files that need fixing, but that still leaves a small gap (about 33.30% of specific functions) where the tool might get stuck.
- Deep Mazes: Sometimes, the code path is so long and twisted (like a deep underground tunnel system) that the tool gets lost in the middle layers and misses the final destination.
Why This Matters
This paper suggests that we don't need to teach computers to be better at guessing human language. Instead, we should teach them to use the tools developers already have: the tests. By treating tests as a bridge between human complaints and computer code, IssueExec turns a chaotic search into a guided tour. It suggests that the future of fixing software bugs isn't about bigger AI models guessing blindly, but about smarter, step-by-step reasoning using the evidence that's already there.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.