# Global Metrics

path: .metrics.nexits.sum
old: 2.0
new: 0.0
path: .metrics.nexits.average
old: 0.2
new: 0.0
path: .metrics.cyclomatic.average
old: 1.0
new: 1.3333333333333333
path: .metrics.cyclomatic.sum
old: 13.0
new: 8.0
path: .metrics.mi.mi_original
old: 66.81105793594611
new: 73.67420378262084
path: .metrics.mi.mi_visual_studio
old: 39.07079411458837
new: 43.08432969743908
path: .metrics.mi.mi_sei
old: 47.443274126209865
new: 58.20284493651724
path: .metrics.halstead.vocabulary
old: 58.0
new: 43.0
path: .metrics.halstead.N2
old: 59.0
new: 50.0
path: .metrics.halstead.time
old: 492.30880979400615
new: 447.5109151147994
path: .metrics.halstead.difficulty
old: 10.290697674418604
new: 12.06896551724138
path: .metrics.halstead.n2
old: 43.0
new: 29.0
path: .metrics.halstead.effort
old: 8861.558576292111
new: 8055.196472066389
path: .metrics.halstead.level
old: 0.09717514124293786
new: 0.08285714285714287
path: .metrics.halstead.bugs
old: 0.142742123640362
new: 0.1339459243781698
path: .metrics.halstead.n1
old: 15.0
new: 14.0
path: .metrics.halstead.purity_ratio
old: 1.9859370298388976
new: 1.578735103800862
path: .metrics.halstead.estimated_program_length
old: 291.93274338631795
new: 194.18441776750603
path: .metrics.halstead.volume
old: 861.1232062837531
new: 667.430564828358
path: .metrics.halstead.N1
old: 88.0
new: 73.0
path: .metrics.halstead.length
old: 147.0
new: 123.0
path: .metrics.nargs.average
old: 0.7
new: 1.6666666666666667
path: .metrics.nargs.sum
old: 7.0
new: 5.0
path: .metrics.nom.functions
old: 10.0
new: 3.0
path: .metrics.nom.total
old: 10.0
new: 3.0
path: .metrics.cognitive.sum
old: 0.0
new: 2.0
path: .metrics.cognitive.average
old: 0.0
new: 0.6666666666666666
path: .metrics.loc.ploc
old: 40.0
new: 31.0
path: .metrics.loc.blank
old: 12.0
new: 8.0
path: .metrics.loc.cloc
old: 7.0
new: 6.0
path: .metrics.loc.lloc
old: 8.0
new: 5.0
path: .metrics.loc.sloc
old: 59.0
new: 45.0

# Spaces Data

## Minimal test - lines (23, 32)

path: .spaces[0].spaces[0].spaces[1].metrics.loc.ploc
old: 3.0
new: 9.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.lloc
old: 1.0
new: 3.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.sloc
old: 3.0
new: 10.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 3.0
new: 23.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.6364527976600278
new: 1.906888445930672
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 8.0
new: 29.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.005928155507483437
new: 0.05852895058776166
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 75.0
new: 2326.6871330781582
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 3.0
new: 17.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 2.5
new: 8.117647058823529
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 7.0
new: 36.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 30.0
new: 286.62087871252675
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: 0.4
new: 0.12318840579710146
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n1
old: 5.0
new: 12.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 4.166666666666667
new: 129.2603962821199
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 10.0
new: 59.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 16.36452797660028
new: 112.50641830990963
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.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.mi.mi_sei
old: 119.57777639115298
new: 74.2771654067978
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 79.11476873621837
new: 60.710928426323704
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: 135.2862545389334
new: 103.81568760901352
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.sum
old: 0.0
new: 4.0
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.average
old: 0.0
new: 4.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

      static void OnConnectionChanged(int32_t aType, jni::String::Param aSubType,
                                      bool aIsWifi, int32_t aGateway) {
        hal::NotifyNetworkChange(hal::NetworkInformation(aType, aIsWifi, aGateway));

        nsCOMPtr os = services::GetObserverService();
        if (os) {
          os->NotifyObservers(nullptr, NS_NETWORK_LINK_TYPE_TOPIC,
                              aSubType->ToString().get());
        }
      }

