# Global Metrics

path: .metrics.halstead.n1
old: 20.0
new: 37.0
path: .metrics.halstead.bugs
old: 0.5347210493968402
new: 1.1467809092664007
path: .metrics.halstead.difficulty
old: 19.494949494949495
new: 43.49122807017544
path: .metrics.halstead.effort
old: 64249.95130668798
new: 201791.35839600672
path: .metrics.halstead.level
old: 0.05129533678756477
new: 0.022993142396127472
path: .metrics.halstead.time
old: 3569.4417392604432
new: 11210.631022000372
path: .metrics.halstead.volume
old: 3295.722890861197
new: 4639.817437907375
path: .metrics.halstead.vocabulary
old: 119.0
new: 151.0
path: .metrics.halstead.N2
old: 193.0
new: 268.0
path: .metrics.halstead.purity_ratio
old: 1.553859554990855
new: 1.515911444840954
path: .metrics.halstead.length
old: 478.0
new: 641.0
path: .metrics.halstead.N1
old: 285.0
new: 373.0
path: .metrics.halstead.estimated_program_length
old: 742.7448672856286
new: 971.6992361430516
path: .metrics.halstead.n2
old: 99.0
new: 114.0
path: .metrics.mi.mi_original
old: 45.21512949627679
new: 33.04124555316676
path: .metrics.mi.mi_sei
old: 16.282063062365033
new: 0.9093736156675688
path: .metrics.mi.mi_visual_studio
old: 26.44159619665309
new: 19.322365820565356
path: .metrics.cognitive.sum
old: 9.0
new: 17.0
path: .metrics.cognitive.average
old: 0.9
new: 1.2142857142857142
path: .metrics.nargs.sum
old: 7.0
new: 17.0
path: .metrics.nargs.average
old: 0.7
new: 1.2142857142857142
path: .metrics.nom.functions
old: 10.0
new: 14.0
path: .metrics.nom.total
old: 10.0
new: 14.0
path: .metrics.cyclomatic.average
old: 1.6923076923076923
new: 1.9411764705882353
path: .metrics.cyclomatic.sum
old: 22.0
new: 33.0
path: .metrics.loc.blank
old: 24.0
new: 38.0
path: .metrics.loc.ploc
old: 90.0
new: 145.0
path: .metrics.loc.cloc
old: 14.0
new: 25.0
path: .metrics.loc.lloc
old: 18.0
new: 57.0
path: .metrics.loc.sloc
old: 128.0
new: 208.0
path: .metrics.nexits.average
old: 0.9
new: 0.6428571428571429

# Spaces Data

## Minimal test - lines (25, 25)

path: .spaces[0].spaces[0].spaces[0].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 124.16119867432266
new: 153.97676999581998
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 103.52771346566632
new: 146.54249035246173
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 72.60888811363898
new: 90.04489473439764
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 10.0
new: 4.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 668.5714285714286
new: 67.3765181293825
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.8531080564378477
new: 1.4172097224626077
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.15555555555555556
new: 0.375
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 104.0
new: 25.26619429851844
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 37.14285714285714
new: 3.743139896076806
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 7.0
new: 3.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.025486524748024285
new: 0.005519305767765066
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 26.0
new: 9.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 16.0
new: 5.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 9.0
new: 4.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 6.428571428571429
new: 2.6666666666666665
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 48.18080946738404
new: 12.754887502163468
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 16.0
new: 7.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.sloc
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.ploc
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.nexits.average
old: 1.0
new: 0.0

### Code

      explicit AutoDestroyTmpWindow(HWND aTmpWnd) : mWnd(aTmpWnd) {}

## Minimal test - lines (23, 35)

