Concern-based Cohesion: Unveiling a Hidden Dimension of Cohesion Measurement

Cohesion has been avidly recognized as a key property of software modularity. Ideally, a software module is considered to be cohesive if it represents an abstraction of a single concern of the software. Modules with several concerns may be harder to understand because developers must mentally separate the source code related to each concern. Also, modules implementing several concerns are more likely to undergo changes as much as distinct development tasks may target its different concerns. The most well-known cohesion metrics are defined in terms of the syntactical structure of a module, and as a consequence fail to capture the amount of concerns realized by the module. In this context, we investigated the potential of a new metric, called Lack of Concern-based Cohesion. This metric explicitly counts the number of concerns realized by each module. We compared this metric with other five structural cohesion metrics by applying them over six open source software systems. We studied how those metrics are associated with module changes by mining over 16,000 repository revisions. Our results pointed out that the concern-based metric captured a cohesion dimension that is not reflected by structural metrics, and, as a consequence, adds to the association of cohesion and change-proneness

Target Systems:

Measurements:

Concern-to-code Mappings:

* T. T. Nguyen, H. V. Nguyen, H. A. Nguyen, and T. N. Nguyen. "Aspect recommendation for evolving software," in Proc. of the 33rd International Conference on Software Engineering (ICSE '11). ACM, New York, NY, USA, 361-370, 2011.
* Eaddy, M. et al. "Do crosscutting concerns cause defects?" in IEEE Transactions on Software Engineering, 34(4), pp. 497-515, 2008.

Descriptive Statistics:

descriptive.txt

R commands:

You can find further informations at the paper or contacting the authors.

Bruno Carreiro da Silva bcdasilv (at) calpoly (dot) edu
Cl�udio Sant'Anna santanna (at) dcc (dot) ufba (dot) br
Christina Chavez flach (at) dcc (dot) ufba (dot) br
Alessandro Garcia afgarcia (at) inf (dot) puc-rio (dot) br