# Global Metrics

path: .metrics.halstead.difficulty
old: 41.47572815533981
new: 26.852459016393443
path: .metrics.halstead.purity_ratio
old: 1.360111465224153
new: 0.9025488173911108
path: .metrics.halstead.n2
old: 103.0
new: 61.0
path: .metrics.halstead.vocabulary
old: 135.0
new: 79.0
path: .metrics.halstead.time
old: 10175.2241035033
new: 4551.536381519874
path: .metrics.halstead.level
old: 0.024110486891385768
new: 0.03724053724053724
path: .metrics.halstead.N1
old: 357.0
new: 302.0
path: .metrics.halstead.length
old: 624.0
new: 484.0
path: .metrics.halstead.effort
old: 183154.0338630594
new: 81927.65486735773
path: .metrics.halstead.n1
old: 32.0
new: 18.0
path: .metrics.halstead.estimated_program_length
old: 848.7095542998715
new: 436.8336276172977
path: .metrics.halstead.N2
old: 267.0
new: 182.0
path: .metrics.halstead.bugs
old: 1.0750361557489907
new: 0.6287805428975243
path: .metrics.halstead.volume
old: 4415.932932559718
new: 3051.029882117718
path: .metrics.loc.blank
old: 31.0
new: 34.0
path: .metrics.loc.lloc
old: 90.0
new: 20.0
path: .metrics.loc.sloc
old: 230.0
new: 168.0
path: .metrics.loc.ploc
old: 170.0
new: 111.0
path: .metrics.loc.cloc
old: 29.0
new: 23.0
path: .metrics.cognitive.average
old: 13.333333333333334
new: 0.0
path: .metrics.cognitive.sum
old: 40.0
new: 0.0
path: .metrics.nexits.average
old: 0.6666666666666666
new: 0.2272727272727273
path: .metrics.nexits.sum
old: 2.0
new: 5.0
path: .metrics.nargs.sum
old: 5.0
new: 27.0
path: .metrics.nargs.average
old: 1.6666666666666667
new: 1.2272727272727273
path: .metrics.mi.mi_sei
old: 0.1774209545381069
new: 11.960690149605917
path: .metrics.mi.mi_visual_studio
old: 18.923770943280005
new: 23.427464469898787
path: .metrics.mi.mi_original
old: 32.359648313008805
new: 40.060964243526925
path: .metrics.cyclomatic.sum
old: 30.0
new: 27.0
path: .metrics.cyclomatic.average
old: 6.0
new: 1.0
path: .metrics.nom.total
old: 3.0
new: 22.0
path: .metrics.nom.functions
old: 3.0
new: 22.0

# Spaces Data

## Minimal test - lines (112, 129)

