On the Relation between Complexity, Explicitness, Effectiveness of Refactorings and Non-Functional Concerns - Soares, Vinícius; Oliveira, Anderson; Pereira, Juliana Alves; Bibano, Ana Carla; Garcia, Alessandro; Farah, Paulo Roberto; Vergilio, Silvia Regina; Schots, Marcelo; Silva, Caio; Coutinho, Daniel; Oliveira, Daniel; Uchôa, Anderson (Anais do Simpósio Brasileiro de Engenharia de Software (SBES), 2020)
Developers need to consistently improve the internal structural quality of a program to address its maintainability and possibly other non-functional concerns. Refactoring is the main practice to improve code quality. Typical refactoring factors, such as their complexity and explicitness (i.e., their self-affirmation), may influence its effectiveness in improving key internal code attributes, such as enhancing cohesion or reducing its coupling, complexity and size. However, we still lack an understanding of whether such concerns and factors play a role on improving the code structural quality. Thus, this paper investigates the relationship between complexity, explicitness and effectiveness of refactorings and non-functional concerns in four projects. We study four non-functional concerns, namely maintainability, security, performance, and robustness. Our findings reveal that complex refactorings indeed have an impactful effect on the code structure, either improving or reducing the code structural quality. We also found that both self-affirmed refactorings and non-functional concerns are usually accompanied by complex refactorings, but tend to have a negative effect on code structural quality. Our findings can: (i) help researchers to improve the design of empirical studies and refactoring-related tools, and (ii) warn practitioners on which circumstances their refactorings may cause a negative impact on code quality.