Perceptions and Difficulties of Software Engineering Students in Code Smells Refactoring

  • Carla Bezerra UFC
  • Humberto Damasceno UFC
  • João Teixeira UFC

Resumo


Code smells are bad code structures that can harm the quality and maintainability of software. To remove these bad structures, developers use refactoring techniques. Refactoring helps code be easier to understand and modify by eliminating potential problems and improving the software quality. Most refactoring activities are usually performed manually and undisciplined, which can cause code degradation. Currently, concepts, practices and tools of refactoring and code smells are little discussed in undergraduate computing courses. This problem is reflected in the software industry, which generally does not use refactoring practices to improve code readability and maintainability. In this context, we present in this paper an experience report on teaching the practice of code smells refactoring, investigating the following topics: (i) skills acquired in the practice of code smells refactoring, (ii) difficulties encountered in code smells refactoring and (iii) students’ perception of code smells refactoring practices. The study was carried out in two undergraduate classes with 20 students in the course of software quality. Our findings contribute to replicating the practice in other courses that want to delve into code smell refactoring and contribute to the use of refactoring practices and code quality evaluation in the industry.

Palavras-chave: code smells, refactoring, education

Referências

Shamsa Abid, Hamid Abdul Basit, and Naveed Arshad. 2015. Reflections on Teaching Refactoring: A Tale of Two Projects. In Proceedings of the 2015 ACM Conference on Innovation and Technology in Computer Science Education (Vilnius, Lithuania) (ITiCSE '15). Association for Computing Machinery, New York, NY, USA, 225-230. https://doi.org/10.1145/2729094.2742617

Mansi Agnihotri and Anuradha Chug. 2020. A Systematic Literature Survey of Software Metrics, Code Smells and Refactoring Techniques. Journal of Information Processing Systems 16, 4 (2020).

Vartika Agrahari and Sridhar Chimalakonda. 2020. Refactor4Green: a game for novice programmers to learn code smells. In 2020 IEEE/ACM 42nd International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). IEEE, 324-325.

Jehad Al Dallal and Anas Abdin. 2017. Empirical evaluation of the impact of object-oriented code refactoring on quality attributes: A systematic literature review. IEEE Transactions on Software Engineering 44, 1 (2017), 44-69.

Vahid Alizadeh, Mohamed Amine Ouali, Marouane Kessentini, and Meriem Chater. 2019. RefBot: Intelligent Software Refactoring Bot. In 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE). 823-834. https://doi.org/10.1109/ASE.2019.00081

Hoyama Maria dos Santos, Vinicius H. S. Durelli, Maurício Souza, Eduardo Figueiredo, Lucas Timoteo da Silva, and Rafael S. Durelli. 2019. CleanGame: Gamifying the Identification of Code Smells. In Proceedings of the XXXIII Brazilian Symposium on Software Engineering (Salvador, Brazil) (SBES 2019). Association for Computing Machinery, New York, NY, USA, 437-446. https://doi.org/10.1145/3350768.3352490

Martin Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional.

Yaroslav Golubev, Zarina Kurbatova, Eman Abdullah AlOmar, Timofey Bryksin, and Mohamed Wiem Mkaouer. 2021. One Thousand and One Stories: A Large-Scale Survey of Software Refactoring. In Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Athens, Greece) (ESEC/FSE 2021). Association for Computing Machinery, New York, NY, USA, 1303-1313. https://doi.org/10.1145/3468264.3473924

Péter Hegedűs, István Kádár, Rudolf Ferenc, and Tibor Gyimóthy. 2018. Empirical evaluation of software maintainability based on a manually validated refactoring dataset. Information and Software Technology 95 (2018), 313-327.

Satnam Kaur and Paramvir Singh. 2019. How does object-oriented code refactoring influence software quality? Research landscape and challenges. Journal of Systems and Software 157 (2019), 110394.

Hieke Keuning, Bastiaan Heeren, and Johan Jeuring. 2019. How Teachers Would Help Students to Improve Their Code. In Proceedings of the 2019 ACM Conference on Innovation and Technology in Computer Science Education (Aberdeen, Scotland Uk) (ITiCSE '19). Association for Computing Machinery, New York, NY, USA, 119-125. https://doi.org/10.1145/3304221.3319780

Hieke Keuning, Bastiaan Heeren, and Johan Jeuring. 2021. A Tutoring System to Learn Code Refactoring. In Proceedings of the 52nd ACM Technical Symposium on Computer Science Education (Virtual Event, USA) (SIGCSE '21). Association for Computing Machinery, New York, NY, USA, 562-568. https://doi.org/10.1145/3408877.3432526

Miryung Kim, Thomas Zimmermann, and Nachiappan Nagappan. 2014. An Empirical Study of RefactoringChallenges and Benefits at Microsoft. IEEE Transactions on Software Engineering 40, 7 (2014), 633-649. https://doi.org/10.1109/TSE.2014.2318734

Guilherme Lacerda, Fabio Petrillo, Marcelo Pimenta, and Yann Gaël Guéhéneuc. 2020. Code smells and refactoring: A tertiary systematic review of challenges and observations. Journal of Systems and Software 167 (2020), 110610. https://doi.org/10.1016/j.jss.2020.110610

Michele Lanza and Radu Marinescu. 2007. Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer Science & Business Media.

Júlio Martins, Carla Bezerra, Anderson Uchôa, and Alessandro Garcia. 2020. Are Code Smell Co-Occurrences Harmful to Internal Quality Attributes? A Mixed-Method Study. In Proceedings of the 34th Brazilian Symposium on Software Engineering (Natal, Brazil) (SBES '20). Association for Computing Machinery, New York, NY, USA, 52-61. https://doi.org/10.1145/3422392.3422419

Júlio Martins, Carla Bezerra, Anderson Uchôa, and Alessandro Garcia. 2021. How Do Code Smell Co-Occurrences Removal Impact Internal Quality Attributes? A Developers' Perspective. Association for Computing Machinery, New York, NY, USA, 54-63. https://doi.org/10.1145/3474624.3474642

Gerardo Matturro, Florencia Raschetti, and Carina Fontán. 2019. A Systematic Mapping Study on Soft Skills in Software Engineering. J. Univers. Comput. Sci. 25, 1 (2019), 16-41.

Santiago A Vidal, Claudia Marcos, and J Andrés Díaz-Pace. 2016. An approach to prioritize code smells for refactoring. Automated Software Engineering 23, 3 (2016), 501-532.

Aiko Yamashita and Leon Moonen. 2013. Do developers care about code smells? An exploratory survey. In 2013 20th Working Conference on Reverse Engineering (WCRE). 242-251. https://doi.org/10.1109/WCRE.2013.6671299
Publicado
03/10/2022
Como Citar

Selecione um Formato
BEZERRA, Carla; DAMASCENO, Humberto; TEIXEIRA, João. Perceptions and Difficulties of Software Engineering Students in Code Smells Refactoring. In: WORKSHOP DE VISUALIZAÇÃO, EVOLUÇÃO E MANUTENÇÃO DE SOFTWARE (VEM), 10. , 2022, Online. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 41-45. DOI: https://doi.org/10.5753/vem.2022.226804.