## Minimal test - lines (20, 20)

path: .spaces[0].spaces[0].spaces[0].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 12.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 25.925925925925927
new: 1.289960052715201
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 16.0
new: 5.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.21428571428571427
new: 0.5
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 100.0
new: 11.60964047443681
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.9272323786953616
new: 1.6
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 48.18080946738404
new: 8.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 25.0
new: 5.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.020054719834944633
new: 0.002712967490108627
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 7.0
new: 4.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 13.0
new: 4.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 466.6666666666667
new: 23.21928094887362
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 9.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 4.666666666666667
new: 2.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.ploc
old: 3.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.sloc
old: 3.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 110.54555530148872
new: 152.37629276875444
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 75.45356488680616
new: 92.40962204246613
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 129.02559595643854
new: 158.02045369261705

### Code

      GeckoNetworkManager() = delete;

## Minimal test - lines (16, 43)

path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].metrics.nom.total
old: 10.0
new: 3.0
path: .spaces[0].metrics.nom.functions
old: 10.0
new: 3.0
path: .spaces[0].metrics.nargs.sum
old: 7.0
new: 5.0
path: .spaces[0].metrics.nargs.average
old: 0.7
new: 1.6666666666666667
path: .spaces[0].metrics.halstead.time
old: 473.64993902991097
new: 439.35573360942135
path: .spaces[0].metrics.halstead.difficulty
old: 10.3125
new: 13.08695652173913
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8984649141931629
new: 1.3564214991217047
path: .spaces[0].metrics.halstead.vocabulary
old: 55.0
new: 37.0
path: .spaces[0].metrics.halstead.N2
old: 55.0
new: 43.0
path: .spaces[0].metrics.halstead.N1
old: 88.0
new: 73.0
path: .spaces[0].metrics.halstead.volume
old: 826.7344390340264
new: 604.2965904129583
path: .spaces[0].metrics.halstead.effort
old: 8525.698902538397
new: 7908.403204969584
path: .spaces[0].metrics.halstead.n2
old: 40.0
new: 23.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 271.4804827296223
new: 157.34489389811776
path: .spaces[0].metrics.halstead.level
old: 0.09696969696969696
new: 0.07641196013289037
path: .spaces[0].metrics.halstead.bugs
old: 0.1391122598959543
new: 0.13231363909356209
path: .spaces[0].metrics.halstead.length
old: 143.0
new: 116.0
path: .spaces[0].metrics.halstead.n1
old: 15.0
new: 14.0
path: .spaces[0].metrics.loc.lloc
old: 8.0
new: 5.0
path: .spaces[0].metrics.loc.blank
old: 10.0
new: 5.0
path: .spaces[0].metrics.loc.sloc
old: 47.0
new: 28.0
path: .spaces[0].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 35.0
new: 23.0
path: .spaces[0].metrics.mi.mi_sei
old: 43.56912034978775
new: 43.4674627052961
path: .spaces[0].metrics.mi.mi_original
old: 70.93669449716562
new: 82.1071483052214
path: .spaces[0].metrics.mi.mi_visual_studio
old: 41.483447074365856
new: 48.015876201883856
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.4
path: .spaces[0].metrics.cyclomatic.sum
old: 12.0
new: 7.0
path: .spaces[0].metrics.nexits.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 0.2
new: 0.0

### Code

    namespace mozilla {

    class GeckoNetworkManager final
        : public java::GeckoNetworkManager::Natives {
      GeckoNetworkManager() = delete;

     public:
      static void OnConnectionChanged(int32_t aType, jni::String::Param aSubType,
                                      bool aIsWifi, int32_t aGateway) {
        hal::NotifyNetworkChange(hal::NetworkInformation(aType, aIsWifi, aGateway));

        nsCOMPtr os = services::GetObserverService();
        if (os) {
          os->NotifyObservers(nullptr, NS_NETWORK_LINK_TYPE_TOPIC,
                              aSubType->ToString().get());
        }
      }

      static void OnStatusChanged(jni::String::Param aStatus) {
        nsCOMPtr os = mozilla::services::GetObserverService();
        if (os) {
          os->NotifyObservers(nullptr, NS_NETWORK_LINK_TOPIC,
                              aStatus->ToString().get());
        }
      }
    };

    }  // namespace mozilla

