This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I need simple code metrics functionality which I think is useful in support and refactoring old projects (especially, written by someone else). I'd suggest to implement the following: 1) total lines of code in the source file (only code); 2) total lines of code in sense of number of operators (it may be useful when several operators are placed in the same line, separated with ';'); 3) total lines of comments in the given source file (in line comments should be counted as well); 4) code density for any given source code file (lines of code and lines of comments ratio); 5) source code complexity (any method, for example, number of nested constructions - if, switch, for, while, do - in the function body).
Well known metrics for code complexity. Simple: - LOC lines of code - SLOC semicolon lines of code - CR comments ratio Halstead complexity metric: - Program length - Program vocabulary - Volume - Difficulty - Effort McCabe complexity: - Cyclomatic Complexity