Description
The Blob (also called God class) corresponds to a large controller class that
depends on data stored in surrounding data classes. A large class declares many
fields and methods with a low cohesion. A controller class monopolises most of
the processing done by a system, takes most of the decisions, and closely
directs the processing of other classes. We identify controller classes using
suspicious names such as Process, Control, Manage, System, and so on. A data
class contains only data and performs no processing on these data. It is
composed of highly cohesive fields and accessors.
Detection Rules
RULE_CARD : Blob {
RULE : Blob {ASSOC: associated FROM: mainClass ONE TO: DataClass MANY } ;
RULE : mainClass {UNION LargeClassLowCohesion ControllerClass } ;
RULE : LargeClassLowCohesion {UNION LargeClass LowCohesion } ;
RULE : LargeClass { (METRIC: NMD + NAD, VERY_HIGH, 20) } ;
RULE : LowCohesion { (METRIC: LCOM5, VERY_HIGH, 20) } ;
RULE : ControllerClass {UNION (SEMANTIC: METHODNAME, {Process, Control, Command, Manage, Drive, System})
(SEMANTIC: CLASSNAME, {Process, Control, Command, Manage, Drive, System}
RULE : DataClass {(STRUCT: METHOD_ACCESSOR, 90) } ;
} ;