HIST (Historical Information for Smell deTection) - Replication Package
Bad code smells are symptoms of poor design and implementation choices that may hinder code comprehensibility. While most of the detection techniques rely on structural information, many bad code smells are intrinsically characterized by how code elements change over time. In this paper, we propose HIST (Historical Information for Smell deTection), an approach exploiting change history information to detect instances of five different bad code smells, namely Divergent Change, Shotgun Surgery, Parallel Inheritance, Blob, and Feature Envy. We evaluate HIST in two empirical studies. The first, conducted on twenty open source projects, aimed at assessing the accuracy of HIST in detecting instances of the above mentioned bad code smells. In this study we compare HIST with state-of-the-art smell detectors based on source code analysis. The results indicate that HIST’s precision ranges between 72% and 86%, and its recall ranges between 58% and 100%. More importantly, the results indicate that HIST is able to identify bad code smells that cannot be identified through approaches solely based on code analysis. Then, we conducted a second study aimed at investigating to what extent the bad code smells detected by HIST (and by the competitive code analysis techniques) reflect developers’ perception of poor design and implementation choices. We involved twelve developers of four open source projects that recognized as design/implementation problems more than 75% of the bad code smell instances identified by HIST.