Codit-Bench
Can Large Language Models Find Bugs in Code Auditing?
Codit-Bench gives models a buggy repository snapshot, a function-level call graph that defines the scope, and a specification of expected behavior. With no bug report or program execution, models must identify the faulty functions and explain the root cause.
Leaderboard
Example task
Score vs. cost
Benchmark construction
1 Collect and analyze Static analysis of PR-fixed bugs Triggers, root causes, symptoms Execution-based verification
The pipeline analyzes the pre-fix code, issue, and pull request to confirm each bug and record its faulty functions, trigger conditions, and root cause. Where the original test environment is available, it checks the fix and verifies that reverting only the faulty functions brings the failure back.
2 Build call graph Hoare logic reasoning Root cause and causal chain Compact graph, minimal noise
The pipeline extracts candidate call relationships from the code. Using Hoare logic reasoning, an LLM treats each bug-triggering condition as a postcondition expressed in natural language and works backward to infer the preconditions in upstream callers. The pipeline discards infeasible paths and merges the retained paths into a bounded call graph.
3 Generate specification Expected behavior and context Bug–specification conflict Non-leakage
A model drafts the specification using the fixed code and call graph. An independent reviewer checks that it provides enough context, states a requirement the buggy version violates and the fix satisfies, and keeps the location, root cause, and fix hidden. The draft is revised and reviewed until it meets all three criteria.
4 Grade and classify Difficulty to find and explain Severity of consequences Assign a primary bug category
A scoring model rates four dimensions each for difficulty and criticality on a three-level scale. Difficulty covers reachability, trigger conditions, observability, and reasoning. Criticality covers functional damage, functional importance, impact scope, and recovery cost. Each bug is assigned a primary category.
Bug Finding versus Bug Fixing
In the SWE-Bench Pro comparison, fixing pass rates exceeded finding pass rates by 48–50 percentage points across the models. Among successful fixes, 74–86% involved bugs that the models failed to find without the report.
- 90% of tasks included symptoms, failure paths, or branch-specific cues in the fixing inputs.
- 84% of tasks supplied conditions in the fixing inputs that a finding run had to infer.
- 74% of tasks prescribed a concrete implementation strategy in the fixing inputs.
From Code Inspection to Bug Prediction
In a random sample of 1,000 runs, 99.3% read the faulty code, but only 41.7% recognized the incorrect behavior.
Of the 417 runs that recognized the incorrect behavior, 303 (72.7%) identified the trigger conditions. Of those 303 runs, 293 (96.7%) also explained the root cause. Inferring triggers was the larger bottleneck.
Of the 293 runs that reached a root-cause explanation, 23 dropped the prediction from the final report. Another 48 kept it but reported a function set that differed from the ground truth.
Where Do Strong Models Outperform Weak Ones?
On tasks that strong models passed and weak models failed, these reasoning behaviors were more common in strong models’ runs.
- Connecting code behavior to system or domain semantics (85.6% vs. 10.0%)
- Tracing state across functions or objects (84.4% vs. 10.0%)
- Inferring non-obvious triggers (72.2% vs. 10.0%)
- Constructing concrete counterexamples (67.8% vs. 4.4%)
Why Do Models Fail?
These percentages describe tasks that most models failed.
- At least two interacting conditions were needed to trigger the bug (74.4%).
- Effects propagated across multiple stages or depended on state carried into later operations (61.6%).
- A model considered a correct or nearly correct prediction during a failed run but omitted it from the final report (9.3%).
How is Codit-Bench evaluated?
Function matching. An automated check compares the predicted set of faulty functions with the reference set. The sets must match exactly.
Semantic matching. Three LLM judges independently compare the predicted trigger conditions, faulty operation, and root cause with the reference explanation. At least two judges must agree that the key facts match. Equivalent wording is accepted.
A task passes when at least one prediction satisfies both checks.
The pass rate is the percentage of tasks on which the model finds the target bug.
Run-to-run Stability
Performance Across Tasks and Models
All 11 models had lower pass rates on call graphs with eight or more functions. Claude-Opus-5 passed 52.46% of tasks with smaller graphs and 26.97% with larger graphs.
Mean pass rate fell from 40.5% in the easiest group to 9.3% in the hardest. Among the four difficulty dimensions, reasoning complexity had the strongest association with task success (Spearman ρ = −0.380).
Models had different strengths across bug categories. Claude-Opus-5 did best on Check bugs (55.3%), and GPT-6.1-Sol did best on Resource bugs (52.3%).
Across the 11 primary runs, at least one model passed 358/516 tasks (69.38%). That is 110 more tasks than Claude-Opus-5 passed by itself (248/516).