International Conference Peer-reviewed
Formalizing and Automating Fine-Grained Move Refactorings across Methods
In Proceedings of the 26th IEEE International Conference on Source Code Analysis and Manipulation (SCAM 2026), pp. 92–103, Benevento, Italy, September 2026.
Abstract
Developers use automated Move refactorings to improve the modular structure of source code and the assignment of responsibilities. Class- and method-level Move refactorings are automated in modern IDEs, but statement- and expression-level moves that adjust method boundaries remain largely unautomated. We formalize five variants of Move Statement refactoring as preconditions and steps grounded in four basic conditions covering data reachability, execution count, side effects, and syntactic constraints required for compilation, of which all but the side-effect condition are checked statically. Combined with existing techniques, this also yields finer-grained moves of expressions and partial expressions. We further refine the formalization iteratively against a real project, deriving twenty additional preconditions and steps that handle Java syntactic diversity in practice. We evaluate applicability and compilability on ten projects, and behavior preservation in a case study on one of them: Move Statement refactorings yield compilable code in 93.3-97.0% of applicable cases, and the case study shows that the observed behavioral changes stem from side-effect reordering left to developer judgment, not from defects in the statically checked conditions.
Related papers
This work builds on
BibTeX
@inproceedings{yasuhara-scam2026,
author = {Kota Yasuhara and Shinpei Hayashi},
title = {Formalizing and Automating Fine-Grained Move Refactorings across Methods},
booktitle = {Proceedings of the 26th IEEE International Conference on Source Code Analysis and Manipulation},
pages = {92--103},
doi = {10.1109/SCAM71261.2026.00017},
year = 2026,
}
- Type
- International Conference
- Conference
- SCAM 2026
- Location
- Benevento, Italy
- Presented
- September 14, 2026
- Volume / Pages
- pp. 92–103
- Acceptance rate
- 20/60 (33%)
- DOI
- 10.1109/SCAM71261.2026.00017