Java Source Code Metrics
The JavaMetrics tool computes a number of useful metrics for Java program source code suites. It is a member of SD's family of Source Code Metrics tools. An example of the JavaMetrics tool results can be seen here.
Java Metrics Features
- Repeatable operation across specified set of files
- Metrics computed at module level:
- Source Lines of Code (SLOC)
- Noncommented Source Lines of Code
- Comment Lines
- Number of Methods
- Decision Density
- Cyclomatic Complexity
- Maximum loop nesting
- Maximum conditional nesting
- Halstead measures (volume, difficulty and effort)
- Software Engineering Institute (SEI) Maintainability Index
- Class, Package and File counts
- Worst-case nesting metrics pinpointed to specific file/line
- Summaries per class/file/package
- Text report
- XML report, reformattable in any way desired (example)