NASA - National Aeronautics and Space Administration
Follow this link to skip to the main content
+ Site Help & Preferences
Go
ABOUT NASA LATEST NEWS MULTIMEDIA MISSIONS MyNASA WORK FOR NASA

+ NASA Home
+ IVV Home
Metrics Data Program
MDP HOME
WHAT IS THE MDP?
CONTACT THE MDP TEAM
PROJECT RECRUITING
REPOSITORY OVERVIEW
REPOSITORY LISTING ACCESS
MDP Banner

LINE OF CODE METRICS

Total LOC | Executable LOC | Comment LOC
Blank LOC | Code & Comment LOC | Percent Comments | Number of Lines

Total Lines of Code
Handle: LOC
Description: The number of lines in a module. This particular metric includes all blank lines, comment lines, and source lines.
Observation: This metric is generated using McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one line - one count.
Range: No maximum exists.
Usage: This is a standard metric for measuring system size and to an extent effort. This metric has also been shown to be a predictor of error.
Relationship: It is a measure of size.
Threshold: Two hundred is generally accepted. Two IV&V studies show that over 200 lines does significantly increase errors.
Validation: There are two studies that show it as a good predictor of error. Better than 50/50.

+ Top

Executable Lines of Code
Handle: SLOC
Description: Source lines of code that contain only code and white space.
Observation: This metric is generated with McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one source line - one count.
Range: Unlimited.
Usage: None, currently.
Relationship: Size.
Threshold: Unknown.
Validation: None, currently.

+ Top

Comments
Handle: CLOC
Description: Source lines of code that are purely comments
Observation: This metric is generated with McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one comment line - one count.
Range: Unlimited.
Usage: None, currently.
Relationship: Unknown.
Threshold: Unknown.
Validation: None, currently.
+ Top

Blank
Handle: BLOC
Description: Lines with only white space or no text content.
Observation: This metric is generated with McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one blank line, one count.
Range: Unlimited.
Usage: None, currently.
Relationship: Unknown.
Threshold: Unknown.
Validation: None, currently.

+ Top

Code and Comment
Handle: C&SLOC
Description: Lines that contain both code and comment.
Observation: This metric is generated with McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one combined line - one count.
Range: Unlimited.
Usage: None, currently.
Relationship: Unknown.
Threshold: Unknown.
Validation: None, currently.

+ Top

Percent Comments
Handle: % Comments
Description: Percentage of the code that is comments. Calculated as: ((CLOC+C&SLOC)/(SLOC+CLOC+C&SLOC))*100
Observation: This metric is generated with McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one combined line - one count.
Range: Unlimited.
Usage: None, currently.
Relationship: Unknown.
Threshold: Unknown.
Validation: None, currently.

+ Top

Number of Lines
Handle:nl
Description: Number of lines in a module. Pure, simple count from open bracket to close bracket. Includes every line in between, regardless of character content.
Observation: This metric is generated with McCabeIQ 7.1.
Frequency: Frequency is determined by the requirements of each project.
Scale: This is one combined line - one count.
Range: Unlimited.
Usage: None, currently.
Relationship: Unknown.
Threshold: Unknown.
Validation: None, currently.

+ Top


+ Freedom of Information Act
+ Budgets, Strategic Plans and Accountability Reports
+ The President's Management Agenda
+ Privacy Policy and Important Notices
+ Inspector General Hotline
+ Equal Employment Opportunity Data Posted Pursuant to the No Fear Act
+ Information-Dissemination Priorities and Inventories
+ USA.gov
+ ExpectMore.gov
NASA
Editor: Jay Long
NASA Official: Lisa Montgomery
Last Updated: June 10, 2008
+ Contact IV&V
+ Contact Tools Lab
+ Metrics Data Program Usage Policy