Skip to main content
QUICK REVIEW

[논문 리뷰] Consistent or Sensitive? Automated Code Revision Tools Against Semantics-Preserving Perturbations

Shirin Pirouzkhah, Souhaila Serbout|arXiv (Cornell University)|2026. 02. 16.
Software Engineering ResearchComputer Science인용 수 0
한 줄 요약

본 논문은 transformer 기반 자동 코드 수정(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 도구의 일관성에 어떤 영향을 미치는지 평가한다.
  • 일관성과 관련된 섭동 특성을 식별한다.
  • 일관성 저하를 완화하기 위한 입력 표현 전략을 평가한다.
  • 섭동과 모델 실패를 연결하여 제어된, 섭동별 분석을 제공한다.

제안 방법

  • 검토자 주석과 실제 편집 내용을 포함한 2032개의 실제 Java 메서드 수정 데이터셋을 구성한다.
  • 제어 흐름, 데이터 흐름, 식별자 명명에 초점을 맞춘 의미 보존 섭동 9개를 설계한다.
  • 의미상 동등한 변형을 10,000건 이상 생성하도록 섭동을 적용한다.
  • 원본 입력과 섭동 입력 모두에서 다섯 가지 transformer 기반 ACR 도구를 평가한다.
  • 모델별 해결 가능 부분집합과 교차 모델 비교를 위한 교집합 부분집합(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에 대한 불일치를 감소시키는가?

주요 결과

  • ACR 도구의 일관성은 SPP 하에서 저하되며, 최악의 경우 올바른 수정의 비율이 최대 45.3%까지 감소한다.
  • 가장 큰 저하는 섭동이 제어 흐름을 재구성하거나 데이터 흐름을 바꿀 때 발생하며, 단순히 죽은 코드를 추가하는 경우가 아니다.
  • 심사자가 대상으로 삼은 줄 근처의 섭동이 올바른 수정 생성을 더 많이 실패하게 한다.
  • 주의 집중 유도형 완화책은 미미한 개선만 가져왔으며 문제를 크게 해결하지 못했다.
  • 연구는 2032 인스턴스의 데이터세트를 사용하고, 모델별 해결 가능한 부분집합과 교차 모델 비교를 위한 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 ).

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.