This Is AuburnElectronic Theses and Dissertations

Empirical Evidence of the Consequences of Bad Smells in Software




Topuz, Fatma Neda

Type of Degree

PhD Dissertation


Computer Science and Software Engineering


A “smell” is a property of software source code that indicates a deeper problem. Smells do not necessarily affect the code at the immediate point in time but are thought to cause problems during a later phase of the software’s evolution. Developers tend to downplay the impact of bad smells and, consequently, fail to remove them; however, bad smells introduce complexity and, thus, introduce the possibility of degrading code maintainability over time and causing troublesome side effects later as the software is changed. While the concept of code smells and their potential impact on future software maintainability has logical appeal, the proof of the impact of code smells is largely anecdotal. Our research sought empirical evidence of the effect of code smells on defects by examining five production-level open-source Python projects. Specifically, we analyzed (1) GitHub change logs and (2) defect logs to determine smell-to-defect correlation and an empirical analysis of open-source Python projects. We made the investigation on five different scale projects. Our results indicate that the Long Parameter List code smell has the highest positive correlation, the Long Method, Large Class and Shot- gun Surgery, when detected with medium extracted threshold values, smells have a moderate correlation, and the Parallel Inheritance Hierarchy, Data Class, Lazy Class, Refused Bequest, Feature Envy and Shotgun Surgery smells when detected with low and high extracted threshold values proposed in the literature have no significant correlation on the presence of defects.