Improving the Precision of Fowler's Definitions of Bad Smells
Authors:
- Min ZhangMZMin Zhang
- Nathan BaddooNBNathan Baddoo
- Paul WernickPWPaul Wernick
- Tracy HallTHTracy Hall
- 1 October 2008
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 15506215,p. 161-166
Abstract
Current approaches to detecting bad smells in code are mainly based on software metrics. We suggest that these methods lack precision in detecting bad smells, and we propose a code pattern-based approach to detecting bad smells. However before such a pattern-based approach can be implemented, Fowler's original definitions of bad smells need to be made more precise. Currently Fowler's definitions are too informal to implement in a pattern-searching tool. In this paper we use an expert panel to evaluate our enhanced definitions for five of Fowler's bad smells. We use a questionnaire to survey four experts' opinions of our bad smell definitions. Our results show that the experts basically agree with our enhanced definitions of the message chains, middle man and speculative generality bad smells. However, there are strong disagreements on our definitions of the data clumps and switch statements bad smells. We present enhanced definitions on the basis of these expert opinions.Keywords
This publication has 10 references indexed in Scilit:
- Do bad smells indicate "trouble" in code?2008
- An Extensible Meta-Model for Program AnalysisIEEE Transactions on Software Engineering, 2007
- An empirical study of the bad smells and class error probability in the post-release object-oriented system evolutionJournal of Systems and Software, 2007
- Automatic Generation of Detection Algorithms for Design Defects2006
- Product Metrics for Automatic Identification of "Bad Smell" Design Problems in Java Source-Code2005
- Detection strategies: metrics-based rules for detecting design flaws2004
- A survey of software refactoringIEEE Transactions on Software Engineering, 2004
- Identifying refactoring opportunities using logic meta programming2003
- Metrics based refactoring2003
- What software engineering can learn from soccerIEEE Software, 2002