Empirically supported similarity coefficients for the identification of refactoring opportunities

Detalhes bibliográficos
Ano de defesa: 2018
Autor(a) principal: Pinto, Arthur Ferreira
Orientador(a): Não Informado pela instituição
Banca de defesa: Não Informado pela instituição
Tipo de documento: Dissertação
Tipo de acesso: Acesso aberto
Idioma: eng
Instituição de defesa: Universidade Federal de Lavras
Programa de Pós-Graduação em Ciência da Computação
UFLA
brasil
Departamento de Ciência da Computação
Programa de Pós-Graduação: Não Informado pela instituição
Departamento: Não Informado pela instituição
País: Não Informado pela instituição
Palavras-chave em Português:
Link de acesso: http://repositorio.ufla.br/jspui/handle/1/29596
Resumo: Code refactoring is defined as the process of changing a software system preserving the external behavior of the code, but improving its internal structure. Through refactoring, it becomes possible to treat code architecture symptoms, known as Code Smells, which can affect features such as portability, reusability, maintainability, and scalability. Several techniques to identify refactoring opportunities rely on similarity coefficients to find misplaced entities on the system architecture, as well as to determine where it should be located. As an example, we expect that a method is located in a class whose other methods are 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 precision. This master dissertation, therefore, proposes three new coefficients—PT MC, PT MM, and PT EM—to improve the precision of the identification of Move Class, Move Method, and Extract Method refactoring opportunities, respectively. Our main objectives are: (i) to propose more effective similarity coefficients for object-oriented systems, in order to locate more accurately entities improperly positioned on a system architecture and (ii) to leverage the precision of tools for identification of refactoring opportunities based on structural similarity through the application of the proposed coefficients. Firstly, we investigated the precision of 18 similarity coefficients in 10 systems of Qualitas.class Corpus (training set) to select the most appropriate coefficient to be adapted. Then, we adapted the selected coefficient through an empirical experiment based on a treatment combination with replication over genetic algorithms in order to generate the proposed coefficients. Finally, we implemented AIRP, a tool that relies on the proposed coefficients to identify refactoring opportunities. In order to evaluate the proposed coefficients, we compared them with other 18 coefficients in other 101 systems of Qualitas.class Corpus (test set). The results indicate, in relation to the best analyzed coefficient, a statistical improvement from 5.23% to 6.81% for the identification of Move Class refactoring opportunities, 12.33% to 14.79% for Move Method, and 0.25% to 0.40% for Extract Method.