Global Metrics

path: .metrics.cyclomatic.average
old: 2.431034482758621
new: 1.5454545454545454

path: .metrics.cyclomatic.sum
old: 141.0
new: 17.0

path: .metrics.mi.mi_visual_studio
old: 0.0
new: 31.92067256342431

path: .metrics.mi.mi_sei
old: -78.68458791356157
new: 36.57474994418506

path: .metrics.mi.mi_original
old: -24.119993224575495
new: 54.584350083455575

path: .metrics.nexits.average
old: 1.0
new: 0.5714285714285714

path: .metrics.nexits.sum
old: 50.0
new: 4.0

path: .metrics.halstead.effort
old: 2134821.4678812367
new: 47377.64914005311

path: .metrics.halstead.estimated_program_length
old: 3154.162732482797
new: 280.13186826628436

path: .metrics.halstead.volume
old: 29033.30575522374
new: 1662.3736540369512

path: .metrics.halstead.length
old: 3376.0
new: 285.0

path: .metrics.halstead.time
old: 118601.1926600687
new: 2632.0916188918395

path: .metrics.halstead.n1
old: 39.0
new: 19.0

path: .metrics.halstead.N1
old: 2060.0
new: 171.0

path: .metrics.halstead.N2
old: 1316.0
new: 114.0

path: .metrics.halstead.n2
old: 349.0
new: 38.0

path: .metrics.halstead.purity_ratio
old: 0.934289908910781
new: 0.9829188360220504

path: .metrics.halstead.level
old: 0.013599875302002962
new: 0.03508771929824561

path: .metrics.halstead.vocabulary
old: 388.0
new: 57.0

path: .metrics.halstead.difficulty
old: 73.53008595988538
new: 28.5

path: .metrics.halstead.bugs
old: 5.526537478707298
new: 0.4364432189495971

path: .metrics.cognitive.sum
old: 74.0
new: 6.0

path: .metrics.cognitive.average
old: 1.48
new: 0.8571428571428571

path: .metrics.nom.functions
old: 49.0
new: 7.0

path: .metrics.nom.total
old: 50.0
new: 7.0

path: .metrics.nom.closures
old: 1.0
new: 0.0

path: .metrics.nargs.average
old: 1.14
new: 0.42857142857142855

path: .metrics.nargs.sum
old: 57.0
new: 3.0

path: .metrics.loc.lloc
old: 269.0
new: 13.0

path: .metrics.loc.sloc
old: 849.0
new: 96.0

path: .metrics.loc.ploc
old: 675.0
new: 64.0

path: .metrics.loc.blank
old: 129.0
new: 13.0

path: .metrics.loc.cloc
old: 45.0
new: 19.0

Spaces Data

Minimal test - lines (55, 67)

path: .spaces[0].spaces[4].metrics.loc.blank
old: 1.0
new: 0.0

path: .spaces[0].spaces[4].metrics.loc.sloc
old: 17.0
new: 13.0

path: .spaces[0].spaces[4].metrics.loc.lloc
old: 4.0
new: 7.0

path: .spaces[0].spaces[4].metrics.loc.ploc
old: 16.0
new: 13.0

path: .spaces[0].spaces[4].metrics.mi.mi_original
old: 91.81311588045484
new: 97.83991741406643

path: .spaces[0].spaces[4].metrics.mi.mi_visual_studio
old: 53.69188063184493
new: 57.21632597313827

path: .spaces[0].spaces[4].metrics.mi.mi_sei
old: 56.96111469609214
new: 65.96141095926895

path: .spaces[0].spaces[4].metrics.nargs.average
old: 3.0
new: 0.0

path: .spaces[0].spaces[4].metrics.nargs.sum
old: 3.0
new: 0.0

path: .spaces[0].spaces[4].metrics.halstead.bugs
old: 0.11364206765450274
new: 0.10302875083659908

path: .spaces[0].spaces[4].metrics.halstead.N1
old: 59.0
new: 43.0

path: .spaces[0].spaces[4].metrics.halstead.length
old: 103.0
new: 72.0

