# Global Metrics

path: .metrics.mi.mi_original
old: 42.50722235049865
new: 4.707760926886536
path: .metrics.mi.mi_visual_studio
old: 24.85802476637348
new: 2.7530765654307228
path: .metrics.mi.mi_sei
old: 8.145230029493106
new: -29.606376381717837
path: .metrics.cyclomatic.average
old: 3.25
new: 3.4347826086956523
path: .metrics.cyclomatic.sum
old: 26.0
new: 79.0
path: .metrics.nexits.sum
old: 19.0
new: 23.0
path: .metrics.nexits.average
old: 3.8
new: 1.0454545454545454
path: .metrics.halstead.n2
old: 87.0
new: 123.0
path: .metrics.halstead.estimated_program_length
old: 670.5751841561471
new: 1020.3942900955554
path: .metrics.halstead.time
old: 2606.088016782793
new: 69370.49922021852
path: .metrics.halstead.N1
old: 214.0
new: 1158.0
path: .metrics.halstead.effort
old: 46909.58430209027
new: 1248668.9859639334
path: .metrics.halstead.N2
old: 141.0
new: 691.0
path: .metrics.halstead.length
old: 355.0
new: 1849.0
path: .metrics.halstead.n1
old: 24.0
new: 33.0
path: .metrics.halstead.volume
old: 2412.0176325542875
new: 13470.708702676298
path: .metrics.halstead.difficulty
old: 19.448275862068964
new: 92.6951219512195
path: .metrics.halstead.vocabulary
old: 111.0
new: 156.0
path: .metrics.halstead.purity_ratio
old: 1.888944180721541
new: 0.5518627853410252
path: .metrics.halstead.level
old: 0.05141843971631206
new: 0.010788054203394293
path: .metrics.halstead.bugs
old: 0.4335639206298017
new: 3.865244420539295
path: .metrics.cognitive.sum
old: 15.0
new: 73.0
path: .metrics.cognitive.average
old: 3.0
new: 3.3181818181818183
path: .metrics.loc.lloc
old: 47.0
new: 125.0
path: .metrics.loc.sloc
old: 158.0
new: 442.0
path: .metrics.loc.ploc
old: 120.0
new: 289.0
path: .metrics.loc.blank
old: 27.0
new: 69.0
path: .metrics.loc.cloc
old: 11.0
new: 84.0
path: .metrics.nom.total
old: 5.0
new: 22.0
path: .metrics.nom.functions
old: 5.0
new: 22.0
path: .metrics.nargs.sum
old: 5.0
new: 53.0
path: .metrics.nargs.average
old: 1.0
new: 2.409090909090909

# Spaces Data

## Minimal test - lines (18, 27)

path: .spaces[0].metrics.nexits.sum
old: 19.0
new: 1.0
path: .spaces[0].metrics.nexits.average
old: 3.8
new: 1.0
path: .spaces[0].metrics.halstead.length
old: 325.0
new: 74.0
path: .spaces[0].metrics.halstead.difficulty
old: 21.483870967741936
new: 16.433333333333334
path: .spaces[0].metrics.halstead.time
old: 2492.768828235249
new: 337.7962962962963
path: .spaces[0].metrics.halstead.N1
old: 214.0
new: 45.0
path: .spaces[0].metrics.halstead.effort
old: 44869.83890823449
new: 6080.333333333333
path: .spaces[0].metrics.halstead.estimated_program_length
old: 479.199271261294
new: 128.09022723538357
path: .spaces[0].metrics.halstead.N2
old: 111.0
new: 29.0
path: .spaces[0].metrics.halstead.level
old: 0.046546546546546545
new: 0.060851926977687626
path: .spaces[0].metrics.halstead.n2
old: 62.0
new: 15.0
path: .spaces[0].metrics.halstead.bugs
old: 0.4209027392564084
new: 0.11104448757824678
path: .spaces[0].metrics.halstead.vocabulary
old: 86.0
new: 32.0
path: .spaces[0].metrics.halstead.n1
old: 24.0
new: 17.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.474459296188597
new: 1.7309490166943724
path: .spaces[0].metrics.halstead.volume
old: 2088.536045278182
new: 370.0
path: .spaces[0].metrics.cognitive.sum
old: 15.0
new: 1.0
path: .spaces[0].metrics.cognitive.average
old: 3.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 5.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 5.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 1.0
new: 4.0
path: .spaces[0].metrics.nargs.sum
old: 5.0
new: 4.0
path: .spaces[0].metrics.cyclomatic.average
old: 3.5714285714285716
new: 2.0
path: .spaces[0].metrics.cyclomatic.sum
old: 25.0
new: 2.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 28.775247834267763
new: 59.93444787378798
path: .spaces[0].metrics.mi.mi_original
old: 49.20567379659788
new: 102.48790586417743
path: .spaces[0].metrics.mi.mi_sei
old: 15.455566834974512
new: 95.88837338708488
path: .spaces[0].metrics.loc.cloc
old: 6.0
new: 1.0
path: .spaces[0].metrics.loc.blank
old: 20.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 111.0
new: 10.0
path: .spaces[0].metrics.loc.lloc
old: 47.0
new: 4.0
path: .spaces[0].metrics.loc.ploc
old: 85.0
new: 8.0

### Code

    int32_t nsTString::Find(const nsTString& aString, bool aIgnoreCase,
                               int32_t aOffset, int32_t aCount) const {
      // this method changes the meaning of aOffset and aCount:
      Find_ComputeSearchRange(this->mLength, aString.Length(), aOffset, aCount);

      int32_t result = FindSubstring(this->mData + aOffset, aCount, aString.get(),
                                     aString.Length(), aIgnoreCase);
      if (result != kNotFound) result += aOffset;
      return result;
    }