private PSPSizeMeasure countAsModification(CodeHistory current, CodeHistory previous) { var c1 = (LOCMeasure)loc.Measure(previous); var c2 = (LOCMeasure)loc.Measure(current); var changes = DiffHelper.SimpleDiff(current.Content, previous.Content); PSPSizeMeasure m = new PSPSizeMeasure() { Base = c1.PhysicalLOC, Added = changes.Count(t => t == ChangeType.Inserted), Deleted = changes.Count(t => t == ChangeType.Deleted), Modified = changes.Count(t => t == ChangeType.Modified), Total = c2.PhysicalLOC }; return(m); }