An Empirical Study on Using Class Stability as an Indicator of Class Similarity

Mohammad Alshayeb*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

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.

Original languageEnglish
Pages (from-to)9413-9426
Number of pages14
JournalArabian Journal for Science and Engineering
Volume44
Issue number11
DOIs
StatePublished - 1 Nov 2019

Bibliographical note

Publisher Copyright:
© 2019, King Fahd University of Petroleum & Minerals.

Keywords

  • Class similarity
  • Class stability
  • Empirical study
  • Software metrics

ASJC Scopus subject areas

  • General

Fingerprint

Dive into the research topics of 'An Empirical Study on Using Class Stability as an Indicator of Class Similarity'. Together they form a unique fingerprint.

Cite this