# Global Metrics

path: .metrics.cognitive.sum
old: 6.0
new: 3.0
path: .metrics.cognitive.average
old: 0.35294117647058826
new: 0.5
path: .metrics.halstead.N1
old: 971.0
new: 137.0
path: .metrics.halstead.bugs
old: 2.15858251077103
new: 0.32396684795781255
path: .metrics.halstead.n2
old: 343.0
new: 55.0
path: .metrics.halstead.length
old: 1950.0
new: 250.0
path: .metrics.halstead.level
old: 0.03185068251462531
new: 0.05123428039124359
path: .metrics.halstead.difficulty
old: 31.396501457725947
new: 19.51818181818182
path: .metrics.halstead.N2
old: 979.0
new: 113.0
path: .metrics.halstead.purity_ratio
old: 1.5317311335422028
new: 1.5947416279971376
path: .metrics.halstead.n1
old: 22.0
new: 19.0
path: .metrics.halstead.effort
old: 521116.54647352995
new: 30299.30994546672
path: .metrics.halstead.estimated_program_length
old: 2986.8757104072956
new: 398.6854069992844
path: .metrics.halstead.volume
old: 16597.91767484639
new: 1552.3633414072376
path: .metrics.halstead.time
old: 28950.91924852944
new: 1683.2949969703734
path: .metrics.halstead.vocabulary
old: 365.0
new: 74.0
path: .metrics.loc.sloc
old: 790.0
new: 78.0
path: .metrics.loc.ploc
old: 349.0
new: 55.0
path: .metrics.loc.cloc
old: 287.0
new: 6.0
path: .metrics.loc.blank
old: 154.0
new: 17.0
path: .metrics.loc.lloc
old: 41.0
new: 16.0
path: .metrics.nom.total
old: 17.0
new: 6.0
path: .metrics.nom.functions
old: 17.0
new: 6.0
path: .metrics.nargs.average
old: 0.7647058823529411
new: 1.3333333333333333
path: .metrics.nargs.sum
old: 13.0
new: 8.0
path: .metrics.cyclomatic.average
old: 1.1428571428571428
new: 1.2222222222222223
path: .metrics.cyclomatic.sum
old: 48.0
new: 11.0
path: .metrics.mi.mi_original
old: 1.344497152480784
new: 59.68414132523988
path: .metrics.mi.mi_sei
old: -28.680836505300448
new: 32.353673332498005
path: .metrics.mi.mi_visual_studio
old: 0.7862556447256047
new: 34.903006622947295
path: .metrics.nexits.sum
old: 15.0
new: 5.0
path: .metrics.nexits.average
old: 0.8823529411764706
new: 0.8333333333333334

# Spaces Data

## Minimal test - lines (70, 75)

path: .spaces[4].metrics.mi.mi_visual_studio
old: 53.170507975355605
new: 67.76217036502308
path: .spaces[4].metrics.mi.mi_original
old: 90.92156863785809
new: 115.87331132418949
path: .spaces[4].metrics.mi.mi_sei
old: 96.20550888317692
new: 91.57081948618284
path: .spaces[4].metrics.nexits.average
old: null
new: 1.0
path: .spaces[4].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[4].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[4].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[4].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[4].metrics.halstead.length
old: 51.0
new: 32.0
path: .spaces[4].metrics.halstead.time
old: 60.623393065090845
new: 61.41078049434975
path: .spaces[4].metrics.halstead.purity_ratio
old: 1.7758514711821285
new: 2.5335405566770044
path: .spaces[4].metrics.halstead.N1
old: 23.0
new: 18.0
path: .spaces[4].metrics.halstead.N2
old: 28.0
new: 14.0
path: .spaces[4].metrics.halstead.estimated_program_length
old: 90.56842503028857
new: 81.07329781366414
path: .spaces[4].metrics.halstead.effort
old: 1091.2210751716352
new: 1105.3940488982955
path: .spaces[4].metrics.halstead.n1
old: 6.0
new: 12.0
path: .spaces[4].metrics.halstead.n2
old: 18.0
new: 11.0
path: .spaces[4].metrics.halstead.vocabulary
old: 24.0
new: 23.0
path: .spaces[4].metrics.halstead.bugs
old: 0.03533083557853501
new: 0.03563609926852453
path: .spaces[4].metrics.halstead.level
old: 0.21428571428571427
new: 0.13095238095238096
path: .spaces[4].metrics.halstead.difficulty
old: 4.666666666666667
new: 7.636363636363637
path: .spaces[4].metrics.halstead.volume
old: 233.83308753677895
new: 144.75398259382442
path: .spaces[4].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[4].metrics.nargs.average
old: null
new: 2.0
path: .spaces[4].metrics.loc.lloc
old: 1.0
new: 2.0
path: .spaces[4].metrics.loc.ploc
old: 9.0
new: 6.0
path: .spaces[4].metrics.loc.sloc
old: 24.0
new: 6.0
path: .spaces[4].metrics.loc.blank
old: 6.0
new: 0.0
path: .spaces[4].metrics.loc.cloc
old: 9.0
new: 0.0

