Detecting bad smells in source code using change history information
Top Cited Papers
- 1 November 2013
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 268-278
Abstract
Code smells represent symptoms of poor implementation choices. Previous studies found that these smells make source code more difficult to maintain, possibly also increasing its fault-proneness. There are several approaches that identify smells based on code analysis techniques. However, we observe that many code smells are intrinsically characterized by how code elements change over time. Thus, relying solely on structural information may not be sufficient to detect all the smells accurately. We propose an approach to detect five different code smells, namely Divergent Change, Shotgun Surgery, Parallel Inheritance, Blob, and Feature Envy, by exploiting change history information mined from versioning systems. We applied approach, coined as HIST (Historical Information for Smell deTection), to eight software projects written in Java, and wherever possible compared with existing state-of-the-art smell detectors based on source code analysis. The results indicate that HIST's precision ranges between 61% and 80%, and its recall ranges between 61% and 100%. More importantly, the results confirm that HIST is able to identify code smells that cannot be identified through approaches solely based on code analysis.Keywords
This publication has 24 references indexed in Scilit:
- JDeodorant2011
- Blending Conceptual and Evolutionary Couplings to Support Change Impact Analysis in Source Code2010
- Assessing the impact of bad smells using historical information2007
- On the Use of Line Co-change for Identifying Crosscutting Concern Code2006
- Mining version histories to guide software changes2004
- Predicting source code changes by mining change historyIEEE Transactions on Software Engineering, 2004
- Metrics based refactoring2003
- Detecting defects in object-oriented designs1999
- A Unified Framework for Cohesion Measurement in Object-Oriented SystemsEmpirical Software Engineering, 1998
- Mining association rules between sets of items in large databases1993