科研速览 · Science Skim继续刷下去 · Keep skimming →
◇ arXiv2026-08-10· cs.SE

Detecting Behavioral Changes in Python Refactoring Implementations with Foundation Models

Jonhnanthan Oliveira, Rohit Gheyi, Márcio Ribeiro, Alessandro Garcia

原始摘要(英文原文)· Original abstract
Python is a widely adopted programming language, valued for its simplicity and flexibility. However, automated refactoring for Python remains challenging, even though refactoring is an essential practice in software evolution aimed at improving internal code structure without changing external behavior. Understanding how behavioral changes are introduced during refactoring is crucial, as such issues can compromise software reliability and reduce developer productivity. We propose an approach based on a foundation model oracle that analyzes git-style diffs to identify behavioral changes introduced by Python refactorings. We evaluated our technique on Rope refactoring implementations, reusing 1,152 refactoring attempts from a prior study and analyzing 217 resulting transformation pairs with the oracle. Our model-based analysis uncovered 13 distinct bugs among the seven refactoring types studied. All reported bugs were submitted to the respective developers, and 12 of the 13 resulting issue reports were accepted according to issue-tracker evidence. These results highlight the need to improve the robustness of current Python refactoring tools to ensure the correctness of automated code transformations and support reliable software maintenance.
读原文 · Read the paper ↗

AI 追问PRO

登录后使用 AI 追问

讨论区

登录后参与讨论

相关论文 · Related

Detecting Behavioral Changes in Python Refactoring Implementations with Foundation Models — 科研速览 Science Skim