path: .spaces[0].spaces[4].metrics.halstead.volume
old: 551.8278564756627
new: 349.77463164918515

path: .spaces[0].spaces[4].metrics.halstead.difficulty
old: 11.407407407407408
new: 15.535714285714286

path: .spaces[0].spaces[4].metrics.halstead.level
old: 0.08766233766233766
new: 0.06436781609195402

path: .spaces[0].spaces[4].metrics.halstead.n2
old: 27.0
new: 14.0

path: .spaces[0].spaces[4].metrics.halstead.purity_ratio
old: 1.7639313734681563
new: 1.5542545533740868

path: .spaces[0].spaces[4].metrics.halstead.estimated_program_length
old: 181.6849314672201
new: 111.90632784293425

path: .spaces[0].spaces[4].metrics.halstead.N2
old: 44.0
new: 29.0

path: .spaces[0].spaces[4].metrics.halstead.effort
old: 6294.925177574225
new: 5433.998741692698

path: .spaces[0].spaces[4].metrics.halstead.n1
old: 14.0
new: 15.0

path: .spaces[0].spaces[4].metrics.halstead.time
old: 349.71806542079025
new: 301.88881898292766

path: .spaces[0].spaces[4].metrics.halstead.vocabulary
old: 41.0
new: 29.0

path: .spaces[0].spaces[4].metrics.cognitive.average
old: 1.0
new: 4.0

path: .spaces[0].spaces[4].metrics.cognitive.sum
old: 1.0
new: 4.0

path: .spaces[0].spaces[4].metrics.cyclomatic.average
old: 2.0
new: 5.0

path: .spaces[0].spaces[4].metrics.cyclomatic.sum
old: 2.0
new: 5.0

Code

  const DependentSubstringType nextToken() {
    const mozilla::RangedPtr tokenStart = mIter;
    while (mIter < mEnd && !IsWhitespace(*mIter)) {
      ++mIter;
    }
    const mozilla::RangedPtr tokenEnd = mIter;
    mWhitespaceAfterCurrentToken = false;
    while (mIter < mEnd && IsWhitespace(*mIter)) {
      mWhitespaceAfterCurrentToken = true;
      ++mIter;
    }
    return Substring(tokenStart.get(), tokenEnd.get());
  }

Minimal test - lines (48, 50)

path: .spaces[0].spaces[3].metrics.mi.mi_original
old: 92.19571338278098
new: 137.4860859464573

path: .spaces[0].spaces[3].metrics.mi.mi_sei
old: 57.513086215354576
new: 122.75146225357946

path: .spaces[0].spaces[3].metrics.mi.mi_visual_studio
old: 53.915621861275426
new: 80.40121985172942

path: .spaces[0].spaces[3].metrics.halstead.effort
old: 5885.612494836246
new: 49.12871113600807

path: .spaces[0].spaces[3].metrics.halstead.level
old: 0.08710801393728222
new: 0.4

path: .spaces[0].spaces[3].metrics.halstead.n2
old: 25.0
new: 2.0

path: .spaces[0].spaces[3].metrics.halstead.purity_ratio
old: 1.746385295393552
new: 1.944234353490973

path: .spaces[0].spaces[3].metrics.halstead.bugs
old: 0.10866087267940926
new: 0.004471319041702271

path: .spaces[0].spaces[3].metrics.halstead.difficulty
old: 11.48
new: 2.5

path: .spaces[0].spaces[3].metrics.halstead.estimated_program_length
old: 169.39937365317456
new: 13.60964047443681

path: .spaces[0].spaces[3].metrics.halstead.N2
old: 41.0
new: 2.0

path: .spaces[0].spaces[3].metrics.halstead.time
old: 326.978471935347
new: 2.7293728408893374

path: .spaces[0].spaces[3].metrics.halstead.vocabulary
old: 39.0
new: 7.0

path: .spaces[0].spaces[3].metrics.halstead.volume
old: 512.6840152296381
new: 19.651484454403228

path: .spaces[0].spaces[3].metrics.halstead.length
old: 97.0
new: 7.0

