← Latest papers
💻 computer science

Compressing Code Context for LLM-based Issue Resolution

The paper proposes SWEzze, a novel framework utilizing Oracle-guided Code Distillation to train a lightweight model that effectively compresses code context by filtering noise while preserving essential fix ingredients, thereby significantly reducing token costs and improving GitHub issue resolution rates across frontier LLMs.

Original authors: Haoxiang Jia, Earl T. Barr, Sergey Mechtaev

Published 2026-03-31
📖 4 min read☕ Coffee break read

Original authors: Haoxiang Jia, Earl T. Barr, Sergey Mechtaev

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 master detective (the AI) trying to solve a complex crime (a software bug) in a massive, chaotic city (a huge codebase).

The Problem: Too Much Clutter

Currently, when the detective arrives at the scene, the police hand them a box containing everything: every single street, every building, every person's diary, and every piece of trash from the entire city.

  • The Cost: Carrying this massive box is expensive and slow.
  • The Confusion: The detective gets overwhelmed. The important clues (the "fix ingredients") are buried under tons of irrelevant noise. The detective gets distracted and might miss the real solution.

Existing tools try to help by just "summarizing" the box or throwing away random things. But this is dangerous. If you summarize a crime scene too much, you might throw away the one specific fingerprint that solves the case, even if it looks like a tiny speck of dust.

The Solution: The "Smart Filter" (SWEzze)

The authors of this paper built a new system called SWEzze. Think of it as a super-intelligent, magical sieve that sits between the police (who gather the evidence) and the detective (the AI).

Here is how it works, using a cooking analogy:

1. The "Oracle" Chef (Training the System)

To teach SWEzze what to keep, the researchers used a "Master Chef" (an Oracle).

  • The Master Chef is given a giant, messy pantry (the full code context) and a specific recipe (the bug fix).
  • The Chef tries to cook the dish using different combinations of ingredients.
  • The Magic: The Chef systematically removes ingredients one by one. If the dish still tastes perfect without a specific ingredient, that ingredient is "noise" and gets thrown out. If the dish fails without it, that ingredient is a "fix ingredient" and is saved.
  • The result is a Minimal Sufficient Context: the absolute smallest, perfect set of ingredients needed to cook the dish.

2. The Student Chef (SWEzze)

SWEzze is the student chef who watches the Master Chef do this thousands of times.

  • It learns to recognize patterns: "Ah, when the recipe involves a 'spicy' bug, I need to keep the 'chili' function, even if it's far away in the pantry. But I can throw away the 'salt' function because it's just generic noise."
  • It learns to distinguish between essential ingredients (variables, specific logic) and distracting clutter (unused helper functions, irrelevant comments).

3. The Final Result

When a real bug comes in:

  1. The police gather a huge pile of evidence (the initial context).
  2. SWEzze quickly sifts through it, keeping only the "fix ingredients" and tossing the rest.
  3. The detective (the AI) gets a small, clean, perfectly organized evidence box.
  4. The Outcome: The detective solves the crime faster, spends less money on the investigation, and makes fewer mistakes because they aren't distracted by the trash.

Why This is a Big Deal

  • It's Smarter than "Summarizing": Old tools tried to summarize the code like a news headline. SWEzze understands the structure of the code. It knows that if you remove a specific definition, the whole program breaks, so it keeps that definition even if it seems boring.
  • It Saves Money: By cutting the amount of data the AI has to read by about 6 times, it saves a huge amount of computing power (and money).
  • It Works Better: Surprisingly, by giving the AI less information (but the right information), the AI actually solved more bugs than when it was given the full, messy context. It's like how a detective solves a case better when they focus on the key witness rather than interviewing 1,000 irrelevant bystanders.

In a Nutshell

This paper introduces a tool that acts like a smart editor for AI. Instead of feeding the AI a 100-page novel to find one sentence, SWEzze cuts the novel down to just the one page that matters, ensuring the AI can read it quickly, understand it perfectly, and fix the problem without getting lost in the noise.

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 →