Abstract
Code smells tend to have an impact on software quality attributes such as reusability, maintainability, and understandability. These are code flaws that do not necessarily prevent the system from operating; rather, they increase the possibility of defects occurring in the future. Hence, to maintain code quality, code smells should be detected and corrected through refactoring. The objective of this paper is to investigate the associated risk of applying refactoring techniques and reveal the bad smells that may appear when fixing other bad smells. We conducted several controlled experiments to identify the smells that emerge after refactoring. The experiments resulted in a novel taxonomy revealing 9 bad smells that may appear as a result of fixing other bad smells. This represents the first study attempting to systematically identify and organize such refactoring-smell relationships into a taxonomy. The research results can assist developers in relating different bad smells to each other and helping them determine the refactoring technique that should be applied when certain smells are present. Moreover, the results can be beneficial in breaking the cycle of bad smells. Such knowledge tends to enhance code refactoring, which in turn will improve software quality and avoid technical debt.
Original language | English |
---|---|
Article number | 103120 |
Journal | Science of Computer Programming |
Volume | 236 |
DOIs | |
State | Published - Sep 2024 |
Bibliographical note
Publisher Copyright:© 2024 Elsevier B.V.
Keywords
- Code smell
- Maintainability
- Refactoring
- Refactoring sequence
- Technical debt
ASJC Scopus subject areas
- Software
- Information Systems
- Modeling and Simulation
- Computational Theory and Mathematics