Skip to main content
QUICK 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 Science被引用数 0
ひとこと要約

この論文は、セマンティクスを preserving するコード改変(SPP)に対する transformer ベースの Automated Code Revision(ACR)ツールの応答を研究し、一部で整合性が最大45.3%低下することと、入力表現戦略による緩和が限定的であることを発見する。

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.

研究の動機と目的

  • セマンティクスを保つ攪乱(SPP)がACRツールの整合性に与える影響を評価する。
  • 攪乱の特徴が不整合に関連するかを特定する。
  • 不整合を緩和するための入力表現戦略を評価する。
  • 攪乱とモデルの失敗を結びつけ、攪乱ごとの制御された分析を提供する。)

提案手法

  • reviewer のコメントと真の編集を含む実世界のJavaメソッド2032件のデータセットを構築する。
  • 制御フロー、データフロー、識別子命名を対象とする9つのセマンティクスを保つ攪乱を設計する。
  • 意味的に等価なバリアントを1万件超作成する攪乱を適用する。
  • 元データと攪乱後データに対して5つの transformer ベースACRツールを評価する。
  • モデルごと solvable subsets と交差比較のための464件の交差サブセットを使用する。
  • Exact Match (EXM)、CodeBLEU、Edit Match (EM)、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

実験結果

リサーチクエスチョン

  • RQ1RQ1: セマンティクス保つ攪乱は最先端のACRツールの整合性にどのように影響しますか?
  • RQ2RQ2: 攪乱の特徴はACRツールの不整合に関連しますか?
  • RQ3RQ3: 入力表現の変更はSPPに対する不整合を低減しますか?

主な発見

  • SPPによりACRツールの整合性が低下し、最悪の場合正しい改訂の割合が最大45.3%減少する。
  • 最も大きな劣化は攪乱が制御フローを再構成したりデータフローを変更した場合に発生し、死コードを追加するだけの場合ではない。
  • reviewerが狙った行の近傍での攪乱は正しい改訂の生成失敗を増加させる。
  • 注意喚起を導く緩和策はわずかな改善しかもたらさず、問題は依然として未解決。
  • 本研究は2032件のデータセットを用い、モデルごと solvableサブセットとクロスモデル比較用の464件の交差サブセットを選択する。
  • 攪乱はJavaParserを用いた自動ASTベースのフレームワークで実装され、構文的妥当性を確保する。
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 ).

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。