path: .spaces[0].spaces[3].metrics.halstead.n1
old: 14.0
new: 5.0

path: .spaces[0].spaces[3].metrics.halstead.N1
old: 56.0
new: 5.0

path: .spaces[0].spaces[3].metrics.cognitive.sum
old: 1.0
new: 0.0

path: .spaces[0].spaces[3].metrics.cognitive.average
old: 1.0
new: 0.0

path: .spaces[0].spaces[3].metrics.loc.blank
old: 1.0
new: 0.0

path: .spaces[0].spaces[3].metrics.loc.lloc
old: 4.0
new: 1.0

path: .spaces[0].spaces[3].metrics.loc.sloc
old: 17.0
new: 3.0

path: .spaces[0].spaces[3].metrics.loc.ploc
old: 16.0
new: 3.0

path: .spaces[0].spaces[3].metrics.cyclomatic.average
old: 2.0
new: 1.0

path: .spaces[0].spaces[3].metrics.cyclomatic.sum
old: 2.0
new: 1.0

path: .spaces[0].spaces[3].metrics.nargs.sum
old: 3.0
new: 0.0

path: .spaces[0].spaces[3].metrics.nargs.average
old: 3.0
new: 0.0

Code

  bool whitespaceAfterCurrentToken() const {
    return mWhitespaceAfterCurrentToken;
  }

Minimal test - lines (40, 42)

path: .spaces[0].spaces[2].metrics.cognitive.sum
old: 20.0
new: 0.0

path: .spaces[0].spaces[2].metrics.cognitive.average
old: 1.5384615384615383
new: 0.0

path: .spaces[0].spaces[2].metrics.halstead.N1
old: 542.0
new: 5.0

path: .spaces[0].spaces[2].metrics.halstead.bugs
old: 1.15683392242438
new: 0.004471319041702271

path: .spaces[0].spaces[2].metrics.halstead.level
old: 0.03240026449195504
new: 0.4

path: .spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 1.324986832056806
new: 1.944234353490973

path: .spaces[0].spaces[2].metrics.halstead.time
old: 11358.36707010202
new: 2.7293728408893374

path: .spaces[0].spaces[2].metrics.halstead.n1
old: 26.0
new: 5.0

path: .spaces[0].spaces[2].metrics.halstead.effort
old: 204450.60726183635
new: 49.12871113600807

path: .spaces[0].spaces[2].metrics.halstead.N2
old: 349.0
new: 2.0

path: .spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: 1180.5632673626142
new: 13.60964047443681

path: .spaces[0].spaces[2].metrics.halstead.vocabulary
old: 173.0
new: 7.0

path: .spaces[0].spaces[2].metrics.halstead.n2
old: 147.0
new: 2.0

path: .spaces[0].spaces[2].metrics.halstead.volume
old: 6624.253750824321
new: 19.651484454403228

path: .spaces[0].spaces[2].metrics.halstead.length
old: 891.0
new: 7.0

path: .spaces[0].spaces[2].metrics.halstead.difficulty
old: 30.86394557823129
new: 2.5

path: .spaces[0].spaces[2].metrics.mi.mi_original
old: 28.68165368609661
new: 137.4860859464573

path: .spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 16.77289689245416
new: 80.40121985172942

path: .spaces[0].spaces[2].metrics.mi.mi_sei
old: -13.484829792983753
new: 122.75146225357946

path: .spaces[0].spaces[2].metrics.nexits.sum
old: 14.0
new: 1.0

path: .spaces[0].spaces[2].metrics.nexits.average
old: 1.0769230769230769
new: 1.0

path: .spaces[0].spaces[2].metrics.nargs.average
old: 1.3076923076923077
new: 0.0

path: .spaces[0].spaces[2].metrics.nargs.sum
old: 17.0
new: 0.0

path: .spaces[0].spaces[2].metrics.cyclomatic.average
old: 2.6
new: 1.0

path: .spaces[0].spaces[2].metrics.cyclomatic.sum
old: 39.0
new: 1.0

