← Latest papers
💻 computer science

SweRank: Software Issue Localization with Code Ranking

This paper introduces SweRank, an efficient retrieve-and-rerank framework for software issue localization that leverages the newly constructed SweLoc dataset to achieve state-of-the-art performance on benchmarks while surpassing the cost and latency of closed-source LLM agent-based approaches.

Original authors: Revanth Gangi Reddy, Tarun Suresh, JaeHyeok Doo, Ye Liu, Xuan Phi Nguyen, Yingbo Zhou, Semih Yavuz, Caiming Xiong, Heng Ji, Shafiq Joty

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

Original authors: Revanth Gangi Reddy, Tarun Suresh, JaeHyeok Doo, Ye Liu, Xuan Phi Nguyen, Yingbo Zhou, Semih Yavuz, Caiming Xiong, Heng Ji, Shafiq Joty

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 massive mystery inside a library that contains billions of books (the software code). A patron (the developer) comes to you with a complaint: "The book on page 4,000,000 is missing a chapter, and now the story doesn't make sense!"

Your job is Software Issue Localization: finding the exact page, chapter, or even the specific sentence in that giant library where the mistake happened, so you can fix it.

This paper introduces a new detective tool called SWERANK. Here is how it works, explained simply:

The Problem: The "Over-Thinker" vs. The "Overwhelmed"

Currently, there are two main ways to solve this mystery:

  1. The "Super-Detective" Agents (The Old Way):
    Imagine hiring a brilliant but expensive detective who has to physically walk through the library. They have to read a book, check the index, ask a librarian, walk to another shelf, read another book, and repeat this process 10 times before they find the mistake.

    • The Catch: This takes a long time (high latency) and costs a fortune (high API costs) because the detective is a high-paid AI (like Claude-3.5) who charges by the minute. Also, if they get distracted or make one wrong turn, the whole investigation fails.
  2. The "Keyword Search" (The Traditional Way):
    Imagine using a simple search engine that just looks for matching words. If the patron says "missing chapter," the engine finds every book that has the words "missing" and "chapter" in them.

    • The Catch: Software bugs are rarely described with simple keywords. They are described as messy stories like, "The app crashed when I tried to upload a photo, and now my screen is blue." Simple search engines get confused by these long, messy descriptions and can't find the right code.

The Solution: SWERANK (The "Smart Librarian")

The authors created SWERANK, which is like hiring a Smart Librarian who uses a two-step process to find the mistake instantly and cheaply.

Step 1: The Quick Scan (The Retriever)

First, the librarian has a super-fast memory. They don't read every word of every book. Instead, they look at the patron's messy complaint and instantly scan the entire library to pull out the top 50 most likely suspects (files or functions).

  • How they do it: They were trained on a massive new dataset called SWELOC. Think of SWELOC as a giant training manual made from thousands of real-life "complaints" and the "exact pages" where the errors were fixed in the past. This teaches the librarian to understand the story of a bug, not just the keywords.

Step 2: The Deep Dive (The Reranker)

Now, the librarian has 50 suspects. Instead of guessing, they take these 50 candidates and read them carefully side-by-side with the complaint. They act like a judge, saying, "Okay, Candidate A looks promising, but Candidate B actually matches the 'blue screen' story perfectly. Let's move Candidate B to the top of the list."

  • The Result: They produce a final, highly accurate list of the exact code that needs fixing.

Why is SWERANK a Game Changer?

  1. It's Cheaper: The "Super-Detective" agents cost about $0.66 per mystery to solve. SWERANK costs a tiny fraction of that (pennies) because it doesn't need to take 10 long walks through the library; it just does a quick scan and a focused review.
  2. It's Faster: The agents take minutes to solve a problem. SWERANK does it in seconds.
  3. It's Smarter: Because it was trained on SWELOC (real-world bug reports), it understands that a bug description is a "story of failure," not a "request for a new feature." It knows how to read between the lines of a messy complaint.

The Analogy of the "Training Data" (SWELOC)

The authors realized that previous training data was like teaching a mechanic how to build a car, but then asking them to fix a car that broke down. They built SWELOC, a dataset specifically made of "broken car stories" paired with the "exact wrench" needed to fix them. This allowed their model to learn the specific skill of finding the break, rather than just building things.

The Bottom Line

SWERANK proves that you don't need a slow, expensive, multi-step AI agent to fix software bugs. You just need a highly trained, efficient ranking system that can quickly narrow down the search and then intelligently pick the winner. It's the difference between hiring a detective to walk the whole city versus using a satellite map to pinpoint the exact house in seconds.

In short: It finds the needle in the haystack faster, cheaper, and more accurately than the current state-of-the-art methods.

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 →