A — Robustness
Section II-A · RQ1–RQ3BigVul · shared base set of 100 vulnerable + 100 non-vulnerable functions for each of C and C++ · zero-shot prompt · six semantic-preserving attacks NT1–NT6; NT5 and NT6 run on C only.
Non-LLM transformers outperform LLMs on clean performance, and C is easier than C++. UniXcoder weighted F1 ≈ 0.85 vs. 0.61–0.66 for the seven LLMs; C > C++ (p = 0.0234).
Renaming and fake-sanitization attacks are broadly effective. NT2 and NT3 hit all models; NT5 degrades most models except Gemini and Opus4.7; NT1 and NT6 generally fail on LLMs; NT4 causes model-specific bias.
Robustness varies widely and is orthogonal to clean performance. Most robust: GPT-4o (~4.4% mean relative change), UniXcoder (~6.1%). Least robust: Opus4.7 (~22.9%), Gemini (~19.1%), Llama4 (~18.7%).
Attack descriptions and interpretation
- NT1 — Rename variables to vulnerability-related keywords
- NT2 — Rename a safe function to a "vulnerable"-sounding name
- NT3 — Rename an unsafe function to a "non-vulnerable"-sounding name
- NT4 — Insert a dangerous library call (strcpy / strcat) used safely
- NT5 — Fake sanitization (e.g., realpath) that does not fix the bug (CWE-22, CWE-787)
- NT6 — Macro that names a safe function but expands to an unsafe one (e.g., fgets → gets)
GPT-4o's positive C++ value is an artifact of its near-zero NT3 clean accuracy (tiny denominator).