VITORINO, M. G. S. Q.; http://lattes.cnpq.br/9935979602385436; FECHINE, Marcelo Gabriel dos Santos Vitorino.
Resumo:
Code smells are symptoms of possible problems in the code and indicate the need for refactoring. One of the ways to detect smells is through Code Review, an important practice in software development that aims to promote good programming practices. However, among the studies we know of, only one investigated code smells during reviews, but not directly the discussions. This limits the understanding of the topic and increases the risk of bias, as it affects the validity and generalizability of the results. Aiming to mitigate this lack, Xiaofeng Han et al. (2021) manually analyzed 19,146 comments and extracted 1,190 smell-related reviews. It was found that i) code smells are not commonly found in code reviews, ii) smells are caused by violations of code conventions, iii) reviewers usually provide constructive feedback and iv) developers generally follow recommendations and implement suggested changes to the code . Although the study provides relevant results, there is a limitation in the empirical evidence and current applicability, as the study was carried out using 1) projects from the same organization and 2) projects that essentially use the same technology (python). Aiming to increase the scientific reliability and extend the applicability of the study, we carried out a replication under a new context. To this end, 26 developers were involved in a manual analysis process of 18,850 comments that extracted 2,164 smell reviews from the gRPC, Neovim and Keycloak projects, which use the C++, Java and Vim languages. Through this set, classifications were carried out in order to replicate the study of the original work. For this new context, the study confirmed results i), ii) and iv), with emphasis on the result of 831 (70%) smell causes not provided, which strengthens the result of the previous study due to the similarity of frequency found and indicates the need for other approaches to investigate the type of cause. Furthermore, discussions about the interpretation of the reviewers’ actions were extended and in 1,781 (82%) of the occurrences, the smell was captured but no corrective action was taken. Thus, this study allows developers to: Learn how code decisions are perceived and how to deal with smells. And for reviewers: Learn how to improve communication and construction of reviews through the most frequent types of smells and how your suggestions are received by developers.