This work formalizes 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.
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.
Results indicate that static checks and test-guided, context-aware agentic repair can increase the reliability of LLM-generated refactorings, bringing them closer to practical integration within developer workflows.
Jonathan Cordeiro, Shayan Noei, Ying Zou· 1 citation
Modern software development involves parallel work and concurrent changes, requiring code merging. Prior studies report that 10% to 20% of merge attempts result in conflicts, often requiring manual intervention. The literature explores factors that generate conflicts, including refactorings, but does not analyze how in...
A. Oliveira, João Victor Monteiro, V. Neves et al.· 0 citations
This paper identifies patch verbosity as a major yet overlooked concern in LLM-based APR and proposes RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation that achieves a substantially better size-correctness tradeoff.
Wen-Qiang Luo, J. Keung, Xiaoyu Shi et al.· 0 citations
WasmMend is presented, the first system to automatically repair Native-Wasm functional discrepancies and demonstrates the value of divergence-guided reasoning for cross-platform repair.
Language-model workflows can spend tokens repeatedly applying decisions that explicit code can perform. We present Path to Least Non Determinism (PLaND), a methodology for revising an English standard operating procedure (SOP) by replacing selected model decisions with code while retaining model fallback. Two reusable...
Maddipatla Naga Venkata Sai Krishna, Asit Kumar Sahoo· Scholars Journal of Engineer...· 0 citations
This work proposes an approach based on a foundation model oracle that analyzes git-style diffs to identify behavioral changes introduced by Python refactorings and uncovered 13 distinct bugs among the seven refactoring types studied.
Jonhnanthan Oliveira, Rohit Gheyi, Márcio Ribeiro et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.