|Authors||E. Arisholm, L. Briand and A. Føyen|
|Title||Dynamic Coupling Measurement for Object-Oriented Software (Detailed Analyses)|
|Afilliation||Software Engineering, Software Engineering|
|Publication Type||Technical reports|
|Year of Publication||2003|
|Publisher||Simula Research Laboratory|
The relationships between coupling and external quality factors of object-oriented software have been studied extensively for the past few years. For example, several studies have identified clear empirical relationships between class-level coupling and class fault-proneness. A common way to define and measure coupling is through structural properties and static code analysis. However, because of polymorphism, dynamic binding, and the common presence of unused (“dead”) code in commercial software, the resulting coupling measures are imprecise as they do not perfectly reflect the actual coupling taking place among classes at run-time. For example, when using static analysis to measure coupling, it is difficult and sometimes impossible to determine what actual methods can be invoked from a client class if those methods are overridden in the subclasses of the server classes. Similarly, static analysis is not a fully appropriate tool to account for dead code. Coupling measurement has traditionally been performed using static code analysis, because most of the existing work was done on non-object oriented code and because dynamic code analysis is more expensive and complex. This paper describes how coupling can be defined and precisely measured on the basis of dynamic analysis or equivalent dynamic models of the system. We refer to this type of coupling as dynamic coupling. A first empirical evaluation of the proposed dynamic coupling measures is reported in which we study the relationship of these measures with the change proneness of classes. Data from maintenance releases of a large Java system are used for this purpose. Preliminary results suggest that some dynamic coupling measures are strong indicators of change proneness and that they complement existing coupling measures based on static analysis.
Updated April 26, 2004