# Global Metrics

path: .metrics.nexits.average
old: 0.8732394366197183
new: 1.5
path: .metrics.nexits.sum
old: 62.0
new: 3.0
path: .metrics.cyclomatic.sum
old: 177.0
new: 9.0
path: .metrics.cyclomatic.average
old: 2.158536585365854
new: 3.0
path: .metrics.cognitive.average
old: 1.267605633802817
new: 3.0
path: .metrics.cognitive.sum
old: 90.0
new: 6.0
path: .metrics.mi.mi_original
old: -47.697414727056085
new: 63.43750577579364
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 37.09795659403137
path: .metrics.mi.mi_sei
old: -104.09169029234818
new: 37.87210337449025
path: .metrics.nom.total
old: 71.0
new: 2.0
path: .metrics.nom.functions
old: 71.0
new: 2.0
path: .metrics.nargs.sum
old: 117.0
new: 7.0
path: .metrics.nargs.average
old: 1.647887323943662
new: 3.5
path: .metrics.halstead.volume
old: 85029.35998966987
new: 1602.8842377069718
path: .metrics.halstead.level
old: 0.009528585757271816
new: 0.03367003367003367
path: .metrics.halstead.N1
old: 4705.0
new: 188.0
path: .metrics.halstead.difficulty
old: 104.94736842105264
new: 29.7
path: .metrics.halstead.length
old: 8693.0
new: 287.0
path: .metrics.halstead.N2
old: 3988.0
new: 99.0
path: .metrics.halstead.purity_ratio
old: 0.9611833918830852
new: 0.7744437905721853
path: .metrics.halstead.n1
old: 44.0
new: 18.0
path: .metrics.halstead.bugs
old: 14.340767254477347
new: 0.4378424012749009
path: .metrics.halstead.n2
old: 836.0
new: 30.0
path: .metrics.halstead.effort
old: 8923607.569442196
new: 47605.66185989706
path: .metrics.halstead.estimated_program_length
old: 8355.56722563966
new: 222.2653678942172
path: .metrics.halstead.time
old: 495755.976080122
new: 2644.758992216503
path: .metrics.halstead.vocabulary
old: 880.0
new: 48.0
path: .metrics.loc.sloc
old: 1546.0
new: 63.0
path: .metrics.loc.blank
old: 184.0
new: 11.0
path: .metrics.loc.lloc
old: 377.0
new: 12.0
path: .metrics.loc.ploc
old: 1223.0
new: 47.0
path: .metrics.loc.cloc
old: 139.0
new: 5.0

# Spaces Data

## Minimal test - lines (10, 41)

path: .spaces[0].metrics.nom.total
old: 12.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 12.0
new: 1.0
path: .spaces[0].metrics.loc.blank
old: 34.0
new: 5.0
path: .spaces[0].metrics.loc.lloc
old: 66.0
new: 11.0
path: .spaces[0].metrics.loc.ploc
old: 256.0
new: 27.0
path: .spaces[0].metrics.loc.cloc
old: 35.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 325.0
new: 32.0
path: .spaces[0].metrics.nargs.average
old: 0.8333333333333334
new: 3.0
path: .spaces[0].metrics.nargs.sum
old: 10.0
new: 3.0
path: .spaces[0].metrics.mi.mi_sei
old: -19.27539247304167
new: 38.77320683196171
path: .spaces[0].metrics.mi.mi_visual_studio
old: 11.355469941590734
new: 46.195608408617055
path: .spaces[0].metrics.mi.mi_original
old: 19.417853600120154
new: 78.99449037873516
path: .spaces[0].metrics.cognitive.sum
old: 34.0
new: 6.0
path: .spaces[0].metrics.cognitive.average
old: 2.8333333333333335
new: 6.0
path: .spaces[0].metrics.halstead.bugs
old: 2.9689286159505053
new: 0.21637024136923744
path: .spaces[0].metrics.halstead.estimated_program_length
old: 1296.5227461425109
new: 162.64528392343908
path: .spaces[0].metrics.halstead.vocabulary
old: 188.0
new: 38.0
path: .spaces[0].metrics.halstead.N1
old: 837.0
new: 87.0
path: .spaces[0].metrics.halstead.length
old: 1541.0
new: 151.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.8413515549270025
new: 1.0771210855856892
path: .spaces[0].metrics.halstead.n2
old: 156.0
new: 23.0
path: .spaces[0].metrics.halstead.difficulty
old: 72.2051282051282
new: 20.869565217391305
path: .spaces[0].metrics.halstead.effort
old: 840584.7671780932
new: 16537.81679019092
path: .spaces[0].metrics.halstead.n1
old: 32.0
new: 15.0
path: .spaces[0].metrics.halstead.N2
old: 704.0
new: 64.0
path: .spaces[0].metrics.halstead.level
old: 0.013849431818181818
new: 0.04791666666666666
path: .spaces[0].metrics.halstead.time
old: 46699.15373211629
new: 918.767599455051
path: .spaces[0].metrics.halstead.volume
old: 11641.62142043524
new: 792.4370545299814
path: .spaces[0].metrics.nexits.sum
old: 6.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 0.5
new: 2.0
path: .spaces[0].metrics.cyclomatic.sum
old: 40.0
new: 5.0
path: .spaces[0].metrics.cyclomatic.average
old: 2.5
new: 5.0

