JMove: A novel heuristic and tool to detect move method refactoring opportunities - Terra, Ricardo; Valente, Marco Tulio; Miranda, Sergio; Sales, Vitor (The Journal of systems and software, 2018)
•A novel heuristic to detect Move Method refactoring opportunities based on static dependencies.•The implementation of the proposed heuristic as an Eclipse plug-in, named JMove.•Two evaluations including (i) 10 open-source systems and (ii) two industrial-strength systems.•A comparative study with three state-of-the-art techniques (JDeodorant, inCode, and Methodbook).•JMove overcomes state-of-the-art techniques when providing recommendations for large methods. This paper presents a recommendation approach that suggests Move Method refactorings using the static dependencies established by methods. This approach, implemented in a publicly available tool called JMove, compares the similarity of the dependencies established by a method with the dependencies established by the methods in possible target classes. We first evaluate JMove using 195 Move Method refactoring opportunities, synthesized in 10 open-source systems. In this evaluation, JMove precision ranges from 21% (small methods) to 32% (large methods) and its median recall ranges from 21% (small methods) to 60% (large methods). In the same scenario, JDeodorant, which is a state-of-the-art Move Method recommender, has a maximal precision of 15% (large methods) and a maximal median recall of 40% (small methods). Therefore, we claim that JMove is specially useful to provide recommendations for large methods. We reinforce this claim by means of two other studies. First, by investigating the overlapping of the recommendations provided by JMove and three other recommenders (JDeodorant, inCode, and Methodbook). Second, by validating JMove and JDeodorant recommendations with experts in two industrial-strength systems.