Skip to main content
QUICK REVIEW

[Paper Review] Consistent or Sensitive? Automated Code Revision Tools Against Semantics-Preserving Perturbations

Shirin Pirouzkhah, Souhaila Serbout|arXiv (Cornell University)|Feb 16, 2026
Software Engineering ResearchComputer Science0 citations
TL;DR

The paper studies how transformer-based Automated Code Revision (ACR) tools respond to semantics-preserving code perturbations, finding up to 45.3% drops in consistency and limited mitigation from input-representation strategies.

ABSTRACT

Automated Code Revision (ACR) tools aim to reduce manual effort by automatically generating code revisions based on reviewer feedback. While ACR tools have shown promising performance on historical data, their real-world utility depends on their ability to handle similar code variants expressing the same issue - a property we define as consistency. However, the probabilistic nature of ACR tools often compromises consistency, which may lead to divergent revisions even for semantically equivalent code variants. In this paper, we investigate the extent to which ACR tools maintain consistency when presented with semantically equivalent code variants. To do so, we first designed nine types of semantics-preserving perturbations (SPP) and applied them to 2032 Java methods from real-world GitHub projects, generating over 10K perturbed variants for evaluation. Then we used these perturbations to evaluate the consistency of five state-of-the-art transformer-based ACR tools. We found that the ACR tools' ability to generate correct revisions can drop by up to 45.3%, when presented with semantically equivalent code. The closer the perturbation is to this targeted region, the more likely an ACR tool is to fail to generate the correct revision. We explored potential mitigation strategies that modify the input representation, but found that these attention-guiding heuristics yielded only marginal improvements, thus leaving the solution to this problem as an open research question.

Motivation & Objective

  • Assess how semantics-preserving perturbations (SPP) affect ACR tool consistency.
  • Identify perturbation features that relate to inconsistency.
  • Evaluate input-representation strategies to mitigate inconsistency.
  • Provide a controlled, per-perturbation analysis by linking perturbations to model failures.

Proposed method

  • Construct a dataset of 2032 real-world Java method revisions with reviewer comments and ground-truth edits.
  • Design nine semantics-preserving perturbations targeting control flow, data flow, and identifier naming.
  • Apply perturbations to create over 10,000 semantically equivalent variants.
  • Evaluate five transformer-based ACR tools on original and perturbed inputs.
  • Use per-model solvable subsets and an intersection subset (464 instances) for fair cross-model comparison.
  • Measure consistency with Exact Match (EXM), CodeBLEU, Edit Match (EM), and Relative Edit Error (REE).
Figure 1 . Code revision iterations and ACR tool in the process
Figure 1 . Code revision iterations and ACR tool in the process

Experimental results

Research questions

  • RQ1RQ1: How do semantics-preserving perturbations impact the consistency of state-of-the-art ACR tools?
  • RQ2RQ2: Do perturbation features relate to inconsistency in ACR tools?
  • RQ3RQ3: Do input-representation changes reduce inconsistency against SPPs?

Key findings

  • ACR tools’ consistency degrades under SPPs, with up to 45.3% reduction in correct revisions in the worst cases.
  • Largest degradation occurs when perturbations restructure control flow or alter data flow, not merely add dead code.
  • Perturbations near the reviewer’s targeted lines cause more failures in producing correct revisions.
  • Attention-guiding mitigations produced only marginal improvements, leaving the problem largely open.
  • The study uses a dataset of 2032 instances, selecting solvable subsets per model and a 464-instance intersection for cross-model comparison.
  • Perturbations are implemented via an automated AST-based framework using JavaParser to ensure syntactic validity.
Figure 2 . Example of original code ( 1 ), its semantically equivalent variant ( 2 ) and their expected revisions ( 3 & 4 ).
Figure 2 . Example of original code ( 1 ), its semantically equivalent variant ( 2 ) and their expected revisions ( 3 & 4 ).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.