Better similarity coefficients to identify refactoring opportunities

  • Arthur F. Pinto UFLA
  • Ricardo Terra UFLA

Resumo


Similarity coefficients are used by several techniques to identify refactoring opportunities. As an example, it is expected that a method is located in a class that is structurally similar to it. However, the existing coefficients in Literature have not been designed for the structural analysis of software systems, which may not guarantee satisfactory accuracy. This paper, therefore, proposes new coefficients---based on genetic algorithms over a training set of ten systems---to improve the accuracy of the identification of Move Class, Move Method, and Extract Method refactoring opportunities. We conducted an empirical study comparing these proposed coefficients with other 18 coefficients in other 101 systems. The results indicate, in relation to the best analyzed coefficient, an improvement of 10.57% for the identification of Move Method refactoring opportunities, 3.17% for Move Class, and 0.30% for Extract Method. Moreover, we implemented a tool that relies on the proposed coefficients to recommend refactoring opportunities.
Palavras-chave: structural similarity, software architecture, move method, move class, extract method, code refactoring
Publicado
18/09/2017
PINTO, Arthur F.; TERRA, Ricardo. Better similarity coefficients to identify refactoring opportunities. In: SIMPÓSIO BRASILEIRO DE COMPONENTES, ARQUITETURAS E REUTILIZAÇÃO DE SOFTWARE (SBCARS), 11. , 2017, Fortaleza/CE. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2017 . p. 1–10.