### Code

    nsresult nsSimpleEnumerator::Entries(const nsIID& aIface,
                                         nsIJSEnumerator** aResult) {
      auto result = MakeRefPtr(this, aIface);
      result.forget(aResult);
      return NS_OK;
    }

## Minimal test - lines (64, 68)

path: .spaces[3].metrics.loc.blank
old: 4.0
new: 0.0
path: .spaces[3].metrics.loc.ploc
old: 6.0
new: 5.0
path: .spaces[3].metrics.loc.sloc
old: 10.0
new: 5.0
path: .spaces[3].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[3].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[3].metrics.mi.mi_visual_studio
old: 62.33373804940784
new: 69.87831066375517
path: .spaces[3].metrics.mi.mi_original
old: 106.5906920644874
new: 119.49191123502136
path: .spaces[3].metrics.mi.mi_sei
old: 78.17883071375032
new: 96.79135563250122
path: .spaces[3].metrics.nexits.average
old: null
new: 1.0
path: .spaces[3].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[3].metrics.halstead.n2
old: 14.0
new: 10.0
path: .spaces[3].metrics.halstead.time
old: 51.2437032657522
new: 46.704975262214155
path: .spaces[3].metrics.halstead.N1
old: 19.0
new: 17.0
path: .spaces[3].metrics.halstead.volume
old: 175.69269691115042
new: 127.37720526058406
path: .spaces[3].metrics.halstead.effort
old: 922.3866587835396
new: 840.6895547198548
path: .spaces[3].metrics.halstead.length
old: 40.0
new: 29.0
path: .spaces[3].metrics.halstead.level
old: 0.1904761904761905
new: 0.15151515151515152
path: .spaces[3].metrics.halstead.N2
old: 21.0
new: 12.0
path: .spaces[3].metrics.halstead.purity_ratio
old: 1.823861334080242
new: 2.4576906466856516
path: .spaces[3].metrics.halstead.difficulty
old: 5.25
new: 6.6
path: .spaces[3].metrics.halstead.bugs
old: 0.031585475583788665
new: 0.029691753491613695
path: .spaces[3].metrics.halstead.estimated_program_length
old: 72.95445336320968
new: 71.27302875388389
path: .spaces[3].metrics.halstead.n1
old: 7.0
new: 11.0
path: .spaces[3].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[3].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[3].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[3].metrics.nargs.average
old: null
new: 1.0

### Code

    nsresult nsSimpleEnumerator::Iterator(nsIJSEnumerator** aResult) {
      auto result = MakeRefPtr(this, DefaultInterface());
      result.forget(aResult);
      return NS_OK;
    }

## Minimal test - lines (42, 60)

path: .spaces[2].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[2].metrics.nexits.average
old: null
new: 2.0
path: .spaces[2].metrics.cyclomatic.sum
old: 1.0
new: 3.0
path: .spaces[2].metrics.cyclomatic.average
old: 1.0
new: 3.0
path: .spaces[2].metrics.nargs.average
old: null
new: 2.0
path: .spaces[2].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[2].metrics.cognitive.sum
old: 0.0
new: 3.0
path: .spaces[2].metrics.cognitive.average
old: null
new: 3.0
path: .spaces[2].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[2].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[2].metrics.mi.mi_sei
old: 128.8768748847217
new: 54.51826532646827
path: .spaces[2].metrics.mi.mi_original
old: 108.68330835626114
new: 90.04928557889623
path: .spaces[2].metrics.mi.mi_visual_studio
old: 63.55749026681938
new: 52.66040092333113
path: .spaces[2].metrics.halstead.purity_ratio
old: 2.321928094887362
new: 2.068811852266801
path: .spaces[2].metrics.halstead.bugs
old: 0.006345008908158382
new: 0.1135739381523796
path: .spaces[2].metrics.halstead.n1
old: 5.0
new: 16.0
path: .spaces[2].metrics.halstead.level
old: 0.4
new: 0.08333333333333333
path: .spaces[2].metrics.halstead.N1
old: 5.0
new: 54.0
path: .spaces[2].metrics.halstead.length
old: 10.0
new: 96.0
path: .spaces[2].metrics.halstead.time
old: 4.613789020676893
new: 349.4036235927871
path: .spaces[2].metrics.halstead.difficulty
old: 2.5
new: 12.0
path: .spaces[2].metrics.halstead.volume
old: 33.219280948873624
new: 524.1054353891806
path: .spaces[2].metrics.halstead.n2
old: 5.0
new: 28.0
path: .spaces[2].metrics.halstead.effort
old: 83.04820237218406
new: 6289.265224670167
path: .spaces[2].metrics.halstead.vocabulary
old: 10.0
new: 44.0
path: .spaces[2].metrics.halstead.estimated_program_length
old: 23.21928094887362
new: 198.6059378176129
path: .spaces[2].metrics.halstead.N2
old: 5.0
new: 42.0
path: .spaces[2].metrics.loc.lloc
old: 0.0
new: 8.0
path: .spaces[2].metrics.loc.blank
old: 2.0
new: 3.0
path: .spaces[2].metrics.loc.ploc
old: 3.0
new: 16.0
path: .spaces[2].metrics.loc.cloc
old: 10.0
new: 0.0
path: .spaces[2].metrics.loc.sloc
old: 15.0
new: 19.0

