Software Metrics Research and Development Assurance Tools and Techniques Project Support and Outreach Continuous Risk Management

Code Metrics Image

Object Oriented Metric Definitions

# File The total number of files in a project
# Classes  The total number of classes in a project
# NTLC The total number of top level classes in a project
LOC The total Lines of Code found in a project (Source lines + Blank lines + comment lines)
Preprocess (imports) The total number of preprocessor lines in a project (e.g. #include)
Blank The total number of blank lines that contain no code or comments on the line found in a project
Comm Total number of comments freestanding + inline comments
CP Comment Percentage = Comm / (LOC - Blank)
NCNB (Non-Comment Non-Blank) also known as Source Lines of Code
Exec. Stmts. Total number of executable statements in a project
Number of Methods (NOM) A simple count of methods in a class definition
Weighted Methods per Class (WMC) The sum of the cyclomatic complexities of the methods in a class
Coupling Between Objects (CBO) The number of other classes whose methods or instance variables are used by methods of this class
Response for a Class (RFC) The number of methods in the class + the number of methods called by each of these methods, where each called method is counted once

CODE METRICS - HOME PAGE 

 
 

 SATC Home Send E-Mail to the SATC NASA Goddard NASA IV+V

Copyright © 1998
Software Assurance Technology Center

This page was last updated on:
08/22/00