path: .spaces[0].spaces[2].metrics.loc.lloc
old: 69.0
new: 1.0

path: .spaces[0].spaces[2].metrics.loc.ploc
old: 173.0
new: 3.0

path: .spaces[0].spaces[2].metrics.loc.sloc
old: 223.0
new: 3.0

path: .spaces[0].spaces[2].metrics.loc.cloc
old: 11.0
new: 0.0

path: .spaces[0].spaces[2].metrics.loc.blank
old: 39.0
new: 0.0

path: .spaces[0].spaces[2].metrics.nom.total
old: 13.0
new: 1.0

path: .spaces[0].spaces[2].metrics.nom.functions
old: 13.0
new: 1.0

Code

  bool whitespaceBeforeFirstToken() const {
    return mWhitespaceBeforeFirstToken;
  }

Minimal test - lines (35, 35)

path: .spaces[0].spaces[1].metrics.loc.lloc
old: 76.0
new: 1.0

path: .spaces[0].spaces[1].metrics.loc.sloc
old: 270.0
new: 1.0

path: .spaces[0].spaces[1].metrics.loc.cloc
old: 15.0
new: 0.0

path: .spaces[0].spaces[1].metrics.loc.ploc
old: 212.0
new: 1.0

path: .spaces[0].spaces[1].metrics.loc.blank
old: 43.0
new: 0.0

path: .spaces[0].spaces[1].metrics.cyclomatic.sum
old: 47.0
new: 1.0

path: .spaces[0].spaces[1].metrics.cyclomatic.average
old: 2.0434782608695654
new: 1.0

path: .spaces[0].spaces[1].metrics.cognitive.average
old: 1.2
new: 0.0

path: .spaces[0].spaces[1].metrics.cognitive.sum
old: 24.0
new: 0.0

path: .spaces[0].spaces[1].metrics.nom.functions
old: 19.0
new: 1.0

path: .spaces[0].spaces[1].metrics.nom.total
old: 20.0
new: 1.0

path: .spaces[0].spaces[1].metrics.nom.closures
old: 1.0
new: 0.0

path: .spaces[0].spaces[1].metrics.halstead.N2
old: 411.0
new: 3.0

path: .spaces[0].spaces[1].metrics.halstead.effort
old: 275402.10516660835
new: 85.58797503894243

path: .spaces[0].spaces[1].metrics.halstead.bugs
old: 1.4109888517319122
new: 0.006473720020679235

path: .spaces[0].spaces[1].metrics.halstead.length
old: 1049.0
new: 9.0

path: .spaces[0].spaces[1].metrics.halstead.n1
old: 29.0
new: 6.0

path: .spaces[0].spaces[1].metrics.halstead.volume
old: 8040.93737712725
new: 28.52932501298081

path: .spaces[0].spaces[1].metrics.halstead.vocabulary
old: 203.0
new: 9.0

path: .spaces[0].spaces[1].metrics.halstead.difficulty
old: 34.25
new: 3.0

path: .spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 1435.9536171363782
new: 20.264662506490403

path: .spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.3688785673368715
new: 2.2516291673878226

path: .spaces[0].spaces[1].metrics.halstead.time
old: 15300.116953700464
new: 4.754887502163468

path: .spaces[0].spaces[1].metrics.halstead.level
old: 0.0291970802919708
new: 0.3333333333333333

path: .spaces[0].spaces[1].metrics.halstead.N1
old: 638.0
new: 6.0

path: .spaces[0].spaces[1].metrics.halstead.n2
old: 174.0
new: 3.0

path: .spaces[0].spaces[1].metrics.nargs.average
old: 1.0
new: 0.0

path: .spaces[0].spaces[1].metrics.nargs.sum
old: 20.0
new: 0.0

path: .spaces[0].spaces[1].metrics.nexits.sum
old: 17.0
new: 1.0

path: .spaces[0].spaces[1].metrics.nexits.average
old: 0.85
new: 1.0

path: .spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 13.295672135936949
new: 89.67552688205174

