Eyes on Code Smells: Analyzing Developers’ Responses During Code Snippet Analysis - Martins, Vinícius; Ramos, Pedro Lopes Verardo; Neves, Breno Braga; Lima, Maria Vitoria; Arriel, Johny; Godinho, João Victor; Ribeiro, Joanne; Garcia, Alessandro; Pereira, Juliana Alves (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2024: Anais do XXXVIII Simpósio Brasileiro de Engenharia de SoftwareDO - 10.5753/sbes.2024.3431, 2024)
Detection and refactoring of smelly code are crucial activities, along with software maintenance and evolution. Code smells are indicators of poor design and implementation choices, which are expected to affect the developers’ program comprehension. The use of eyetracking technology provides an interesting means of analyzing the impact of code smells on program comprehension. However, there is limited existing effort in this direction. This paper reports a study in which we have used an eye tracker to investigate how the presence of smells influences developers’ program comprehension. We observed that the smell data class leads to a lower cognitive effort, while long methods and feature envies imposed a considerably higher cognitive effort. That explains why refactoring of feature envies and long methods smells has been much more common across the projects.We also have complementary eye-tracking indicators to reveal other smell aspects harming program comprehension. These findings reinforce the importance of enhancing IDE features to reduce the developer’s burden when engaging in cognitive processes of largely coupled code.