← Latest papers
💻 computer science

CodeCureAgent: Automatic Classification and Repair of Static Analysis Warnings

This paper introduces CodeCureAgent, an LLM-based agentic framework that automatically classifies and repairs static analysis warnings by iteratively gathering context and applying a three-step verification heuristic, achieving a 96.8% plausible fix rate and 86.3% correct fix rate on a large-scale Java dataset while significantly outperforming existing baselines.

Original authors: Pascal Joos, Islem Bouzenia, Michael Pradel

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

Original authors: Pascal Joos, Islem Bouzenia, Michael Pradel

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 the manager of a massive, bustling library (your software codebase). You hire a very strict, hyper-vigilant librarian (a Static Analysis Tool) to walk the aisles and point out any rule violations.

The librarian is great at finding problems: "This book is on the wrong shelf!" "This page is torn!" "This story has a plot hole!"

However, there's a catch:

  1. The Librarian is Overzealous: Sometimes, the librarian screams, "This book is missing a cover!" when the book is actually a special digital edition that doesn't need a cover. These are False Positives.
  2. The Fix is Hard: Sometimes the librarian is right, but fixing the problem requires moving books across three different rooms, rewriting the index, and checking if the new arrangement breaks the story. This is tedious for human managers.
  3. The Result: Because fixing these issues is so exhausting, human managers often just ignore the librarian's notes. The library gets messy, and eventually, the whole system becomes unreliable.

Enter CodeCureAgent.

Think of CodeCureAgent as a super-intelligent, tireless AI Intern who works alongside you. Instead of just blindly fixing everything the librarian points out, this AI has a three-step superpower: Detect, Decide, and Fix.

1. The Detective Phase (Classification)

Before the AI touches a single book, it acts like a detective.

  • The Old Way: Previous tools were like robots that blindly followed the librarian's orders. If the librarian said "Fix this," the robot tried to fix it, even if the librarian was wrong. This often broke things.
  • The CodeCure Way: The AI asks, "Wait a minute. Is the librarian actually right here?"
    • It reads the rulebook (the code documentation).
    • It looks at the specific book in context.
    • The Decision: If the librarian is wrong (a False Positive), the AI says, "Ignore this note," and puts a little 'Do Not Disturb' sign on it. If the librarian is right (a True Positive), it says, "Okay, we need to fix this."

2. The Architect Phase (Repair)

Once the AI decides a fix is needed, it doesn't just scribble a quick note. It acts like a master architect.

  • Context is King: If the librarian says, "This shelf is too high," the AI doesn't just lower the shelf. It checks if the books on the shelf above will fall, or if the person who usually reads them can still reach them. It looks at the whole library, not just one shelf.
  • Multi-Story Fixes: Sometimes fixing one problem requires moving books in the basement, the attic, and the main hall. The AI is smart enough to coordinate changes across multiple files (rooms) at once, something older tools couldn't do.

3. The Quality Control Phase (Validation)

This is the most important part. Before the AI hands the work back to you, it runs a rigorous Safety Check:

  1. Build Test: Does the library still stand? (Does the code compile?)
  2. Rule Check: Did the librarian stop screaming about this specific problem? (Does the warning disappear?)
  3. No New Problems: Did we accidentally create new messes while cleaning up the old one?
  4. The Story Test: Does the story still make sense? (Do the automated tests pass?)

If the fix fails any of these checks, the AI doesn't give up. It says, "Oops, that broke the story," and tries a different approach, using the feedback to learn and improve.

Why is this a Big Deal?

  • It's Cheaper than a Human: The paper says this AI costs about 2.9 cents (less than a penny!) and takes about 4 minutes per warning. A human developer might spend hours on the same task.
  • It's Smarter: In tests with 1,000 real-world warnings, this AI successfully fixed or correctly ignored 96.8% of them. The next best tools only managed about 60-70%.
  • It Stops the "Ignore" Habit: Because the AI does the boring, repetitive work so well, developers can finally stop ignoring the librarian's notes. This keeps the code clean, secure, and healthy.

In a nutshell: CodeCureAgent is an AI that doesn't just "fix bugs." It first figures out if the bug is real, then carefully fixes it without breaking anything else, and finally double-checks its own work. It turns a tedious, error-prone chore into a fast, reliable, and cheap process.

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 →