### Code

    int NS_FASTCALL Compare(const mozilla::detail::nsTStringRepr& aLhs,
                            const mozilla::detail::nsTStringRepr& aRhs,
                            const nsTStringComparator comp) {
      typedef typename nsTSubstring::size_type size_type;
      typedef typename nsTSubstring::const_iterator const_iterator;

      if (&aLhs == &aRhs) {
        return 0;
      }

      const_iterator leftIter, rightIter;
      aLhs.BeginReading(leftIter);
      aRhs.BeginReading(rightIter);

      size_type lLength = aLhs.Length();
      size_type rLength = aRhs.Length();
      size_type lengthToCompare = XPCOM_MIN(lLength, rLength);

      int result;
      if ((result = comp(leftIter.get(), rightIter.get(), lengthToCompare,
                         lengthToCompare)) == 0) {
        if (lLength < rLength) {
          result = -1;
        } else if (rLength < lLength) {
          result = 1;
        } else {
          result = 0;
        }
      }

      return result;
    }

## Minimal test - lines (53, 58)

path: .spaces[1].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 0.5
new: 0.0
path: .spaces[1].metrics.loc.blank
old: 3.0
new: 0.0
path: .spaces[1].metrics.loc.cloc
old: 6.0
new: 0.0
path: .spaces[1].metrics.loc.lloc
old: 4.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 11.0
new: 6.0
path: .spaces[1].metrics.loc.sloc
old: 20.0
new: 6.0
path: .spaces[1].metrics.nom.functions
old: 2.0
new: 1.0
path: .spaces[1].metrics.nom.total
old: 2.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.sum
old: 4.0
new: 3.0
path: .spaces[1].metrics.cyclomatic.average
old: 1.3333333333333333
new: 3.0
path: .spaces[1].metrics.halstead.length
old: 43.0
new: 44.0
path: .spaces[1].metrics.halstead.volume
old: 182.66088307807416
new: 199.03672606650855
path: .spaces[1].metrics.halstead.n2
old: 9.0
new: 10.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: 61.74860596185444
new: 81.32499728470782
path: .spaces[1].metrics.halstead.vocabulary
old: 19.0
new: 23.0
path: .spaces[1].metrics.halstead.n1
old: 10.0
new: 13.0
path: .spaces[1].metrics.halstead.time
old: 101.47826837670787
new: 136.56130927341005
path: .spaces[1].metrics.halstead.N2
old: 18.0
new: 19.0
path: .spaces[1].metrics.halstead.effort
old: 1826.6088307807415
new: 2458.1035669213807
path: .spaces[1].metrics.halstead.difficulty
old: 10.0
new: 12.35
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.4360140921361495
new: 1.8482953928342687
path: .spaces[1].metrics.halstead.bugs
old: 0.04980914809561146
new: 0.0607126043996341
path: .spaces[1].metrics.halstead.level
old: 0.1
new: 0.08097165991902834
path: .spaces[1].metrics.mi.mi_sei
old: 98.51244992850708
new: 88.72177506926889
path: .spaces[1].metrics.mi.mi_visual_studio
old: 55.24529486683003
new: 66.52476720606613
path: .spaces[1].metrics.mi.mi_original
old: 94.46945422227934
new: 113.75735192237308
path: .spaces[1].metrics.nargs.average
old: 2.0
new: 4.0
path: .spaces[1].metrics.nexits.sum
old: 2.0
new: 1.0

### Code

    int nsTDefaultStringComparator(const T* aLhs, const T* aRhs, uint32_t aLLength,
                                   uint32_t aRLength) {
      return aLLength == aRLength ? nsCharTraits::compare(aLhs, aRhs, aLLength)
             : (aLLength > aRLength) ? 1
                                     : -1;
    }