A log-linear probabilistic model for prioritizing extract method refactorings
Sihan Xu, Chenkai Guo, Lei Liu, Jing Xu · 2017
'Extract Method' has been one of the most widely used refactorings, which extracts a piece of code to form a new method. Approaches that automatically recommend Extract Method refactorings have been investigated to facilitate this process. These approaches usually generate candidate Extract Method refactorings, and rank them according to a specific software metric. However, software developers conduct Extract Method refactorings for various reasons. In this paper, we propose an approach that combines method-level software metrics to learns a probabilistic model from real-world refactorings. Experiments compared with two state-of-art approaches have shown the effectiveness of our approach.