1. Open the source file 2. Read line from source 3. Filter for lines which are not logical lines of code ( Comments, Whitespace, braces ...etc) 4. If the line passes all the filters then increment the counter 5. Iterate from step 2 until EOF It would be good if the filter conditions are configurable through a XML file or a properties file.