see https://github.com/bf4/code_metrics/blob/bfebee2783dbc21ff9792c46b9b79953299ce0d0/lib/code_metrics/line_statistics.rb and https://github.com/bf4/code_metrics/blob/bfebee2783dbc21ff9792c46b9b79953299ce0d0/lib/tasks/statistics.rake#L13