JMove: A novel heuristic and tool to detect move method refactoring opportunities

•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 th...

Full description

Saved in:
Bibliographic Details
Published inThe Journal of systems and software Vol. 138; pp. 19 - 36
Main Authors Terra, Ricardo, Valente, Marco Tulio, Miranda, Sergio, Sales, Vitor
Format Journal Article
LanguageEnglish
Published Elsevier Inc 01.04.2018
Subjects
Online AccessGet full text
ISSN0164-1212
1873-1228
DOI10.1016/j.jss.2017.11.073

Cover

More Information
Summary:•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.
ISSN:0164-1212
1873-1228
DOI:10.1016/j.jss.2017.11.073