Go BackGo Forward Index Home    


Logical Lines Of Code (LLOC)

Logical Lines Of Code is the number of programming language statements (also called Effective Lines Of Code, eLoc, eSLOC, SLOC-L) in the code. What comprises a code statement is language dependent, for C language "i = 5;" is a single statement.
ProjectCodeMeter uses an LLOC variant similar to the LLOC recommended by the COCOMO-II model (in contrast to popular belief, COCOMO-II doesn't use physical SLOC which includes empty and comment lines).
The LLOC count variant used by ProjectCodeMeter includes the following improvements:
- auto-generated code lines are ignored
- header files are ignored
- ineffective code statements are ignored
- pragma compiler directives are ignored
- labels are ignored
- switch cases are not statements by themselves (so empty "case" is ignored)
- several statements on the same physical line are counted as several LLOC

  for (i=0;  i < 5; i++;){  //this line counts as 3 LLOCs by ProjectCodeMeter
        CreateUser(i); //the line counts as 1 LLOC
 }    //this line counts as 0 LLOC

This LLOC variant can be used with legacy sizing algorithms and cost models, as a higher accuracy input replacement for the Source Lines Of Code (SLOC ) parameter, for example in COCOMO and COSYSMO.