Busca por oportunidades de refatoração para aplicação de padrões de projeto

Detalhes bibliográficos
Ano de defesa: 2014
Autor(a) principal: Pauli, Guinther de Bitencourt
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: por
Instituição de defesa: Universidade Federal de Santa Maria
BR
Ciência da Computação
UFSM
Programa de Pós-Graduação em Informática
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.ufsm.br/handle/1/5443
Resumo: It is difficult to maintain and to adapt poorly written code presenting shortcomings in its structure. Refactoring techniques are used to improve the source code and the structure of applications, making them better and easier to modify. Design patterns are reusable solutions used in similar problems in object-oriented systems, so there is no need to recreate the solutions. Applying design patterns in the context of refactoring in a corrective way becomes a desired activity in the life cycle of a specific software system. However, for medium and large-scale projects, the manual examination of artifacts to find problems and opportunities to apply a design pattern is a hard task. In this context, we present a set of metric-based heuristic functions to detect where a design pattern can be applied in a given project, more specifically, the Strategy, Factory Method, Template Method, Creation Method and Chain Constructors patterns. To evaluate the heuristic functions and its results we have also built a tool to show the results. This tool can examine source code traversing ASTs (Abstract Syntax Trees), searching for opportunities to apply the patterns, indicating the exact location in the source code where the pattern is suggested, also showing some evidences used in the detection.