path: .spaces[0].spaces[0].metrics.nexits.sum
old: 9.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.9
new: 0.3333333333333333
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 0.9
new: 0.3333333333333333
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 9.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 10.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 10.0
new: 3.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 64229.62911019426
new: 1207.8235240012525
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.4594577938835025
new: 1.0473423668952002
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 20.32967032967033
new: 9.6
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.04918918918918919
new: 0.10416666666666669
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 111.0
new: 13.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 678.6478741558286
new: 35.60964047443681
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 185.0
new: 12.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 20.0
new: 8.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.5346082889568248
new: 0.03780486873880331
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 91.0
new: 5.0
path: .spaces[0].spaces[0].metrics.halstead.time
old: 3568.312728344126
new: 67.10130688895848
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 280.0
new: 22.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 3159.403377852799
new: 125.81495041679712
path: .spaces[0].spaces[0].metrics.halstead.length
old: 465.0
new: 34.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 82.0
new: 10.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 109.0
new: 13.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 7.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 17.0
new: 3.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 20.0
new: 3.0
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 15.432367239927387
new: 73.63204687679898
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 48.49784418964133
new: 103.15679707340422
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 28.36131239160311
new: 60.32561232362819
path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.7
new: 0.3333333333333333
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 7.0
new: 1.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 20.0
new: 5.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.818181818181818
new: 1.25

### Code

    class AutoDestroyTmpWindow {
     public:
      explicit AutoDestroyTmpWindow(HWND aTmpWnd) : mWnd(aTmpWnd) {}

      ~AutoDestroyTmpWindow() {
        if (mWnd) DestroyWindow(mWnd);
      }

      inline HWND get() const { return mWnd; }

     private:
      HWND mWnd;
    };

## Minimal test - lines (19, 84)

path: .spaces[0].metrics.nom.functions
old: 10.0
new: 6.0
path: .spaces[0].metrics.nom.total
old: 10.0
new: 6.0
path: .spaces[0].metrics.nargs.sum
old: 7.0
new: 5.0
path: .spaces[0].metrics.nargs.average
old: 0.7
new: 0.8333333333333334
path: .spaces[0].metrics.halstead.volume
old: 3179.034748600901
new: 1494.5032739071055
path: .spaces[0].metrics.halstead.estimated_program_length
old: 686.6062618549925
new: 307.90686815148746
path: .spaces[0].metrics.halstead.n1
old: 20.0
new: 27.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.470248954721611
new: 1.22672059024497
path: .spaces[0].metrics.halstead.effort
old: 64271.78948258342
new: 58221.57754206681
path: .spaces[0].metrics.halstead.n2
old: 92.0
new: 35.0
path: .spaces[0].metrics.halstead.N2
old: 186.0
new: 101.0
path: .spaces[0].metrics.halstead.bugs
old: 0.5348422082012166
new: 0.5007274394953426
path: .spaces[0].metrics.halstead.time
old: 3570.654971254635
new: 3234.5320856703784
path: .spaces[0].metrics.halstead.vocabulary
old: 112.0
new: 62.0
path: .spaces[0].metrics.halstead.level
old: 0.049462365591397855
new: 0.02566923359002567
path: .spaces[0].metrics.halstead.difficulty
old: 20.217391304347824
new: 38.957142857142856
path: .spaces[0].metrics.halstead.length
old: 467.0
new: 251.0
path: .spaces[0].metrics.halstead.N1
old: 281.0
new: 150.0
path: .spaces[0].metrics.mi.mi_sei
old: 15.802400542451709
new: 31.010300669112052
path: .spaces[0].metrics.mi.mi_visual_studio
old: 28.03571912446145
new: 36.06312133503325
path: .spaces[0].metrics.mi.mi_original
old: 47.941079702829086
new: 61.66793748290685
path: .spaces[0].metrics.nexits.average
old: 0.9
new: 0.5
path: .spaces[0].metrics.nexits.sum
old: 9.0
new: 3.0
path: .spaces[0].metrics.cognitive.average
old: 0.9
new: 1.3333333333333333
path: .spaces[0].metrics.cognitive.sum
old: 9.0
new: 8.0
path: .spaces[0].metrics.cyclomatic.sum
old: 21.0
new: 15.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.75
new: 1.875
path: .spaces[0].metrics.loc.lloc
old: 17.0
new: 22.0
path: .spaces[0].metrics.loc.cloc
old: 8.0
new: 3.0
path: .spaces[0].metrics.loc.ploc
old: 84.0
new: 50.0
path: .spaces[0].metrics.loc.blank
old: 19.0
new: 13.0
path: .spaces[0].metrics.loc.sloc
old: 111.0
new: 66.0

