A Quality-oriented Approach to Recommend Move Method Refactorings
Resumo
Refactoring processes are common in large software systems, especially when developers neglect architectural erosion process for long periods. Even though there are many refactoring approaches, very few consider the refactoring impact on the software quality. Given this scenario, we propose a refactoring approach to software systems oriented to software quality metrics. Based on the QMOOD (Quality Model for Object Oriented Design), the main idea is to move methods between classes in order to maximize the values of the quality metrics. Using a formal notation, we describe the problem as follows. Given a software system S, our approach recommends a sequence of refactorings R1, R2,..., Rn that result in system versions S1, S2,..., Sn, where quality(Si+1) > quality(Si). We performed three types of evaluation to verify the usefulness of our implemented tool, called QMove. First, we applied our approach on 13 open-source systems that we modified by randomly moving a subset of its methods to other classes, then checking if our approach would recommend the moved methods to return to their original place, and we achieve 84% recall, on average. Second, we compared QMove against two state-of-art refactoring tools (JMove and JDeodorant) on the 13 previously evaluated systems, and QMove showed better recall value (84%) than the other two (30% and 29%, respectively). Third, we conducted the same comparison among QMove, JMove, and JDeodorant applied in two proprietary systems where experts evaluated the quality of the recommendations. QMove obtained eight positively evaluated recommendations from the experts, against two and none of JMove and JDeodorant, respectively.
Palavras-chave:
Quality-oriented Approach, Move Method Refactorings, QMOOD
Publicado
28/10/2019
Como Citar
COUTO, Christian Marlon Souza; TERRA, Ricardo.
A Quality-oriented Approach to Recommend Move Method Refactorings. In: SIMPÓSIO BRASILEIRO DE QUALIDADE DE SOFTWARE (SBQS), 18. , 2019, Fortaleza.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2019
.
p. 315-315.