-
- The Prototype
-
-
- Research
Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Structure detectors evaluate certain structures and return a numeric value in a metric specific range for them, if they can be calculated (sometimes division by zero prevents calculation).
Test are contained in prolog-tests/org/cs3/cultivate/pl/metrics/
Metric | Granularity | Description | Test Case |
---|---|---|---|
abstractness | package | number of abstract classes in category ÷ total number of classes in category | AbstractnessTest.java |
afferent couplings (Ac) | package | number of classes outside this package that depend upon classes within this package | AfferentCouplingTest.java |
depth of inheritance tree | class | number of steps up to Object in the inheritance tree | DepthOfInheritanceTreeTest.java |
distance (normalized) | package | Dn = abs(Abstractness + Instability - 1) | DistanceTest.java |
efferent couplings (Ec) | package | number of classes outside this package that classes within this package depend upon | EfferentCouplingTest.java |
instability | package | Ec / (Ac + Ec) if Ac + Ec != 0 0 otherwise | InstabilityTest.java |
lcom2 | class | lack of cohesion of methods (excluding all trivial getters) 1 - (NumberOfMethodsAccessingFields/(NumberOfMethods*NumberOfFields)) | LCOM2Test.java |
noc | class | number of children (number of direct subclasses) | NOCTest.java |
number of abstract classes | package | number of abstract classes | NumberOfAbstractClassesTest.java |
number of classes | package | number of classes, abstract classes and interfaces in a package | NumberOfClassesTest.java |
number of descendants | class | nod = number of descendants (direct and indirect subclasses) | NumberOfDescendantsTest.java |
number of interfaces | package | number of interfaces in a package | NumberOfInterfacesTest.java |
number of overridden methods | class | norm = number of overridden methods | NumberOfOverriddenMethodsTest.java |
six | class | specialization index (depthOfInheritanceTree*NumberOfOverriddenMethods)/NumberOfMethods | SIXTest.java |
static test coverage | class | percentage of public methods called by tests | StaticTestCoverageTest.java |
Structure detectors detect structures that are bad smells.
Test are contained in prolog-tests/org/cs3/cultivate/pl/smells/
Smell | Granularity | Description | Test Case |
---|---|---|---|
no operation (nop) | statement | empty statements | NopSmellTest.java |
misnamed testclass | class | test class that's name does not end with “Test” | MisnamedTestclassTest.java |
sideeffects in getters | method | getters do more than calculate results and return them proposal: categories no side effects, possible side effects, known side effects | SideEffectInGetterTest.java |
for testers only | method | finds methods that are only used by tests | ForTestersOnlyTest.java |
package circularity | package | finds all strongly connected package components with more than one package in the package dependency graph |
Structure detectors detect structures like inheritance or package dependencies. Their results are used in different diagrams.
Test are contained in prolog-tests/org/cs3/cultivate/pl/structures/
Structure | Granularity | Description | Test Case |
---|---|---|---|
class dependency | class | checks whether on class depends on another or not | ClassDependencyTest.java |
package dependency | package | ||
inheritance | class | checks if one class extends another | InheritanceTest.java |
Queries allow further investigation on certain PEFs from special views, sophisticated java analyzers etc.
Test are contained in prolog-tests/org/cs3/cultivate/pl/queries/
Query | Granularity | Description | Test Case |
---|---|---|---|
full qualified name | |||
location |