Abstract
Coupling is a fundamental property of software systems, and numerous coupling measures have been proposed to support various development and maintenance activities. However, little is known about how developers actually perceive coupling, what mechanisms constitute coupling, and if existing measures align with this perception. In this paper we bridge this gap, by empirically investigating how class coupling---as captured by structural, dynamic, semantic, and logical coupling measures---aligns with developers' perception of coupling. The study has been conducted on three Java open-source systems---namely ArgoUML, JHotDraw and jEdit---and involved 64 students, academics, and industrial practitioners from around the world, as well as 12 active developers of these three systems. We asked participants to assess the coupling between the given pairs of classes and provide their ratings and some rationale. Results indicate that the peculiarity of semantic coupling allows such a measure to better estimate the mental model of developers than other coupling measures. This indicates that in several cases interactions between classes is encapsulated in source code vocabulary and comments and cannot be easily derived by only looking at structural relationships, such as method calls.
Object systems
Experimental Material
- Email sent to developers
- Pairs of classes selected from ArgoUML
- Pairs of classes selected from JHotDraw
- Pairs of classes selected from JEdit
- Execution traces used to compute the dynamic coupling