Discovering smell relations between temporary field and design smells: an empirical analysis
摘要
Code smells have an adverse impact on the quality of source code. Martin Fowler initially identified a set of 22 code smells. Since the term "code smell", there have been multiple attempts to understand them through their detection and to discover relationships between them using correlation and other approaches. The literature demonstrates multiple studies in which code smells have been found to exhibit relationships with other code smells. Nevertheless, the temporary field is one of the 22 code smells that has not been analysed to determine its relationship with other code smells. It is important to consider temporary field, as it has a detrimental impact on the maintainability of the source code. The study has conducted a review of the 7 smell relations identified by Pietrzak and Walter and proposed 3 new smell relations. It has evaluated these smell relations between temporary field and 17 design smells in 10 popular open-source Java applications that are widely cited in the literature and publicly accessible. The study has also done a correlation analysis of temporary field with 17 design smells. All code smells in the study were detected using an open-source tool called "TFfinder". The study reveals 18 significant smell relations between temporary field and design smells. Utilization of smell relations can facilitate an in-depth comprehension of code smells and aid in the prioritization of code smells for refactoring purposes. In addition, it can assist a developer in identifying classes that need more maintenance effort and impact the maintainability of the code.