Identifying Code Smells with Collaborative Practices: A Controlled Experiment

  • Roberto Oliveira PUC-Rio
  • Bernardo Estácio PUCRS
  • Alessandro Garcia PUC-Rio
  • Sabrina Marczak PUCRS
  • Rafael Prikladnicki PUCRS
  • Marcos Kalinowski UFF
  • Carlos Lucena PUC-Rio

Resumo


Code smells are often considered as key indicators of software quality degradation. If code smells are not systematically removed from a program, its continuous degradation may lead to either major maintenance effort or the complete redesign of the system. For several reasons, software developers introduce smells in their code as soon as they start to learn programming. If novice developers are ought to become either proficient programmers or skilled code reviewers, they should be early prepared to effectively identify code smells in existing programs. However, effective identification of code smells is often not a non-trivial task in particular to a novice developer working in isolation. Thus, the use of collaborative practices may have the potential to support developers in improving their effectiveness on this task at their early stages of their careers. These practices offer the opportunity for two or more developers analyzing the source code together and collaboratively reason about potential smells prevailing on it. Pair Programming (PP) and Coding Dojo Randori (CDR) are two increasingly adopted practices for improving the effectiveness of developers with limited or no knowledge in software engineering tasks, including code review tasks. However, there is no broad understanding about the impact of these collaborative practices on the effectiveness of code smell identification. This paper presents a controlled experiment involving 28 novice developers, aimed at assessing the effectiveness of collaborative practices in the identification of code smells. We compared PP and CDR with solo programming in order to better distinguish their impact on the effective identification of code smells. Our study is also the first in the literature to observe how novice developers work individually and together to identify smells. Our results suggest that collaborative practices contribute to the effectiveness on the identification of a wide range of code smells. Our findings can also be used in practice to guide educators, researchers or teams on improving detection and training on code smell identification.
Palavras-chave: Collaboration, Software, Programming profession, Encoding, Degradation, Software engineering, Code Smells, Collaborative Practices, Controlled Experiment, Program Comprehension, Software Degradation
Publicado
19/09/2016
OLIVEIRA, Roberto; ESTÁCIO, Bernardo; GARCIA, Alessandro; MARCZAK, Sabrina; PRIKLADNICKI, Rafael; KALINOWSKI, Marcos; LUCENA, Carlos. Identifying Code Smells with Collaborative Practices: A Controlled Experiment. In: SIMPÓSIO BRASILEIRO DE COMPONENTES, ARQUITETURAS E REUTILIZAÇÃO DE SOFTWARE (SBCARS), 10. , 2016, Maringá/PR. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2016 . p. 61-70.