path: .spaces[3].metrics.nom.functions
old: 1.0
new: 4.0
path: .spaces[3].metrics.nom.total
old: 1.0
new: 4.0
path: .spaces[3].metrics.cognitive.sum
old: 10.0
new: 0.0
path: .spaces[3].metrics.cognitive.average
old: 10.0
new: 0.0
path: .spaces[3].metrics.nargs.average
old: 2.0
new: 1.25
path: .spaces[3].metrics.nargs.sum
old: 2.0
new: 5.0
path: .spaces[3].metrics.nexits.average
old: 2.0
new: 0.0
path: .spaces[3].metrics.nexits.sum
old: 2.0
new: 0.0
path: .spaces[3].metrics.halstead.estimated_program_length
old: 258.1074956100205
new: 62.05374780501027
path: .spaces[3].metrics.halstead.effort
old: 12344.23369214064
new: 3387.7221919712592
path: .spaces[3].metrics.halstead.N1
old: 82.0
new: 38.0
path: .spaces[3].metrics.halstead.length
old: 130.0
new: 58.0
path: .spaces[3].metrics.halstead.n1
old: 22.0
new: 11.0
path: .spaces[3].metrics.halstead.n2
old: 32.0
new: 8.0
path: .spaces[3].metrics.halstead.vocabulary
old: 54.0
new: 19.0
path: .spaces[3].metrics.halstead.volume
old: 748.1353752812508
new: 246.3797957797279
path: .spaces[3].metrics.halstead.N2
old: 48.0
new: 20.0
path: .spaces[3].metrics.halstead.bugs
old: 0.17804160548629122
new: 0.07518835870421003
path: .spaces[3].metrics.halstead.purity_ratio
old: 1.9854422739232347
new: 1.06989220353466
path: .spaces[3].metrics.halstead.difficulty
old: 16.5
new: 13.75
path: .spaces[3].metrics.halstead.level
old: 0.06060606060606061
new: 0.07272727272727272
path: .spaces[3].metrics.halstead.time
old: 685.7907606744799
new: 188.20678844284777
path: .spaces[3].metrics.mi.mi_visual_studio
old: 40.97062332592871
new: 55.19896580274927
path: .spaces[3].metrics.mi.mi_original
old: 70.0597658873381
new: 94.39023152270126
path: .spaces[3].metrics.mi.mi_sei
old: 53.939669654299664
new: 78.83896063367023
path: .spaces[3].metrics.cyclomatic.average
old: 7.0
new: 1.0
path: .spaces[3].metrics.cyclomatic.sum
old: 7.0
new: 5.0
path: .spaces[3].metrics.loc.lloc
old: 22.0
new: 3.0
path: .spaces[3].metrics.loc.ploc
old: 40.0
new: 14.0
path: .spaces[3].metrics.loc.blank
old: 7.0
new: 3.0
path: .spaces[3].metrics.loc.cloc
old: 8.0
new: 1.0
path: .spaces[3].metrics.loc.sloc
old: 55.0
new: 18.0

### Code

    class NS_ConvertUTF8toUTF16 : public nsAutoString {
     public:
      explicit NS_ConvertUTF8toUTF16(const char* aCString) {
        AppendUTF8toUTF16(mozilla::MakeStringSpan(aCString), *this);
      }

      NS_ConvertUTF8toUTF16(const char* aCString, uint32_t aLength) {
        AppendUTF8toUTF16(Substring(aCString, aLength), *this);
      }

      explicit NS_ConvertUTF8toUTF16(const nsACString& aCString) {
        AppendUTF8toUTF16(aCString, *this);
      }

     private:
      // NOT TO BE IMPLEMENTED
      NS_ConvertUTF8toUTF16(char16_t) = delete;
    };

## Minimal test - lines (66, 87)

path: .spaces[1].metrics.cyclomatic.sum
old: 15.0
new: 6.0
path: .spaces[1].metrics.cyclomatic.average
old: 15.0
new: 1.0
path: .spaces[1].metrics.mi.mi_original
old: 57.504609207984345
new: 89.4606123072779
path: .spaces[1].metrics.mi.mi_sei
old: 8.788060431671013
new: 70.19027607663156
path: .spaces[1].metrics.mi.mi_visual_studio
old: 33.628426437417744
new: 52.31614754811573
path: .spaces[1].metrics.halstead.effort
old: 34875.50107065267
new: 5877.778619564994
path: .spaces[1].metrics.halstead.N1
old: 166.0
new: 48.0
path: .spaces[1].metrics.halstead.vocabulary
old: 72.0
new: 22.0
path: .spaces[1].metrics.halstead.time
old: 1937.5278372584817
new: 326.54325664249967
path: .spaces[1].metrics.halstead.level
old: 0.05042016806722689
new: 0.05538461538461538
path: .spaces[1].metrics.halstead.difficulty
old: 19.833333333333332
new: 18.055555555555557
path: .spaces[1].metrics.halstead.n1
old: 18.0
new: 13.0
path: .spaces[1].metrics.halstead.volume
old: 1758.4286254110589
new: 325.5385081605227
path: .spaces[1].metrics.halstead.bugs
old: 0.3558161989436492
new: 0.10856443132387768
path: .spaces[1].metrics.halstead.length
old: 285.0
new: 73.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: 385.8225751427889
new: 76.63504134881501
path: .spaces[1].metrics.halstead.N2
old: 119.0
new: 25.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.3537634215536452
new: 1.0497950869700683
path: .spaces[1].metrics.halstead.n2
old: 54.0
new: 9.0
path: .spaces[1].metrics.nom.functions
old: 1.0
new: 5.0
path: .spaces[1].metrics.nom.total
old: 1.0
new: 5.0
path: .spaces[1].metrics.nargs.average
old: 1.0
new: 1.2
path: .spaces[1].metrics.nargs.sum
old: 1.0
new: 6.0
path: .spaces[1].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 72.0
new: 17.0
path: .spaces[1].metrics.loc.lloc
old: 46.0
new: 4.0
path: .spaces[1].metrics.loc.blank
old: 9.0
new: 4.0
path: .spaces[1].metrics.loc.sloc
old: 81.0
new: 22.0
path: .spaces[1].metrics.cognitive.sum
old: 23.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 23.0
new: 0.0

