Search for a command to run...
Refactoring offers numerous advantages but also presents challenges such as high effort and limited automation. These challenges underscore the pressing need for an indepth analysis of past refactoring practices. However, existing empirical studies often focus on a limited set of refactoring types, narrow project scopes, or coarse-grained commit-level analysis, leaving several important questions underexplored. In particular, there is a lack of comprehensive understanding of how refactoring practices vary across ecosystems, evolve over time, and interact with external risks such as defect proneness and code instability. To address these gaps, this study presents an expanded empirical analysis of refactoring activities across diverse open-source projects. Leveraging an enhanced detection approach that captures nearly 100 types of refactorings, we conduct a multi-dimensional investigation into: the diversity of refactoring practices across ecosystems, their evolutionary patterns throughout the software lifecycle, and the association between bug proneness and post-refactoring volatility. Based on a comprehensive analysis of 807,651 refactoring operations, our findings provide a broader, lifecycle-aware and fine-grained perspective on how refactoring is applied in practice. We uncover consistent yet evolving usage patterns, reveal context-dependent risk profiles, and highlight the need for operation-level understanding of refactoring behavior. This study bridges key knowledge gaps in refactoring practices, offering an updated and richer understanding across three distinct dimensions and providing developers with empirical insights to optimize their refactoring strategies.