Henderson-Sellers

Henderson-Sellers defines Lack of Cohesion in Methods as follows. Let:

M be the set of methods defined by the class
F be the set of fields defined by the class
r(f) be the number of methods that access field f, where f is a member of F
<r> be the mean of r(f) over F.

Then:

Lack of Cohesion in Methods = <r> - |M|
1 - |M|

Note 1: I have only included methods if they access at least one field.

Note 2: I have only included fields if they are accessed by at least one method in the class.


This plugin is provided by State Of Flow