path: .spaces[0].spaces[1].metrics.mi.mi_sei
old: -20.26038776008352
new: 145.63125671373976

path: .spaces[0].spaces[1].metrics.mi.mi_original
old: 22.735599352452184
new: 153.34515096830847

Code

  bool hasMoreTokens() const { return mIter < mEnd; }

Minimal test - lines (15, 74)

path: .spaces[0].metrics.nom.total
old: 50.0
new: 5.0

path: .spaces[0].metrics.nom.closures
old: 1.0
new: 0.0

path: .spaces[0].metrics.nom.functions
old: 49.0
new: 5.0

path: .spaces[0].metrics.mi.mi_original
old: -23.067444774475376
new: 65.71943674672187

path: .spaces[0].metrics.mi.mi_sei
old: -77.66915642154814
new: 53.34503988229979

path: .spaces[0].metrics.mi.mi_visual_studio
old: 0.0
new: 38.432419150129746

path: .spaces[0].metrics.cyclomatic.sum
old: 140.0
new: 12.0

path: .spaces[0].metrics.cyclomatic.average
old: 2.456140350877193
new: 2.0

path: .spaces[0].metrics.nargs.sum
old: 57.0
new: 1.0

path: .spaces[0].metrics.nargs.average
old: 1.14
new: 0.2

path: .spaces[0].metrics.halstead.N1
old: 2053.0
new: 116.0

path: .spaces[0].metrics.halstead.length
old: 3344.0
new: 193.0

path: .spaces[0].metrics.halstead.n1
old: 39.0
new: 19.0

path: .spaces[0].metrics.halstead.bugs
old: 5.625293954154884
new: 0.32774151197845214

path: .spaces[0].metrics.halstead.level
old: 0.01298933444556992
new: 0.034176349965823645

path: .spaces[0].metrics.halstead.n2
old: 327.0
new: 25.0

path: .spaces[0].metrics.halstead.time
old: 121794.36897311932
new: 1712.799613785343

path: .spaces[0].metrics.halstead.vocabulary
old: 366.0
new: 44.0

path: .spaces[0].metrics.halstead.effort
old: 2192298.6415161476
new: 30830.39304813617

path: .spaces[0].metrics.halstead.difficulty
old: 76.9862385321101
new: 29.26

path: .spaces[0].metrics.halstead.purity_ratio
old: 0.8784717997827455
new: 1.019725531087027

path: .spaces[0].metrics.halstead.volume
old: 28476.50025922184
new: 1053.6703023969983

path: .spaces[0].metrics.halstead.N2
old: 1291.0
new: 77.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 2937.609698473501
new: 196.80702749979625

path: .spaces[0].metrics.cognitive.sum
old: 74.0
new: 6.0

path: .spaces[0].metrics.cognitive.average
old: 1.48
new: 1.2

path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.8

path: .spaces[0].metrics.nexits.sum
old: 50.0
new: 4.0

path: .spaces[0].metrics.loc.lloc
old: 269.0
new: 13.0

path: .spaces[0].metrics.loc.sloc
old: 812.0
new: 60.0

path: .spaces[0].metrics.loc.blank
old: 123.0
new: 6.0

path: .spaces[0].metrics.loc.cloc
old: 41.0
new: 13.0

path: .spaces[0].metrics.loc.ploc
old: 648.0
new: 41.0

Code

class nsTWhitespaceTokenizer {
  typedef typename DependentSubstringType::char_type CharType;
  typedef typename DependentSubstringType::substring_type SubstringType;

 public:
  explicit nsTWhitespaceTokenizer(const SubstringType& aSource)
      : mIter(aSource.Data(), aSource.Length()),
        mEnd(aSource.Data() + aSource.Length(), aSource.Data(),
             aSource.Length()),
        mWhitespaceBeforeFirstToken(false),
        mWhitespaceAfterCurrentToken(false) {
    while (mIter < mEnd && IsWhitespace(*mIter)) {
      mWhitespaceBeforeFirstToken = true;
      ++mIter;
    }
  }

