Abstract

Software maintenance is an important software quality attribute. Many factors affect software maintenance, one of them being code cloning. Code clones are segments of code that are very similar. Software stability tends to measure the unchanged code elements. The objective of this paper is to find whether stability metrics can be used as an indicator of code structural similarity. I perform an empirical study to find the relationship between code similarity and stability at the class level. I also conduct clustering to classify stability and similarity metrics into different related groups. Finally, I perform principal component analysis to determine which class stability metrics have the strongest relationship with class similarity. In addition, I built a prediction model to predict class similarity using class stability metrics. The results show that the four investigated stability metrics have a significant relationship with similarity; however, the class stability metric (CSM) has the strongest correlation with code similarity. The clustering results also reveal that classes with high stability tend to have high similarity. In addition, I found that the CSM and class instability metric (CII) can both reveal 74.023% of class similarity. I conclude that stability metrics can be used as a good indicator of class similarity.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call