Distance Metric Based Divergent Change Bad Smell Detection And Refactoring Scheme Analysis

Dexun Jiang,Peijun Ma,Xiaohong Su,Tiantian Wang
2014-01-01
Abstract:Bad smells are signs of potential problems in codes. Bad smells decrease the design quality of software, so the codes are hard to analyze, understand, test or reuse. Divergent Change is a common and classical bad smell in object oriented programs. The detection of this bad smell is difficult, because the features of Divergent Change are not obvious, and the detecting and refactoring of this bad smell are on the later steps of software life cycle. In this paper, the detection method of Divergent Change bad smell based on distance metric and K-nearest neighbor clustering technology is proposed. The features of Divergent Change are analyzed and transformed to distances between entities. Divergent Change bad smells are detected with the results of K-nearest neighbor clustering, and targeted refactoring schemes are provided. After comparisons with similar researches, the experiments results on open source programs show that the proposed method behaves well on refactoring evaluation with low time complexity.
What problem does this paper attempt to address?