enhanced LineOfCodeCalculator

it is now more general and it can now also be used in Duplicate module
and other modules