Detecting Bad Smells in Object Oriented Design Using Design Change Propagation Probability Matrix

A Rao, K Reddy
Object oriented software systems are subject to frequent modifications either during development (iterative, agile software development) or software evolution. For such systems which have large number of classes, detection of design defects is a complex task. Bad smells are used to identify design defects in object oriented software design. Identification of bad smells allows us to apply appropriate refactorings to improve the quality of design. In existing bad smell detection systems, bad
more » ... s are generally detected using human intuition, and recently, people started developing quantitative methods. As human intuition is subjective, the quantitative methods to detect bad smells are effective as they do not include subjectivity (bias) and allows for automation. This paper proposes a quantitative method. The proposed quantitative method makes use of the concept design change propagation probability matrix (DCPP matrix) to detect two important bad smells. The first one is shotgun surgery bad smell and the other one is divergent change bad smell. Two of the advantages of the proposed quantitative method are: Detecting shotgun surgery and divergent change bad smells require that the design change propagation between artifacts that are connected directly and indirectly should be considered quantitatively. The proposed method considers this aspect quantitatively. The second advantage is, the method is amicable for automation. Using this proposed method, with typical example designs, the bad smells shotgun surgery and divergent change are detected. Appropriate refactorings are suggested for the detected bad smells. Different advantages of the proposed quantitative method are presented. A broader framework in which this quantitative method is applied is given.