Um método para descoberta automática de regras para a detecção de Bad Smells
Ano de defesa: | 2014 |
---|---|
Autor(a) principal: | |
Orientador(a): | |
Banca de defesa: | |
Tipo de documento: | Dissertação |
Tipo de acesso: | Acesso aberto |
Idioma: | por |
Instituição de defesa: |
Universidade Federal de Alagoas
Brasil Programa de Pós-Graduação em Modelagem Computacional de Conhecimento UFAL |
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://www.repositorio.ufal.br/handle/riufal/1757 |
Resumo: | One of the techniques to maintain software quality is code refactoring. But to take advantage of code refactoring, one must know where in code it must be applied. A catalog of bad smells in code has been proposed in the literature as a way to know when a certain piece of code should be refactored andwhat kind of refactoring should be applied. This catalog has been extended by other researchers. However, detecting such bad smells is far from trivial, mainly because of the lack of a precise and consensual definition of each Bad Smell. In this researchwork,we propose a solution to the problemof automatic detection of Bad Smells by means of the automatic discovery of metrics based rules. In order to evaluate the effectiveness of the technique, we used a dataset containing information on software metrics calculated for 4 open source software systems written in Java (ArgoUML, Eclipse,Mylyn and Rhino) and, by means of a Decision Tree induction algorithm, C5.0, we were capable of generating rules for the detection of the 12 Bad Smells that were analyzed in our study. Our experiments show that the generate rules performed very satisfactorily when tested against a separated test dataset. Furthermore, aiming to optimize the proposed approach, a Genetic Algorithm was implemented to preselect the most informative software metrics for each Bad Smell and we show that it is possible to reduce classification error in addition to, many times, reduce the size of the generated rules. When compared to existing Bad Smells detection tools, we show evidence that the proposed technique has advantages. |