CodeQL library for C#
codeql/csharp-all 0.9.2-dev (changelog, source)
Search

Member predicate ValueOrRefType::getLackOfCohesionCK

Gets the Chidamber and Kemerer lack of cohesion metric.

This is defined as as the number of pairs of methods in this type that do not have at least one field in common, minus the number of pairs of methods in this type that do share at least one field. When this value is negative, the metric value is set to 0.

Types with a high Chidamber and Kemerer metric have multiple responsibilities so could be refactored.

float getLackOfCohesionCK()