### Code

    namespace {
    // Manages NS_NATIVE_TMP_WINDOW child windows. NS_NATIVE_TMP_WINDOWs are
    // temporary child windows of mParentWidget created to address RTL issues
    // in picker dialogs. We are responsible for destroying these.
    class AutoDestroyTmpWindow {
     public:
      explicit AutoDestroyTmpWindow(HWND aTmpWnd) : mWnd(aTmpWnd) {}

      ~AutoDestroyTmpWindow() {
        if (mWnd) DestroyWindow(mWnd);
      }

      inline HWND get() const { return mWnd; }

     private:
      HWND mWnd;
    };

    static DWORD ColorStringToRGB(const nsAString& aColor) {
      DWORD result = 0;

      for (uint32_t i = 1; i < aColor.Length(); ++i) {
        result *= 16;

        char16_t c = aColor[i];
        if (c >= '0' && c <= '9') {
          result += c - '0';
        } else if (c >= 'a' && c <= 'f') {
          result += 10 + (c - 'a');
        } else {
          result += 10 + (c - 'A');
        }
      }

      DWORD r = result & 0x00FF0000;
      DWORD g = result & 0x0000FF00;
      DWORD b = result & 0x000000FF;

      r = r >> 16;
      b = b << 16;

      result = r | g | b;

      return result;
    }

    static nsString ToHexString(BYTE n) {
      nsString result;
      if (n <= 0x0F) {
        result.Append('0');
      }
      result.AppendInt(n, 16);
      return result;
    }

    static void BGRIntToRGBString(DWORD color, nsAString& aResult) {
      BYTE r = GetRValue(color);
      BYTE g = GetGValue(color);
      BYTE b = GetBValue(color);

      aResult.Assign('#');
      aResult.Append(ToHexString(r));
      aResult.Append(ToHexString(g));
      aResult.Append(ToHexString(b));
    }
    }  // namespace

## Minimal test - lines (31, 31)

path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_original
old: 131.46876213755786
new: 155.2836050228807
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 76.88231703950753
new: 90.80912574437468
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_sei
old: 114.07029903505716
new: 148.4278547652622
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.N2
old: 6.0
new: 2.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.difficulty
old: 4.5
new: 2.5
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.time
old: 15.627562382434071
new: 2.7293728408893374
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.vocabulary
old: 15.0
new: 7.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.volume
old: 62.5102495297363
new: 19.651484454403228
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.n1
old: 9.0
new: 5.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.effort
old: 281.2961228838133
new: 49.12871113600807
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.length
old: 16.0
new: 7.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.N1
old: 10.0
new: 5.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.n2
old: 6.0
new: 2.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.bugs
old: 0.014310492360184729
new: 0.004471319041702271
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: 44.039100017307746
new: 13.60964047443681
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.level
old: 0.2222222222222222
new: 0.4
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 2.752443751081734
new: 1.944234353490973
path: .spaces[0].spaces[0].spaces[2].metrics.loc.sloc
old: 3.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.ploc
old: 3.0
new: 1.0

### Code

      inline HWND get() const { return mWnd; }

## Minimal test - lines (27, 29)

path: .spaces[0].spaces[0].spaces[1].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.lloc
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 4.5
new: 3.3333333333333335
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: 0.2222222222222222
new: 0.3
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 10.0
new: 7.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 2.752443751081734
new: 1.4876843615091162
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 281.2961228838133
new: 110.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 44.039100017307746
new: 16.36452797660028
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 6.0
new: 4.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 16.0
new: 11.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 62.5102495297363
new: 33.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 15.0
new: 8.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 15.627562382434071
new: 6.111111111111111
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n1
old: 9.0
new: 5.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 6.0
new: 3.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.014310492360184729
new: 0.007652568082218515
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_sei
old: 114.07029903505716
new: 118.6327580676533
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 76.88231703950753
new: 78.69043368652099
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: 131.46876213755786
new: 134.5606416039509
path: .spaces[0].spaces[0].spaces[1].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.cognitive.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.cognitive.average
old: 0.0
new: 1.0

### Code

      ~AutoDestroyTmpWindow() {
        if (mWnd) DestroyWindow(mWnd);
      }