Object Oriented Cohesion Metrics
Amr F. Desouky, Letha Hughes Etzkorn · 2014
Software cohesion metrics measure the degree to which a class and its members are interconnected. Cohesion metrics have traditionally been captured statically, rendering useful results, but often times imprecise, as the complete set of source code is considered, in oppose to the subset of code that actually executes. In this paper, we present a new metric which measures the degree of cohesion in relation to objects of a class at runtime. As part of this study, we also perform an empirical investigation into existing runtime cohesion metrics. The metrics are validated by correlating them to bugs. We employ Rhino 1.7R4 - an open source JavaScript implementation written in Java, so as to observe the program's behavior during the runtime boundary. It is called the “runtime boundary” as object oriented quality is being measured at runtime rather than performance; normal performance metrics collected at runtime are typically neither object oriented nor focused on quality.