  /**
   * Checks if any more tokens are available.
   */
  bool hasMoreTokens() const { return mIter < mEnd; }

  /*
   * Returns true if there is whitespace prior to the first token.
   */
  bool whitespaceBeforeFirstToken() const {
    return mWhitespaceBeforeFirstToken;
  }

  /*
   * Returns true if there is any whitespace after the current token.
   * This is always true unless we're reading the last token.
   */
  bool whitespaceAfterCurrentToken() const {
    return mWhitespaceAfterCurrentToken;
  }

  /**
   * Returns the next token.
   */
  const DependentSubstringType nextToken() {
    const mozilla::RangedPtr tokenStart = mIter;
    while (mIter < mEnd && !IsWhitespace(*mIter)) {
      ++mIter;
    }
    const mozilla::RangedPtr tokenEnd = mIter;
    mWhitespaceAfterCurrentToken = false;
    while (mIter < mEnd && IsWhitespace(*mIter)) {
      mWhitespaceAfterCurrentToken = true;
      ++mIter;
    }
    return Substring(tokenStart.get(), tokenEnd.get());
  }

 private:
  mozilla::RangedPtr mIter;
  const mozilla::RangedPtr mEnd;
  bool mWhitespaceBeforeFirstToken;
  bool mWhitespaceAfterCurrentToken;
};

Minimal test - lines (20, 30)

path: .spaces[0].spaces[0].metrics.loc.sloc
old: 21.0
new: 11.0

path: .spaces[0].spaces[0].metrics.loc.blank
old: 3.0
new: 0.0

path: .spaces[0].spaces[0].metrics.loc.lloc
old: 5.0
new: 3.0

path: .spaces[0].spaces[0].metrics.loc.ploc
old: 18.0
new: 11.0

path: .spaces[0].spaces[0].metrics.cognitive.average
old: 0.6666666666666666
new: 2.0

path: .spaces[0].spaces[0].metrics.nom.total
old: 3.0
new: 1.0

path: .spaces[0].spaces[0].metrics.nom.functions
old: 3.0
new: 1.0

path: .spaces[0].spaces[0].metrics.nargs.sum
old: 3.0
new: 1.0

path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.5
new: 3.0

path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 6.0
new: 3.0

path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 52.79791963070657
new: 59.432795557248625

path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 90.28444256850824
new: 101.63008040289516

path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 55.16298472742528
new: 71.22582058860411

path: .spaces[0].spaces[0].metrics.halstead.effort
old: 5080.371309557121
new: 5067.074016156097

path: .spaces[0].spaces[0].metrics.halstead.n2
old: 11.0
new: 12.0

path: .spaces[0].spaces[0].metrics.halstead.N2
old: 29.0
new: 28.0

path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.1418774339952695
new: 1.459432104810005

path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 81.07329781366414
new: 96.32251891746031

path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.06321839080459771
new: 0.06122448979591837

path: .spaces[0].spaces[0].metrics.halstead.time
old: 282.24285053095116
new: 281.50411200867205

path: .spaces[0].spaces[0].metrics.halstead.n1
old: 12.0
new: 14.0

path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 23.0
new: 26.0

path: .spaces[0].spaces[0].metrics.halstead.volume
old: 321.1728988800479
new: 310.22902139731207

path: .spaces[0].spaces[0].metrics.halstead.N1
old: 42.0
new: 38.0

path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.09850895570301936
new: 0.09833698998206426

path: .spaces[0].spaces[0].metrics.halstead.length
old: 71.0
new: 66.0

path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 15.818181818181818
new: 16.333333333333332

Code

  explicit nsTWhitespaceTokenizer(const SubstringType& aSource)
      : mIter(aSource.Data(), aSource.Length()),
        mEnd(aSource.Data() + aSource.Length(), aSource.Data(),
             aSource.Length()),
        mWhitespaceBeforeFirstToken(false),
        mWhitespaceAfterCurrentToken(false) {
    while (mIter < mEnd && IsWhitespace(*mIter)) {
      mWhitespaceBeforeFirstToken = true;
      ++mIter;
    }
  }