Bugs in the Shadows: Static Detection of Faulty Python Refactorings
Jonhnanthan Oliveira, Rohit Gheyi, Márcio Ribeiro, Alessandro Garcia · 2025
Read Bugs in the Shadows: Static Detection of Faulty Python Refactorings by Jonhnanthan Oliveira, Rohit Gheyi, Márcio Ribeiro, Alessandro Garcia (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-01103.txt.
Description
Refactoring code should change its shape, never its behavior, yet Python tools that automate it can quietly plant type errors. The authors build a static analysis technique that hunts for such errors inside refactoring implementations themselves. They run it against Rope, a well-known Python refactoring library, applying its operations across open-source projects. The sweep covers 1,152 refactoring attempts in four refactoring types.
The analysis uncovers 29 bugs. Several of the same flaws also appear in mainstream editors such as PyCharm and PyDev, which widens the concern beyond one library. The team reports every bug to the responsible developers, and some are acknowledged and accepted. The authors argue that refactoring engines need this kind of checking as a matter of course. Without it, the tools meant to keep code healthy become a source of silent breakage.
Catalog record
| CREATOR | Jonhnanthan Oliveira, Rohit Gheyi, Márcio Ribeiro, Alessandro Garcia |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 58 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-01103