A MODEL FOR PREDICTING CLASS MOVEMENT IN AN INHERITANCE HIERARCHY

作者:Nasseri E*; Counsell S
来源:International Journal of Software Engineering and Knowledge Engineering, 2011, 21(5): 647-665.
DOI:10.1142/S021819401100544X

摘要

In this paper, we present an empirical study to investigate whether class movement and re-location within inheritance hierarchy can be predicted based on size, coupling and cohesion for four Java open-source systems. Our results showed that class movement may not be predicted based on coupling and cohesion, and while class size was found to be a factor that may help predict class movement, it does not per se predict class movement within an inheritance hierarchy. We found a significantly higher odds ratio for larger classes to be moved within an inheritance hierarchy than that of smaller classes, suggesting that, counter-intuitively, larger classes tend to be more susceptible to movement than smaller classes. We also found that in the four systems, while classes with high coupling, low cohesion and larger size tended to be moved within their respective inheritance hierarchy, classes with high coupling, low cohesion and relatively smaller size tended to be candidate classes for deletion. Finally, while we found that class coupling and size tended to rise as the systems evolved we found no statistical support for class cohesion to decline. Directed towards developers and project managers, the message that the research conveys is that excessive growth in class size is at the root of a class' deterioration in terms of movement; developmental controls should be exercised to avoid such growth.

  • 出版日期2011-9

全文