CleanGame: Gamifying the Identification of Code Smells

  • Hoyama Maria dos Santos
  • Vinicius H. S. Durelli
  • Maurício Souza
  • Eduardo Figueiredo
  • Lucas Timoteo da Silva
  • Rafael S. Durelli


Refactoring is the process of transforming the internal structure of existing code without changing its observable behavior. Many studies have shown that refactoring increases program maintainability and understandability. Due to these benefits, refactoring is recognized as a best practice in the software development community. However, prior to refactoring activities, developers need to look for refactoring opportunities, i.e., developers need to be able to identify code smells, which essentially are instances of poor design and ill-considered implementation choices that may hinder code maintainability and understandability. However, code smell identification is overlooked in the Computer Science curriculum. Recently, Software Engineering educators have started exploring gamification, which entails using game elements in non-game contexts, to improve instructional outcomes in educational settings. The potential of gamification lies in supporting and motivating students, enhancing the learning process and its outcomes. We set out to evaluate the extent to which such claim is valid in the context of post-training reinforcement. To this end, we devised and implemented CleanGame, which is a gamified tool that covers one important aspect of the refactoring curriculum: code smell identification. We also carried out an experiment involving eighteen participants to probe into the effectiveness of gamification in the context of post-training reinforcement. We found that, on average, participants managed to identify twice as much code smells during learning reinforcement with a gamified approach in comparison to a non-gamified approach. Moreover, we administered a post-experiment attitudinal survey to the participants. According to the results of such survey, most participants showed a positive attitude towards CleanGame.



B. S. Akpolat and W. Slany. 2014. Enhancing software engineering student team engagement in a high-intensity Extreme Programming course using gamification. In 27th IEEE Conference on Software Engineering Education and Training (CSEE T). 149--153.

Manal M. Alhammad and Ana M. Moreno. 2018. Gamification in Software Engineering Education: A Systematic Mapping. Journal of Systems and Software 141 (2018), 131--150.

M. M. Alhammad and A. M. Moreno. 2018. Gamification in software engineering education: A systematic mapping. Journal of Systems and Software 141 (2018), 131--150.

Wendy L. Bedwell, Davin Pavlas, Kyle Heyne, Elizabeth H. Lazzara, and Eduardo Salas. 2012. Toward a taxonomy linking game attributes to learning: An empirical study. Simulation & Gaming 43 (2012), 729--760.

Jonathan Bell, Swapneel Sheth, and Gail Kaiser. 2011. Secret ninja testing with HALO software engineering. In 4th Proceedings of the International Workshop on Social Software Engineering (SSE). 43--47.

Pierre Bourque and Richard E. Fairley. 2014. Guide to the Software Engineering Body of Knowledge (SWEBOK(R)): Version 3.0. IEEE Computer Society Press.

Luis Cruz, Rui Abreu, and Jean-Noël Rouvignac. 2017. Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring. In 4th International Conference on Mobile Software Engineering and Systems (MOBILESoft). 205--206.

Sebastian Deterding, Miguel Sicart, Lennart Nacke, Kenton O'Hara, and Dan Dixon. 2011. Gamification. using game-design elements in non-gaming contexts. In 11st Extended Abstracts on Human Factors in Computing Systems (CHI). 2425--2428.

Daniel J. Dubois and Giordano Tamburrelli. 2013. Understanding gamification mechanisms for software development. In 9th Proceedings of the 2013 Joint Meeting on Foundations of Software Engineering (ESEC/FSE). 659--662.

Leonard Elezi, Sara Sali, Serge Demeyer, Alessandro Murgia, and Javier Pérez. 2016. A game of refactoring: Studying the impact of gamification in software refactoring. In 16th Proceedings of the Scientific Workshop Proceedings (XP2016). 1--6.

Martin Fowler. 2018. Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional.

G. Fraser. 2017. Gamification of Software Testing. In 12th 2017 IEEE/ACM International Workshop on Automation of Software Testing (AST). 2--7.

Felix Garcia, Oscar Pedreira, Mario Piattini, Ana Cerdeira-Pena, and Miguel Penabad. 2017. A framework for gamification in software engineering. Journal of Systems and Software 132 (2017), 21--40.

Eduardo Herranz, Ricardo Colomo-Palacios, and Antonio de Amescua Seco. 2015. Gamiware: A Gamification Platform for Software Process Improvement. In 22nd Systems, Software and Services Process Improvement (SPI). 127--139.

P. Kruchten, R. L. Nord, and I. Ozkaya. 2012. Technical Debt: From Metaphor to Theory and Practice. IEEE Software 29 (2012), 18--21.

The Joint Task Force on Computing Curricula. 2015. Curriculum Guidelines for Undergraduate Degree Programs in Software Engineering. Technical Report. MISSING.

F. Palomba, D. Di Nucci, M. Tufano, G. Bavota, R. Oliveto, D. Poshyvanyk, and A. De Lucia. 2015. Landfill: An Open Dataset of Code Smells with Public Evaluation. In 12th 2015 IEEE/ACM Working Conference on Mining Software Repositories (MSR). 482--485.

Giani Petri, Christiane Gresse von Wangenheim, and Adriano Ferreti Borgatto. 2017. A large-scale evaluation of a model for the evaluation of games for teaching software engineering. In 39th 2017 IEEE/ACM International Conference on Software Engineering: Software Engineering Education and Training Track (ICSE-SEET). 180--189.

Jose Miguel Rojas and Gordon Fraser. 2016. Code defenders: a mutation testing game. In 9th Software Testing, Verification and Validation Workshops (ICSTW). 162--167.

Tommaso Dal Sasso, Andrea Mocci, Michele Lanza, and Ebrisa Mastrodicasa. 2017. How to gamify software engineering. In 24th Software Analysis, Evolution and Reengineering (SANER). 261--271.

Tushar Sharma and Diomidis Spinellis. 2018. A survey on software smells. Journal of Systems and Software 138 (2018), 158--173.

Mauricio Ronny Almeida Souza, Lucas Veado, Renata Teles Moreira, Eduardo Figueiredo, and Heitor Costa. 2018. A Systematic Mapping Study on Game-related Methods for Software Engineering Education. Information and Software Technology 95 (2018), 201--218.

D. Spinellis. 2012. Refactoring on the Cheap. IEEE Software 29 (2012), 96--95.

Klaas-Jan Stol, Paul Ralph, and Brian Fitzgerald. 2016. Grounded theory in software engineering research: a critical review and guidelines. In 38th 2016 IEEE/ACM International Conference on Software Engineering (ICSE). 120--131.

C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslén. 2012. Experimentation in Software Engineering. Springer.
Como Citar

Selecione um Formato
DOS SANTOS, Hoyama Maria; DURELLI, Vinicius H. S.; SOUZA, Maurício; FIGUEIREDO, Eduardo; DA SILVA, Lucas Timoteo; DURELLI, Rafael S.. CleanGame: Gamifying the Identification of Code Smells. In: EDUCATION - SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 33. , 2019, Salvador. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2020 .