Enhancing Code Model Robustness Against Identifier Renaming via Unified Code Normalization
UniCode, a novel two-stage defense framework against identifier renaming, is proposed, one of the most effective modifications influencing DCMs’ robustness, and effectively aligns the distributions between the training data and the adversarial test samples, thereby significantly enhancing model robustness.