Search Mechanism for Encapsulate Classes with Factory Refactoring Opportunities - Krug, Thiago Cassio; Piveta, Eduardo Kessler (Anais do Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software (SBCARS); 2023: Anais do XVII Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software, 2023)
Software systems must evolve to avoid its degradation. The refactoring technique associated with the application of design patterns help software consistent evolution. A refactoring opportunity consists of a source code that can be altered by refactoring to improve its quality. In this sense, this study presents a mechanic to search refactoring opportunities to Encapsulate Classes with Factory refactoring pattern. Some clues and refactoring steps which aid to solve the indicated problems are described. We conducted a case study with a set of open-source projects to evaluate the opportunities identified by the mechanic.