five

Refactoring Code Smells in Open Source Projects: A Hands-on Approach to Teaching Software Maintenance

收藏
Zenodo2025-07-14 更新2026-05-26 收录
下载链接:
https://zenodo.org/doi/10.5281/zenodo.11087486
下载链接
链接失效反馈
官方服务:
资源简介:
Code smells are suboptimal code structures that can undermine software quality and maintainability. On the one hand, software engineers commonly apply refactoring techniques to address these deficiencies and improve internal quality attributes. On the other hand, when performed manually and without discipline, refactoring can lead to code degradation. Despite its importance, refactoring and code smells are rarely explored in depth in undergraduate computing courses, which can be reflected in industry practices. To address this gap, this paper presents a hands-on approach to teaching code smell refactoring through contributions to Open Source Software (OSS) projects, an environment where developers with diverse skill levels collaborate, and maintaining code quality is particularly challenging. Code smells accumulate over time in such scenarios, hindering software evolution and collaboration. Our study in two undergraduate Software Quality and Software Maintenance courses expands on previous findings by incorporating an in-depth analysis of students’ learning experiences. The results indicate that: (i) students rec- ognized improvements in code quality after refactoring; (ii) they identified strong connections between refactoring, testing, and debugging; (iii) their confidence decreased when refactoring required changes across multiple files; (iv) code complexity posed a significant challenge to refactoring; (v) students’ choices of refactoring techniques were influenced by project structure and personal preferences, often combining multiple techniques to address a single smell; (vi) in some cases, refactoring introduced new code smells; (vii) the longest refactoring efforts were also the most likely to reintroduce code smells; (viii) contributing to OSS projects improved students’ programming skills and fostered a sense of professional growth; (ix) students faced challenges in understanding OSS contribution processes, particularly regarding issue resolution, adherence to contribution guidelines, and responding to maintainer feedback; (x) automated checks and review workflows varied across projects, affecting students’ ability to submit successful contributions; and (xi) despite these challenges, engagement with OSS enabled students to gain practical experience in collaborative software development. Our findings offer valuable insights for software engineering educators seeking to integrate refactoring practices into coursework while leveraging OSS contributions as an educational tool.
提供机构:
Zenodo
创建时间:
2024-05-14
二维码
社区交流群
二维码
科研交流群
商业服务