# Global Metrics

path: .metrics.halstead.N1
old: 724.0
new: 2266.0
path: .metrics.halstead.time
old: 48638.74327510348
new: 92121.84810714844
path: .metrics.halstead.vocabulary
old: 79.0
new: 626.0
path: .metrics.halstead.purity_ratio
old: 0.3507480113896429
new: 1.4649127883289017
path: .metrics.halstead.difficulty
old: 114.12037037037037
new: 46.518612521150594
path: .metrics.halstead.n1
old: 25.0
new: 35.0
path: .metrics.halstead.N2
old: 493.0
new: 1571.0
path: .metrics.halstead.bugs
old: 3.050576910258253
new: 4.669841890755497
path: .metrics.halstead.level
old: 0.008762677484787018
new: 0.021496771846867328
path: .metrics.halstead.n2
old: 54.0
new: 591.0
path: .metrics.halstead.volume
old: 7671.701170531534
new: 35645.802315680456
path: .metrics.halstead.effort
old: 875497.3789518626
new: 1658193.2659286717
path: .metrics.halstead.estimated_program_length
old: 426.8603298611954
new: 5620.870368817995
path: .metrics.halstead.length
old: 1217.0
new: 3837.0
path: .metrics.loc.lloc
old: 52.0
new: 357.0
path: .metrics.loc.cloc
old: 17.0
new: 114.0
path: .metrics.loc.sloc
old: 172.0
new: 1004.0
path: .metrics.loc.blank
old: 14.0
new: 114.0
path: .metrics.loc.ploc
old: 141.0
new: 776.0
path: .metrics.cyclomatic.average
old: 1.7
new: 4.513513513513513
path: .metrics.cyclomatic.sum
old: 34.0
new: 167.0
path: .metrics.mi.mi_visual_studio
old: 19.45910082858076
new: 0.0
path: .metrics.mi.mi_sei
old: -0.8325421700861995
new: -82.64870059875649
path: .metrics.mi.mi_original
old: 33.2750624168731
new: -33.88351695745777
path: .metrics.nexits.average
old: 0.6666666666666666
new: 1.2857142857142858
path: .metrics.nexits.sum
old: 6.0
new: 45.0
path: .metrics.nargs.average
old: 0.7777777777777778
new: 1.0571428571428572
path: .metrics.nargs.sum
old: 7.0
new: 37.0
path: .metrics.nom.functions
old: 9.0
new: 35.0
path: .metrics.nom.total
old: 9.0
new: 35.0
path: .metrics.cognitive.sum
old: 18.0
new: 88.0
path: .metrics.cognitive.average
old: 2.0
new: 2.5142857142857142

# Spaces Data

## Minimal test - lines (255, 302)

path: .spaces[0].metrics.halstead.difficulty
old: 122.0
new: 16.964285714285715
path: .spaces[0].metrics.halstead.effort
old: 921018.0468514828
new: 14982.511536534055
path: .spaces[0].metrics.halstead.level
old: 0.00819672131147541
new: 0.05894736842105263
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.3286214638886999
new: 1.3541922048618933
path: .spaces[0].metrics.halstead.N2
old: 488.0
new: 50.0
path: .spaces[0].metrics.halstead.volume
old: 7549.328252881007
new: 883.1796274167443
path: .spaces[0].metrics.halstead.time
old: 51167.66926952682
new: 832.3617520296698
path: .spaces[0].metrics.halstead.length
old: 1212.0
new: 159.0
path: .spaces[0].metrics.halstead.n1
old: 25.0
new: 19.0
path: .spaces[0].metrics.halstead.vocabulary
old: 75.0
new: 47.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 398.2892142331043
new: 215.31656057304104
path: .spaces[0].metrics.halstead.N1
old: 724.0
new: 109.0
path: .spaces[0].metrics.halstead.bugs
old: 3.155422407947446
new: 0.2025824531158347
path: .spaces[0].metrics.halstead.n2
old: 50.0
new: 28.0
path: .spaces[0].metrics.loc.sloc
old: 152.0
new: 48.0
path: .spaces[0].metrics.loc.lloc
old: 52.0
new: 23.0
path: .spaces[0].metrics.loc.blank
old: 12.0
new: 7.0
path: .spaces[0].metrics.loc.cloc
old: 6.0
new: 7.0
path: .spaces[0].metrics.loc.ploc
old: 134.0
new: 34.0
path: .spaces[0].metrics.cyclomatic.sum
old: 33.0
new: 8.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.736842105263158
new: 8.0
path: .spaces[0].metrics.nexits.average
old: 0.6666666666666666
new: 2.0
path: .spaces[0].metrics.nexits.sum
old: 6.0
new: 2.0
path: .spaces[0].metrics.cognitive.average
old: 2.0
new: 8.0
path: .spaces[0].metrics.cognitive.sum
old: 18.0
new: 8.0
path: .spaces[0].metrics.nom.total
old: 9.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 9.0
new: 1.0
path: .spaces[0].metrics.mi.mi_original
old: 35.59122346347712
new: 71.17219485923147
path: .spaces[0].metrics.mi.mi_sei
old: -5.845686197867247
new: 55.67830133902335
path: .spaces[0].metrics.mi.mi_visual_studio
old: 20.81358097279364
new: 41.621166584345886
path: .spaces[0].metrics.nargs.sum
old: 7.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 0.7777777777777778
new: 0.0

### Code

    nsXPLookAndFeel* nsXPLookAndFeel::GetInstance() {
      if (sInstance) {
        return sInstance;
      }

      NS_ENSURE_TRUE(!sShutdown, nullptr);

      // If we're in a content process, then the parent process will have supplied
      // us with an initial FullLookAndFeel object (for when the RemoteLookAndFeel
      // is to be used) or an initial LookAndFeelCache object (for regular
      // LookAndFeel implementations).  We grab this data from the ContentChild,
      // where it's been temporarily stashed, and initialize our new LookAndFeel
      // object with it.

      LookAndFeelCache* lnfCache = nullptr;
      FullLookAndFeel* fullLnf = nullptr;
      widget::LookAndFeelData* lnfData = nullptr;

      if (auto* cc = mozilla::dom::ContentChild::GetSingleton()) {
        lnfData = &cc->BorrowLookAndFeelData();
        switch (lnfData->type()) {
          case widget::LookAndFeelData::TLookAndFeelCache:
            lnfCache = &lnfData->get_LookAndFeelCache();
            break;
          case widget::LookAndFeelData::TFullLookAndFeel:
            fullLnf = &lnfData->get_FullLookAndFeel();
            break;
          default:
            MOZ_ASSERT_UNREACHABLE("unexpected LookAndFeelData type");
        }
      }

      if (fullLnf) {
        sInstance = new widget::RemoteLookAndFeel(std::move(*fullLnf));
      } else if (gfxPlatform::IsHeadless()) {
        sInstance = new widget::HeadlessLookAndFeel(lnfCache);
      } else {
        sInstance = new nsLookAndFeel(lnfCache);
      }

      // This is only ever used once during initialization, and can be cleared now.
      if (lnfData) {
        *lnfData = widget::LookAndFeelData{};
      }

      nsNativeBasicTheme::Init();
      return sInstance;
    }