### Code

    class NS_ConvertASCIItoUTF16 : public nsAutoString {
     public:
      explicit NS_ConvertASCIItoUTF16(const char* aCString) {
        AppendASCIItoUTF16(mozilla::MakeStringSpan(aCString), *this);
      }

      NS_ConvertASCIItoUTF16(const char* aCString, uint32_t aLength) {
        AppendASCIItoUTF16(Substring(aCString, aLength), *this);
      }

      explicit NS_ConvertASCIItoUTF16(const nsACString& aCString) {
        AppendASCIItoUTF16(aCString, *this);
      }

      explicit NS_ConvertASCIItoUTF16(mozilla::Span aCString) {
        AppendASCIItoUTF16(aCString, *this);
      }

     private:
      // NOT TO BE IMPLEMENTED
      NS_ConvertASCIItoUTF16(char16_t) = delete;
    };

## Minimal test - lines (92, 110)

path: .spaces[2].metrics.nom.total
old: 1.0
new: 4.0
path: .spaces[2].metrics.nom.functions
old: 1.0
new: 4.0
path: .spaces[2].metrics.mi.mi_original
old: 70.39293251997329
new: 92.84063115551172
path: .spaces[2].metrics.mi.mi_sei
old: 26.465601824610943
new: 76.14767245643
path: .spaces[2].metrics.mi.mi_visual_studio
old: 41.165457614019466
new: 54.2927667576092
path: .spaces[2].metrics.loc.sloc
old: 50.0
new: 19.0
path: .spaces[2].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[2].metrics.loc.lloc
old: 22.0
new: 3.0
path: .spaces[2].metrics.loc.blank
old: 7.0
new: 3.0
path: .spaces[2].metrics.loc.ploc
old: 43.0
new: 15.0
path: .spaces[2].metrics.cognitive.sum
old: 7.0
new: 0.0
path: .spaces[2].metrics.cognitive.average
old: 7.0
new: 0.0
path: .spaces[2].metrics.cyclomatic.sum
old: 6.0
new: 5.0
path: .spaces[2].metrics.cyclomatic.average
old: 6.0
new: 1.0
path: .spaces[2].metrics.halstead.bugs
old: 0.2393943212254474
new: 0.08667377161590152
path: .spaces[2].metrics.halstead.difficulty
old: 19.5
new: 14.95
path: .spaces[2].metrics.halstead.time
old: 1069.252176961627
new: 232.9383098371803
path: .spaces[2].metrics.halstead.n1
old: 17.0
new: 13.0
path: .spaces[2].metrics.halstead.vocabulary
old: 51.0
new: 23.0
path: .spaces[2].metrics.halstead.effort
old: 19246.539185309284
new: 4192.889577069245
path: .spaces[2].metrics.halstead.n2
old: 34.0
new: 10.0
path: .spaces[2].metrics.halstead.estimated_program_length
old: 242.46060490376732
new: 81.32499728470782
path: .spaces[2].metrics.halstead.N2
old: 78.0
new: 23.0
path: .spaces[2].metrics.halstead.length
old: 174.0
new: 62.0
path: .spaces[2].metrics.halstead.volume
old: 987.0020095030402
new: 280.4608412755348
path: .spaces[2].metrics.halstead.N1
old: 96.0
new: 39.0
path: .spaces[2].metrics.halstead.level
old: 0.05128205128205128
new: 0.06688963210702341
path: .spaces[2].metrics.halstead.purity_ratio
old: 1.393451752320502
new: 1.3116935045920617
path: .spaces[2].metrics.nargs.sum
old: 2.0
new: 5.0
path: .spaces[2].metrics.nargs.average
old: 2.0
new: 1.25