### Code

    nsresult JSEnumerator::Next(JSContext* aCx, JS::MutableHandleValue aResult) {
      RootedDictionary result(aCx);

      nsCOMPtr elem;
      if (NS_FAILED(mEnumerator->GetNext(getter_AddRefs(elem)))) {
        result.mDone = true;
      } else {
        result.mDone = false;

        JS::RootedValue value(aCx);
        MOZ_TRY(nsContentUtils::WrapNative(aCx, elem, &mIID, &value));
        result.mValue = value;
      }

      if (!ToJSValue(aCx, result, aResult)) {
        return NS_ERROR_OUT_OF_MEMORY;
      }
      return NS_OK;
    }

## Minimal test - lines (36, 40)

path: .spaces[1].metrics.mi.mi_sei
old: 103.70819247706724
new: 98.29460120784424
path: .spaces[1].metrics.mi.mi_original
old: 124.145144895283
new: 120.53388166725958
path: .spaces[1].metrics.mi.mi_visual_studio
old: 72.599499938762
new: 70.48765009781262
path: .spaces[1].metrics.halstead.n2
old: 4.0
new: 9.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.7777777777777777
new: 2.282346001038465
path: .spaces[1].metrics.halstead.N2
old: 4.0
new: 11.0
path: .spaces[1].metrics.halstead.vocabulary
old: 8.0
new: 18.0
path: .spaces[1].metrics.halstead.level
old: 0.5
new: 0.18181818181818185
path: .spaces[1].metrics.halstead.bugs
old: 0.004762203155904598
new: 0.02300555456638979
path: .spaces[1].metrics.halstead.N1
old: 5.0
new: 14.0
path: .spaces[1].metrics.halstead.difficulty
old: 2.0
new: 5.5
path: .spaces[1].metrics.halstead.length
old: 9.0
new: 25.0
path: .spaces[1].metrics.halstead.time
old: 3.0
new: 31.85359376101766
path: .spaces[1].metrics.halstead.volume
old: 27.0
new: 104.2481250360578
path: .spaces[1].metrics.halstead.estimated_program_length
old: 16.0
new: 57.05865002596162
path: .spaces[1].metrics.halstead.effort
old: 54.0
new: 573.3646876983179
path: .spaces[1].metrics.halstead.n1
old: 4.0
new: 9.0
path: .spaces[1].metrics.loc.sloc
old: 6.0
new: 5.0
path: .spaces[1].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[1].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[1].metrics.cyclomatic.sum
old: 3.0
new: 1.0
path: .spaces[1].metrics.nexits.average
old: null
new: 1.0
path: .spaces[1].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[1].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.nargs.average
old: null
new: 1.0

### Code

    nsresult JSEnumerator::Iterator(nsIJSEnumerator** aResult) {
      RefPtr result(this);
      result.forget(aResult);
      return NS_OK;
    }

## Minimal test - lines (18, 34)

path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.05319280042199437
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.885425530550329
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 19.0
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 23.0
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 10.363636363636363
path: .spaces[0].metrics.halstead.level
old: null
new: 0.09649122807017543
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 43.0
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 11.0
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 111.99242782116907
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 81.07329781366414
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 12.0
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 24.0
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 194.51316411045156
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 2015.8637007810432
path: .spaces[0].metrics.nom.total
old: 0.0
new: 2.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 2.0
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 4.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 12.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 17.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 5.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 56.59376879820194
path: .spaces[0].metrics.mi.mi_original
old: null
new: 96.77534464492533
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 64.32373724515918
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: null
new: 0.0

### Code

    namespace {

    class JSEnumerator final : public nsIJSEnumerator {
      NS_DECL_ISUPPORTS
      NS_DECL_NSIJSENUMERATOR

      explicit JSEnumerator(nsISimpleEnumerator* aEnumerator, const nsID& aIID)
          : mEnumerator(aEnumerator), mIID(aIID) {}

     private:
      ~JSEnumerator() = default;

      nsCOMPtr mEnumerator;
      const nsID mIID;
    };

    }  // anonymous namespace