# Global Metrics

path: .metrics.mi.mi_sei
old: 57.044562567565656
new: 25.91545653074234
path: .metrics.mi.mi_visual_studio
old: 42.00270956090411
new: 24.20130626146813
path: .metrics.mi.mi_original
old: 71.82463334914603
new: 41.384233707110496
path: .metrics.loc.ploc
old: 34.0
new: 92.0
path: .metrics.loc.lloc
old: 1.0
new: 56.0
path: .metrics.loc.cloc
old: 8.0
new: 52.0
path: .metrics.loc.sloc
old: 53.0
new: 153.0
path: .metrics.loc.blank
old: 11.0
new: 9.0
path: .metrics.cognitive.sum
old: 0.0
new: 33.0
path: .metrics.cognitive.average
old: 0.0
new: 4.714285714285714
path: .metrics.nargs.sum
old: 0.0
new: 19.0
path: .metrics.nargs.average
old: 0.0
new: 2.7142857142857144
path: .metrics.cyclomatic.sum
old: 8.0
new: 26.0
path: .metrics.cyclomatic.average
old: 1.0
new: 2.888888888888889
path: .metrics.nexits.sum
old: 1.0
new: 13.0
path: .metrics.nexits.average
old: 1.0
new: 1.8571428571428572
path: .metrics.halstead.estimated_program_length
old: 221.07945293834572
new: 407.6639356006158
path: .metrics.halstead.bugs
old: 0.09928714869080396
new: 1.134123999714841
path: .metrics.halstead.volume
old: 572.1226517227967
new: 3308.863293486908
path: .metrics.halstead.level
old: 0.11129296235679216
new: 0.016672707502718376
path: .metrics.halstead.n1
old: 13.0
new: 31.0
path: .metrics.halstead.N1
old: 56.0
new: 350.0
path: .metrics.halstead.purity_ratio
old: 2.1464024557120944
new: 0.7720907871223783
path: .metrics.halstead.difficulty
old: 8.985294117647058
new: 59.97826086956522
path: .metrics.halstead.length
old: 103.0
new: 528.0
path: .metrics.halstead.N2
old: 47.0
new: 178.0
path: .metrics.halstead.n2
old: 34.0
new: 46.0
path: .metrics.halstead.vocabulary
old: 47.0
new: 77.0
path: .metrics.halstead.time
old: 285.59390539430456
new: 11025.548099915915
path: .metrics.halstead.effort
old: 5140.690297097482
new: 198459.8657984865
path: .metrics.nom.functions
old: 1.0
new: 7.0
path: .metrics.nom.total
old: 1.0
new: 7.0

# Spaces Data

## Minimal test - lines (23, 52)

path: .spaces[0].metrics.cognitive.average
old: null
new: 4.0
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 4.0
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 32.21052631578947
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 43.0
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 27615.689301088107
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 107.0
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.30454350182692297
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.2072767264097208
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 19.0
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 158.0
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 24.0
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 51.0
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 1534.2049611715615
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 857.3498312429315
path: .spaces[0].metrics.halstead.level
old: null
new: 0.03104575163398693
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 190.74972277273588
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 5.0
path: .spaces[0].metrics.nexits.average
old: null
new: 2.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: null
new: 3.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 3.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 19.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 25.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 30.0
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 6.0
path: .spaces[0].metrics.mi.mi_original
old: null
new: 79.63060301016944
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 71.62641390362907
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 46.56760409951429

### Code

    static bool GetNextOffset(const unsigned char** pos, const unsigned char* end,
                              const unsigned char** offset) {
      if (*pos == end) return false;

      // When reading an offset the byte array must always contain at least
      // three more bytes to consume. First the offset to read, then a node
      // to skip over and finally a destination node. No object can be smaller
      // than one byte.
      MOZ_ASSERT(*pos + 2 < end);
      size_t bytes_consumed;
      switch (**pos & 0x60) {
        case 0x60:  // Read three byte offset
          *offset += (((*pos)[0] & 0x1F) << 16) | ((*pos)[1] << 8) | (*pos)[2];
          bytes_consumed = 3;
          break;
        case 0x40:  // Read two byte offset
          *offset += (((*pos)[0] & 0x1F) << 8) | (*pos)[1];
          bytes_consumed = 2;
          break;
        default:
          *offset += (*pos)[0] & 0x3F;
          bytes_consumed = 1;
      }
      if ((**pos & 0x80) != 0) {
        *pos = end;
      } else {
        *pos += bytes_consumed;
      }
      return true;
    }

## Minimal test - lines (55, 58)

path: .spaces[1].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[1].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[1].metrics.mi.mi_sei
old: 52.66560824294798
new: 103.52771346566632
path: .spaces[1].metrics.mi.mi_visual_studio
old: 46.538789657249325
new: 72.60888811363898
path: .spaces[1].metrics.mi.mi_original
old: 79.58133031389634
new: 124.16119867432266
path: .spaces[1].metrics.cyclomatic.sum
old: 6.0
new: 1.0
path: .spaces[1].metrics.halstead.N1
old: 55.0
new: 17.0
path: .spaces[1].metrics.halstead.effort
old: 4592.766908366737
new: 780.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.9893385809950923
new: 1.874194459738483
path: .spaces[1].metrics.halstead.volume
old: 512.2701551639823
new: 104.0
path: .spaces[1].metrics.halstead.level
old: 0.11153846153846154
new: 0.13333333333333333
path: .spaces[1].metrics.halstead.length
old: 95.0
new: 26.0
path: .spaces[1].metrics.halstead.vocabulary
old: 42.0
new: 16.0
path: .spaces[1].metrics.halstead.N2
old: 40.0
new: 9.0
path: .spaces[1].metrics.halstead.n2
old: 29.0
new: 6.0
path: .spaces[1].metrics.halstead.difficulty
old: 8.96551724137931
new: 7.5
path: .spaces[1].metrics.halstead.time
old: 255.1537171314854
new: 43.333333333333336
path: .spaces[1].metrics.halstead.estimated_program_length
old: 188.98716519453376
new: 48.72905595320056
path: .spaces[1].metrics.halstead.n1
old: 13.0
new: 10.0
path: .spaces[1].metrics.halstead.bugs
old: 0.09210043507053098
new: 0.02824501526201352
path: .spaces[1].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[1].metrics.loc.blank
old: 8.0
new: 0.0
path: .spaces[1].metrics.loc.lloc
old: 1.0
new: 2.0
path: .spaces[1].metrics.loc.sloc
old: 35.0
new: 4.0
path: .spaces[1].metrics.loc.ploc
old: 26.0
new: 4.0

### Code

    static bool IsEOL(const unsigned char* offset, const unsigned char* end) {
      MOZ_ASSERT(offset < end);
      return (*offset & 0x80) != 0;
    }