http://xradar.sourceforge.net |
Statics Report - System: 4.0, Version: 730, Date: 2004.01.01 | Designed for use with , Checkstyle, CKJM, CLOC, EMMA, FindBugs, JavaNCSS, JDepend, JUnit, Macaron, PMD, PMD-CPD, Java2HTML and Ant. |
[Statics] explanations |
|
[scorecard] [analysis] [explanations] | |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Afferent Couplings [CA] | int | - | The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. One may also this package fan-in. | jdepend |
Efferent Couplings [CE] | int | - | The number of other packages that the classes in the package depend upon is an indicator of the package's independence. One may also this package fan-in. | jdepend |
Abstractness [A] | double | 0 - 1 | The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. | jdepend |
Instability [I] | double | 0 - 1 | The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. | jdepend |
Distance [D] | double | 0 - 1 | The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. | jdepend |
Cycles [] | boolean | - | If there are cyclic dependencies in a package, the value is true. Cyclic dependency detection may not report all cycles reachable from a given package. The detection algorithm stops once any given cycle is detected. If the same cycle is reachable from another package, the cycle may be reported more than once. In general, you want to aggressively remove any cycles. | jdepend |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Weighted methods per class [WMC] | int | - | A class's weighted methods per class WMC metric is simply the sum of the complexities of its methods. As a measure of complexity we can use the cyclomatic complexity, or we can abritrarily assign a complexity value of 1 to each method. The ckjm program assigns a complexity value of 1 to each method, and therefore the value of the WMC is equal to the number of methods in the class. | ckjm |
Depth of Inheritance Tree [DIT] | int | - | The depth of inheritance tree (DIT) metric provides for each class a measure of the inheritance levels from the object hierarchy top. In Java where all classes inherit Object the minimum value of DIT is 1. | ckjm |
Coupling between object classes [CBO (Ce)] | int | - | The coupling between object classes (CBO) metric represents the number of classes coupled to a given class (efferent couplings, Ce). This coupling can occur through method calls, field accesses, inheritance, arguments, return types, and exceptions. | ckjm |
Response for a Class [RFC] | int | - | The metric called the response for a class (RFC) measures the number of different methods that can be executed when an object of that class receives a message (when a method is invoked for that object). Ideally, we would want to find for each method of the class, the methods that class will call, and repeat this for each called method, calculating what is called the transitive closure of the method's call graph. This process can however be both expensive and quite inaccurate. In ckjm, we calculate a rough approximation to the response set by simply inspecting method calls within the class's method bodies. This simplification was also used in the 1994 Chidamber and Kemerer description of the metrics. | ckjm |
Lack of cohesion in methods [LCOM] | int | - | A class's lack of cohesion in methods (LCOM) metric counts the sets of methods in a class that are not related through the sharing of some of the class's fields. The original definition of this metric (which is the one used in ckjm) considers all pairs of a class's methods. In some of these pairs both methods access at least one common field of the class, while in other pairs the two methods to not share any common field accesses. The lack of cohesion in methods is then calculated by subtracting from the number of method pairs that don't share a field access the number of method pairs that do. Note that subsequent definitions of this metric used as a measurement basis the number of disjoint graph components of the class's methods. Others modified the definition of connectedness to include calls between the methods of the class. The program ckjm follows the original (1994) definition by Chidamber and Kemerer. | ckjm |
Afferent couplings [Ce] | int | - | A class's afferent couplings is a measure of how many other classes use the specific class. Ca is calculated using the same definition as that used for calculating CBO (Ce). | ckjm |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Total Classes [C] | int | - | The total number of abstract and concrete classes in a package. | jdepend |
Concrete Classes [CC] | int | - | The total number of instantiatable classes in a package (not abstract or interfaces). | jdepend |
Abstract Classes [AC] | int | - | The total number of abstract classes and interfaces in a package that are not instantiatable. | jdepend |
Methods [M] | int | - | Total number of private, default, protected ans public methods in class. | javancss |
Non-Commented Source Statements [NCSS] | int | - | The number of Non Commeneted Source Statements in a method. These values are aggregated on class and package level. | javancss |
Cyclomatic Complexity Number [CCN] | int | - | The the total Cyclomatic Complexity in a method. These values are aggregated on class and package level. This metric is also called the McCabe metric. | javancss |
Code Violations [CV] | int | - | The code violations found based on configuration set up. Violations are matched according to breaking of configured rules (look at source). The rules are typically in the form of code heuristics. | pmd |
Style Errors [SE] | int | - | The style errors found based on configuration set up. A style error occurs when a piece of code breaks the configured code conventions. | checkstyle |
Number of positive bug patterns [PBP] | int | - | The bug patterns matched are from the following categories: bad practice, correctness, internationalization, malicious code vulnerability, multithread correctness, performance and dodgy. | fb |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Javadocs [JD] | int | - | Number of formal Javadoc comments per class and method. | javancss |
Javadoc Lines [JDL] | int | - | Number of formal Javadoc comment lines per class and method. | javancss |
Single Comment Lines [SCL] | int | - | Number of single-comment lines in the code. | javancss |
Multi Comment Lines [MCL] | int | - | Number of multi-comment lines in the code. | javancss |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Duplications [DUPL] | int | - | Number of duplications in a class. | pmd-cpd |
Duplicated Lines [DL] | int | - | Number of duplicated lines in a class. This line metric does not represent the same as ncss above. Hence, they are not comparable. | pmd-cpd |
Duplicated Tokens [DT] | int | - | Number of duplicated tokens in a class. A token is defined as a symbol in the program (i.e. variable, type declerator, operator, etc.). See the source for more info. | pmd-cpd |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Unit Test Suites [UTS] | int | - | The number of unit test suites. | junit |
Unit Tests [UT] | int | - | The number of unique unit tests. | junit |
Unit Test Errors [UE] | int | - | The number of unit test errors (failing unit tests). | junit |
Unit Test Line Coverage [UC] | double | 0 - 1 | Identifies the test coverage of the executable statements in the system at the level of scope: method level, class level, package, subsystem, system. For example, if you say that you have a testcoverage of 25% on a method, 25% of the executable source statements have been covered by a unit test when running. | jcoverage |
Source Statements Unit Test Covered [NCSSUC] | double | - | The number of ncss covered by the unit tests. | jcoverage |
Metric | Type | Range | Description | Source |
---|---|---|---|---|
Change Activity [CAC] | int | - | All Change Issues that have affected a class. This is simply summed up at package, subsystem and system level. | source-control |
Error Activity [EAC] | int | - | All Error Issues that have affected a class. This is simply summed up at package, subsystem and system level. | source-control |
Changed Classes [CCL] | int | - | All classes that are affected by Change Issues. This is simply summed up at package, subsystem and system level. | source-control |
Error Changed Classes [ECL] | int | - | All classes that are affected by Error Issues. This is simply summed up at package, subsystem and system level. | source-control |
Dependancy and stability analysis of packages.
Link : http://www.clarkware.com/software/JDepend.html
Analysis of some standard metrics on classes.
Link : http://www.kclee.com/clemens/java/javancss/
Produces the standard OO-metrics.
Link : http://www.spinellis.gr/sw/ckjm/
Discovery of bad/violating code.
Link : http://pmd.sourceforge.net
Discovery of duplicated code.
Link : http://pmd.sourceforge.net/cpd
Discovery of style errors in code.
Link : http://checkstyle.sourceforge.net
Defacto unit test suite standard for Java.
Link : http://www.junit.org
JUnit code covereage tool
Link : http://www.jcoverage.com
Count lines of code tool
Link : http://cloc.sourceforge.net/
FindBugs looks for bug patterns in Java programs
Link : http://findbugs.sourceforge.net/