Analyzing the effects of refactorings on bad smells

dc.creatorCleiton Silva Tavares
dc.date.accessioned2021-10-17T23:37:41Z
dc.date.accessioned2025-09-09T01:33:45Z
dc.date.available2021-10-17T23:37:41Z
dc.date.issued2021-03-31
dc.description.abstractRefatoração visa aumentar a manutenibilidade de sistemas de software melhorando a sua estrutura sem alterar seu comportamento, podendo ser aplicada para remover bad smells. Mesmo com a existência de ferramentas para auxiliar a refatoração, muitos desenvolvedores não confiam em suas soluções, alegando que alguns estudos mostram que a refatoração pode introduzir novos bad smells no código-fonte. Contudo, não encontramos um catálogo completo que indique quando isso ocorre. Para investigar esse assunto em detalhe, o objetivo desta dissertação é avaliar os efeitos da refatoração em bad smells. Especificamente, investigamos se e qual refatoração remove bad smells ou os introduz. Para atingir esse objetivo, realizamos uma Revisão Sistemática da Literatura (RSL) para identificar a relação entre as refatorações e os bad smells propostos por Fowler. Conduzimos um estudo empírico com oito sistemas de software, aplicando cinco refatorações para analisar seus efeitos em dez bad smells com o auxílio de cinco ferramentas. Como resultado do estudo empírico, apresentamos via os dados estudados, quais bad smells são removidos ou introduzidos pelo processo de refatoração automatizada. A RSL resultou em 20 artigos mostrando a relação direta entre 31 refatorações e 16 bad smells. Produzimos um catálogo exibindo essas relações e também apresentamos um contraste com as relações discutidas por Fowler. Identificamos que a relação mais discutida na literatura se dá entre Move Method e Feature Envy. A RSL também revelou que existem estratégias de refatoração diferentes daquelas discutidas por Fowler para lidar com bad smells. No estudo empírico, observamos que os tipos de refatoração geraram diminuição, aumento e variações neutras no número de bad smells. Diferente da definição de Fowler, surpreendentemente descobrimos que a diminuição no número de bad smells foi a mais baixa em comparação com casos de aumento e variações neutras. Em uma análise adicional, contrastamos os resultados encontrados nos dois estudos realizados, classificando-os, validando-os e complementando-os.
dc.description.sponsorshipCAPES - Coordenação de Aperfeiçoamento de Pessoal de Nível Superior
dc.identifier.urihttps://hdl.handle.net/1843/38392
dc.languageeng
dc.publisherUniversidade Federal de Minas Gerais
dc.rightsAcesso Aberto
dc.subjectComputação – Teses
dc.subjectEngenharia de Software – Teses
dc.subjectSoftware - Refatoração– Teses
dc.subjectBad smell – Teses
dc.subject.otherRefactoring
dc.subject.otherBad smell
dc.subject.otherRefactoring impacts
dc.subject.otherRefactoring effects
dc.titleAnalyzing the effects of refactorings on bad smells
dc.title.alternativeAnalisando os efeitos da refatoração em bad smells
dc.typeDissertação de mestrado
local.contributor.advisor-co1Eduardo Magno Lages Figueiredo
local.contributor.advisor1Mariza Andrade da Silva Bigonha
local.contributor.advisor1Latteshttp://lattes.cnpq.br/6660127471891321
local.contributor.referee1André Cavalcante Hora
local.contributor.referee1Kécia Aline Marques Ferreira
local.creator.Latteshttp://lattes.cnpq.br/1929115389330037
local.description.resumoRefactoring aims to increase software systems' maintainability by improving their structure without changing their behavior, may applied to remove bad smells. Even with tools to assist refactoring, many developers do not trust their solutions, claiming that some studies show that refactoring can introduce new bad smells into the source code. However, we have not found a complete catalog that states when this may occur. To investigate this subject deeply, the goal of this dissertation is to evaluate the effects of refactoring on bad smells. Specifically, we want to know if and what refactoring removes bad smells or introduces them. To achieve this goal, we conducted a Systematic Literature Review (SLR) to identify the relationship between refactorings and bad smells proposed by Fowler. We also conducted an empirical study with eight software systems applying five refactorings to analyze their effects on ten bad smells with the assist of five tools. As a result of the empirical study, we present, through the data studied, which bad smells tend to be removed or introduced by the automated refactoring process. In the SLR, we found 20 papers showing the direct relationship between 31 refactorings and 16 bad smells. We produced a catalog showing these relationships, and we also showed a contrast with relationships discussed by Fowler. We identified that the most discussed relationship in the literature is between Move Method and Feature Envy. The SLR also revealed different refactoring strategies than those discussed by Fowler for dealing with bad smells. In the empirical study, we observed that refactoring generated decrease, increase, and neutral variations in the number of bad smells. Unlike Fowler's definition, we surprisingly found that the number of bad smells decrease was the lowest compared to cases of increase and neutral variations. In an additional analysis, we contrast the results found in the two studies carried out, classifying, validating and complementing them.
local.publisher.countryBrasil
local.publisher.departmentICX - DEPARTAMENTO DE CIÊNCIA DA COMPUTAÇÃO
local.publisher.initialsUFMG
local.publisher.programPrograma de Pós-Graduação em Ciência da Computação

Arquivos

Pacote original

Agora exibindo 1 - 1 de 1
Carregando...
Imagem de Miniatura
Nome:
Dissertacao_Digital.pdf
Tamanho:
1000.19 KB
Formato:
Adobe Portable Document Format

Licença do pacote

Agora exibindo 1 - 1 de 1
Carregando...
Imagem de Miniatura
Nome:
license.txt
Tamanho:
2.07 KB
Formato:
Plain Text
Descrição: