O impacto de fatores contextuais na incidência de code smells: um estudo exploratório baseado em mineração de repositório de software

Detalhes bibliográficos
Ano de defesa: 2022
Autor(a) principal: Jesus, Elivelton Cerqueira de lattes
Orientador(a): Santos, José Amancio Macedo lattes
Banca de defesa: Não Informado pela instituição
Tipo de documento: Dissertação
Tipo de acesso: Acesso aberto
Idioma: por
Instituição de defesa: Universidade Estadual de Feira de Santana
Programa de Pós-Graduação: Programa de Pós-Graduação em Ciência da Computação
Departamento: DEPARTAMENTO DE TECNOLOGIA
País: Brasil
Palavras-chave em Português:
Palavras-chave em Inglês:
Área do conhecimento CNPq:
Link de acesso: http://tede2.uefs.br:8080/handle/tede/1554
Resumo: Context: Code Smells is a metaphor created to describe code structures resulting from potentially inappropriately applied programming design or practice. Studies present code smells as an indication of threat to software quality. However, the adoption of the concept of code smells in the practice of software development cannot yet be considered a reality, at least in certain contexts. Due to the nature of the software, establishing precise contexts for the adoption of concepts, methods and techniques is not trivial. Several factors can be associated with the context in which a software is developed. These factors can be technical, human or social. Although studies related to contextual factors have received attention in recent years, few studies address the issue considering the relationship between contextual factors and code smells. Objective: The objective of this work is to analyze the relationship between the incidence of code smells and contextual factors in the software. More specifically, the work aims to explore how different types of code smells are related to certain factors, independently or combined to create different contexts. Method: For this, 419 systems are being used, considering 4 contextual factors which are: System Size, Number of Changes, Number of Contributors and Development Time. Seven types of code smells were considered, which are widely discussed in the literature: Brain Class, Brain Method, Complex Method, Data Class, Feature Envy, God Class, and Long Method. We performed a process of extracting contextual factors through a software repositories mining tool and performed a classification process with the objective of grouping these contextual factors. After that, we started the process of analyzing the collected results, using resources of inferential statistics. Results: The results indicate that System Size is the contextual factor that most strongly impacts the incidence of different types of code smells. In some situations, as with Data Class, Brain Class, Feature Envy and Brain Method, System Size impacts the incidence of these code smells, regardless of the context in which it is observed. Other factors also impact differently the incidence of some types of code smells studied. For example, the Time of Development contextual factor impacts the incidence of God Class and Brain Class. For these two code smells, Development Time impacts incidence, regardless of the combination with the other contextual factors. This evidences the strong relationship between the factor and the code smells in question. Conclusion: This study contributes to expanding empirical data on the relevance of contextual factors in relation to code smells. It also presents a dataset on code smells and contextual factors of 419 software obtained from repositories mining. As it is presented as an exploratory study, the main finding of this work is the demonstration that the quality of software projects is related to the context in which the software is developed. From this perspective, adopting the concept of code smell in thepractice of software development, without taking into account the context in whichit is developed, can lead to biased results, or even distorted from the reality of howcode smells affect or arise in systems.