CommentInject v2: A Matched-Pair Benchmark for Separating Criterion Shifts from Discrimination Loss When Code Comments Mislead LLM Vulnerability Detectors
Large language models (LLMs) are used to review code for security flaws, and the code they review often contains comments written by whoever submitted it. Earlier studies show that adversarial comments can lower the rate at which LLMs flag vulnerable code. A study that tests vulnerable code alone cannot say whether a comment makes a model worse at telling vulnerable from fixed code, or only less willing to flag anything. We built CommentInject v2 to separate the two. Each vulnerable Python function is paired with a minimally fixed twin, and every comment is applied to both. The core set has 27 pairs, 13 CWE classes and 756 cases; an extended set has 30 pairs, 14 CWE classes and 840 cases. Each pair appears under 14 conditions: no comment, one neutral purpose comment, and 12 fixed adversarial comment strategies. We evaluated four local open-weight models in one run at temperature 0 (seed 0), with selective re-runs, and analysed the verdicts with signal detection theory: discrimination (d′) and decision criterion (c), with two-way bootstrap intervals over pairs and strategies. In the exploratory primary analysis, adversarial comments made qwen3.5:4b and deepseek-coder:6.7b more lenient, with unadjusted 95% confidence intervals for Δc excluding zero. For qwen3.5:4b, the reduction in discrimination was not statistically established under the documented primary analysis. On the 30-pair extended set, a secondary pair-level analysis produced a confidence interval excluding zero. However, the discrimination inference is sensitive to the analysis method, clustering and inclusion of revised pairs. No change in discrimination was established for the other models; failure to establish a discrimination loss is not evidence that discrimination is unchanged. A static-analysis control (Bandit, default configuration) changed 0 of 702 core and 0 of 780 extended verdicts under the tested comments.
- Link
- https://doi.org/10.5281/zenodo.24722324
- Found by
- DataCite
- Authors
- Sunny Chokshi
- Organizations
- University of the Cumberlands
- Categories
- benchmark, evaluation
- Published
- 2026-12-01
- Last seen by the radar
- 2026-12-03
- Citations
- 0
- Downloads
- 0
- Views
- 0
- Radar score
- 40.05 / 100 (how it is scored)
- Why it scored so
- Also found via DataCite; Matched: benchmark, evaluat; Primary record: DataCite
- Related links
- https://zenodo.org/doi/10.5281/zenodo.24722324
https://doi.org/10.5281/zenodo.24722325
https://zenodo.org/doi/10.5281/zenodo.24722325