### Code

    class NS_ConvertUTF16toUTF8 : public nsAutoCString {
     public:
      explicit NS_ConvertUTF16toUTF8(const char16ptr_t aString) {
        AppendUTF16toUTF8(mozilla::MakeStringSpan(aString), *this);
      }

      NS_ConvertUTF16toUTF8(const char16ptr_t aString, uint32_t aLength) {
        AppendUTF16toUTF8(Substring(static_cast(aString), aLength),
                          *this);
      }

      explicit NS_ConvertUTF16toUTF8(const nsAString& aString) {
        AppendUTF16toUTF8(aString, *this);
      }

     private:
      // NOT TO BE IMPLEMENTED
      NS_ConvertUTF16toUTF8(char) = delete;
    };

## Minimal test - lines (46, 64)

path: .spaces[0].metrics.halstead.estimated_program_length
old: 37.974168451037094
new: 81.32499728470782
path: .spaces[0].metrics.halstead.volume
old: 74.00879436282185
new: 280.4608412755348
path: .spaces[0].metrics.halstead.N2
old: 11.0
new: 23.0
path: .spaces[0].metrics.halstead.vocabulary
old: 13.0
new: 23.0
path: .spaces[0].metrics.halstead.time
old: 6.784139483258668
new: 232.9383098371803
path: .spaces[0].metrics.halstead.bugs
old: 0.008204590837688399
new: 0.08667377161590152
path: .spaces[0].metrics.halstead.level
old: 0.6060606060606061
new: 0.06688963210702341
path: .spaces[0].metrics.halstead.difficulty
old: 1.65
new: 14.95
path: .spaces[0].metrics.halstead.n1
old: 3.0
new: 13.0
path: .spaces[0].metrics.halstead.length
old: 20.0
new: 62.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.898708422551855
new: 1.3116935045920617
path: .spaces[0].metrics.halstead.N1
old: 9.0
new: 39.0
path: .spaces[0].metrics.halstead.effort
old: 122.11451069865603
new: 4192.889577069245
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 5.0
path: .spaces[0].metrics.nargs.average
old: null
new: 1.25
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 7.0
new: 19.0
path: .spaces[0].metrics.loc.ploc
old: 7.0
new: 15.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 3.0
path: .spaces[0].metrics.mi.mi_original
old: 116.86449915510836
new: 92.84063115551172
path: .spaces[0].metrics.mi.mi_visual_studio
old: 68.3418123714084
new: 54.2927667576092
path: .spaces[0].metrics.mi.mi_sei
old: 93.00080125443898
new: 76.14767245643
path: .spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 4.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 4.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0

### Code

    class NS_LossyConvertUTF16toASCII : public nsAutoCString {
     public:
      explicit NS_LossyConvertUTF16toASCII(const char16ptr_t aString) {
        LossyAppendUTF16toASCII(mozilla::MakeStringSpan(aString), *this);
      }

      NS_LossyConvertUTF16toASCII(const char16ptr_t aString, uint32_t aLength) {
        LossyAppendUTF16toASCII(
            Substring(static_cast(aString), aLength), *this);
      }

      explicit NS_LossyConvertUTF16toASCII(const nsAString& aString) {
        LossyAppendUTF16toASCII(aString, *this);
      }

     private:
      // NOT TO BE IMPLEMENTED
      NS_LossyConvertUTF16toASCII(char) = delete;
    };