## Minimal test - lines (34, 40)

path: .spaces[0].spaces[0].spaces[2].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[2].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[2].metrics.nargs.average
old: 2.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.nargs.sum
old: 2.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.lloc
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.ploc
old: 8.0
new: 7.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.sloc
old: 8.0
new: 7.0
path: .spaces[0].spaces[0].spaces[2].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[2].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[2].metrics.cognitive.average
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.cognitive.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.n2
old: 13.0
new: 12.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.bugs
old: 0.02532499608613775
new: 0.04053714741197428
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.level
old: 0.2222222222222222
new: 0.13333333333333333
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: 76.63504134881501
new: 86.03910001730775
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.difficulty
old: 4.5
new: 7.5
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.N1
old: 20.0
new: 24.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.time
old: 36.7903108537577
new: 74.5056406367188
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.vocabulary
old: 22.0
new: 24.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.volume
old: 147.1612434150308
new: 178.8135375281251
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.n1
old: 9.0
new: 12.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.N2
old: 13.0
new: 15.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.effort
old: 662.2255953676387
new: 1341.1015314609383
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.length
old: 33.0
new: 39.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 2.3222739802671213
new: 2.206130769674558
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_sei
old: 84.72347940245038
new: 86.1528270655927
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 64.98660634550599
new: 65.52471871642753
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_original
old: 111.12709685081524
new: 112.04726900509108

### Code

      static void OnStatusChanged(jni::String::Param aStatus) {
        nsCOMPtr os = mozilla::services::GetObserverService();
        if (os) {
          os->NotifyObservers(nullptr, NS_NETWORK_LINK_TOPIC,
                              aStatus->ToString().get());
        }
      }

## Minimal test - lines (18, 41)

path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.2
new: 0.0
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 2.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.5
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 11.0
new: 6.0
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 7.0
new: 5.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.7
new: 1.6666666666666667
path: .spaces[0].spaces[0].metrics.nom.functions
old: 10.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 10.0
new: 3.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 140.0
new: 113.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 805.6842503028855
new: 584.2015251629813
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 15.0
new: 14.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 8366.721060837657
new: 7807.05674535984
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.0962962962962963
new: 0.07482993197278912
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 86.0
new: 71.0
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 10.384615384615383
new: 13.363636363636363
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.13737749893242002
new: 0.13118080831759624
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 39.0
new: 22.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.8909574676411105
new: 1.3399156152108582
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 264.7340454697555
new: 151.41046451882698
path: .spaces[0].spaces[0].metrics.halstead.time
old: 464.8178367132032
new: 433.7253747422134
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 54.0
new: 42.0
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 54.0
new: 36.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 8.0
new: 3.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 8.0
new: 5.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 43.0
new: 24.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 33.0
new: 21.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 72.74176015866911
new: 85.01024874505293
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 46.759656788279415
new: 47.55393145363908
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 42.53904102846147
new: 49.713595757340904

### Code

    class GeckoNetworkManager final
        : public java::GeckoNetworkManager::Natives {
      GeckoNetworkManager() = delete;

     public:
      static void OnConnectionChanged(int32_t aType, jni::String::Param aSubType,
                                      bool aIsWifi, int32_t aGateway) {
        hal::NotifyNetworkChange(hal::NetworkInformation(aType, aIsWifi, aGateway));

        nsCOMPtr os = services::GetObserverService();
        if (os) {
          os->NotifyObservers(nullptr, NS_NETWORK_LINK_TYPE_TOPIC,
                              aSubType->ToString().get());
        }
      }

      static void OnStatusChanged(jni::String::Param aStatus) {
        nsCOMPtr os = mozilla::services::GetObserverService();
        if (os) {
          os->NotifyObservers(nullptr, NS_NETWORK_LINK_TOPIC,
                              aStatus->ToString().get());
        }
      }
    };