Optimizing Search Space in Code Smells Detection using a Novel Metric
Abstract
Detecting code smell in large-scale projects is a critical aspect of software maintenance. Typical code smell detection approaches search code smell in all source files, and this process continues in multiple phases of the development lifecycle. That process may computationally complex for real-life large-scale projects due to the vast size of the search space. In this study, a simple search space reduction approach is proposed for code smell detection based on a novel software evolution metric of change history information. The proposed approach is evaluated on 11 popular and large-scale projects from GitHub using code smells dataset of four code smells - Blob, Feature Envy, Divergent Change, Parallel Inheritance. Primarily, these four code smells are selected to explore the applicability of the proposed search space reduction approach. The results have shown that the proposed metric significantly reduces the search space while detecting a sound percentage of the actual code smell. It is also analyzed that this approach performs considerably better in detecting Blob, Feature Envy, and Divergent Change, while depicting relatively poor performance for Parallel Inheritance. In the future, other common code smells and more large-scale projects will be analyzed using this approach.
Keywords
software maintenance, software evolution, code smells, search space reduction, change history