# Global Metrics

path: .metrics.halstead.bugs
old: 3.294212515703431
new: 0.08609652534110061
path: .metrics.halstead.difficulty
old: 89.41176470588235
new: 9.807692307692308
path: .metrics.halstead.effort
old: 982447.385842889
new: 4151.072505116588
path: .metrics.halstead.length
old: 1518.0
new: 79.0
path: .metrics.halstead.purity_ratio
old: 0.6459046863199245
new: 2.2887948304531163
path: .metrics.halstead.volume
old: 10987.89839429547
new: 423.2466083648286
path: .metrics.halstead.n2
old: 119.0
new: 26.0
path: .metrics.halstead.level
old: 0.01118421052631579
new: 0.10196078431372547
path: .metrics.halstead.time
old: 54580.41032460494
new: 230.6151391731438
path: .metrics.halstead.n1
old: 32.0
new: 15.0
path: .metrics.halstead.vocabulary
old: 151.0
new: 41.0
path: .metrics.halstead.estimated_program_length
old: 980.4833138336452
new: 180.8147916057962
path: .metrics.halstead.N1
old: 853.0
new: 45.0
path: .metrics.halstead.N2
old: 665.0
new: 34.0
path: .metrics.nom.functions
old: 9.0
new: 3.0
path: .metrics.nom.total
old: 9.0
new: 3.0
path: .metrics.nexits.average
old: 0.3333333333333333
new: 0.6666666666666666
path: .metrics.nexits.sum
old: 3.0
new: 2.0
path: .metrics.loc.sloc
old: 319.0
new: 36.0
path: .metrics.loc.lloc
old: 84.0
new: 5.0
path: .metrics.loc.blank
old: 64.0
new: 4.0
path: .metrics.loc.ploc
old: 225.0
new: 24.0
path: .metrics.loc.cloc
old: 30.0
new: 8.0
path: .metrics.mi.mi_original
old: 18.870245173832117
new: 79.88762715714215
path: .metrics.mi.mi_visual_studio
old: 11.035231095808255
new: 46.71791061821178
path: .metrics.mi.mi_sei
old: -21.024267447143764
new: 73.61990711083959
path: .metrics.cyclomatic.sum
old: 45.0
new: 7.0
path: .metrics.cyclomatic.average
old: 3.0
new: 1.1666666666666667
path: .metrics.nargs.average
old: 3.111111111111111
new: 1.6666666666666667
path: .metrics.nargs.sum
old: 28.0
new: 5.0
path: .metrics.cognitive.sum
old: 46.0
new: 1.0
path: .metrics.cognitive.average
old: 5.111111111111111
new: 0.3333333333333333

# Spaces Data

## Minimal test - lines (12, 35)

path: .spaces[0].spaces[0].metrics.nom.total
old: 0.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 0.0
new: 3.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: null
new: 87.51227630838545
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: null
new: 51.17676977098563
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: null
new: 72.68451629971547
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 0.0
new: 5.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: null
new: 1.6666666666666667
path: .spaces[0].spaces[0].metrics.nexits.average
old: null
new: 0.6666666666666666
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 0.0
new: 5.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 1.0
new: 24.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 0.0
new: 4.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 1.0
new: 18.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 0.0
new: 2.0
path: .spaces[0].spaces[0].metrics.halstead.level
old: null
new: 0.09655172413793103
path: .spaces[0].spaces[0].metrics.halstead.time
old: 0.0
new: 217.1573656359797
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 1.0
new: 29.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: null
new: 2.066329107020298
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 36.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 0.0
new: 3908.832581447634
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 0.0
new: 377.4045251052888
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 0.0
new: 44.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.08271357493138613
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 0.0
new: 10.357142857142858
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: null
new: 150.84202481248175
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 0.0
new: 15.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 1.0
new: 21.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 1.0
new: 73.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.25
path: .spaces[0].spaces[0].metrics.cognitive.average
old: null
new: 0.3333333333333333
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 0.0
new: 1.0

### Code

    namespace widget {

    HeadlessKeyBindings& HeadlessKeyBindings::GetInstance() {
      static UniquePtr sInstance;
      if (!sInstance) {
        sInstance.reset(new HeadlessKeyBindings());
        ClearOnShutdown(&sInstance);
      }
      return *sInstance;
    }

    nsresult HeadlessKeyBindings::AttachNativeKeyEvent(
        WidgetKeyboardEvent& aEvent) {
      // Stub for non-mac platforms.
      return NS_OK;
    }

    void HeadlessKeyBindings::GetEditCommands(
        nsIWidget::NativeKeyBindingsType aType, const WidgetKeyboardEvent& aEvent,
        const Maybe& aWritingMode, nsTArray& aCommands) {
      // Stub for non-mac platforms.
    }

    }  // namespace widget

## Minimal test - lines (11, 36)

path: .spaces[0].metrics.nom.functions
old: 1.0
new: 3.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 3.0
path: .spaces[0].metrics.halstead.n1
old: 25.0
new: 15.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 226.13550476167583
new: 156.71085454414833
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.277601721817378
new: 2.0894780605886445
path: .spaces[0].metrics.halstead.N2
old: 76.0
new: 30.0
path: .spaces[0].metrics.halstead.length
old: 177.0
new: 75.0
path: .spaces[0].metrics.halstead.time
old: 2185.4478247406764
new: 221.9937513762337
path: .spaces[0].metrics.halstead.n2
old: 24.0
new: 22.0
path: .spaces[0].metrics.halstead.volume
old: 993.803642408392
new: 390.7090024221712
path: .spaces[0].metrics.halstead.vocabulary
old: 49.0
new: 37.0
path: .spaces[0].metrics.halstead.difficulty
old: 39.583333333333336
new: 10.227272727272728
path: .spaces[0].metrics.halstead.bugs
old: 0.38555592109610914
new: 0.08393715574453897
path: .spaces[0].metrics.halstead.level
old: 0.02526315789473684
new: 0.09777777777777778
path: .spaces[0].metrics.halstead.N1
old: 101.0
new: 45.0
path: .spaces[0].metrics.halstead.effort
old: 39338.06084533218
new: 3995.887524772206
path: .spaces[0].metrics.cyclomatic.average
old: 4.0
new: 1.2
path: .spaces[0].metrics.cyclomatic.sum
old: 8.0
new: 6.0
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.6666666666666666
path: .spaces[0].metrics.mi.mi_sei
old: 62.42176647516617
new: 73.81518970857059
path: .spaces[0].metrics.mi.mi_visual_studio
old: 45.10355100837258
new: 50.17861301606784
path: .spaces[0].metrics.mi.mi_original
old: 77.1270722243171
new: 85.80542825747602
path: .spaces[0].metrics.cognitive.average
old: 10.0
new: 0.3333333333333333
path: .spaces[0].metrics.cognitive.sum
old: 10.0
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 3.0
new: 5.0
path: .spaces[0].metrics.nargs.average
old: 3.0
new: 1.6666666666666667
path: .spaces[0].metrics.loc.cloc
old: 4.0
new: 3.0
path: .spaces[0].metrics.loc.ploc
old: 22.0
new: 20.0
path: .spaces[0].metrics.loc.lloc
old: 12.0
new: 5.0
path: .spaces[0].metrics.loc.sloc
old: 32.0
new: 26.0
path: .spaces[0].metrics.loc.blank
old: 6.0
new: 3.0

### Code

    namespace mozilla {
    namespace widget {

    HeadlessKeyBindings& HeadlessKeyBindings::GetInstance() {
      static UniquePtr sInstance;
      if (!sInstance) {
        sInstance.reset(new HeadlessKeyBindings());
        ClearOnShutdown(&sInstance);
      }
      return *sInstance;
    }

    nsresult HeadlessKeyBindings::AttachNativeKeyEvent(
        WidgetKeyboardEvent& aEvent) {
      // Stub for non-mac platforms.
      return NS_OK;
    }

    void HeadlessKeyBindings::GetEditCommands(
        nsIWidget::NativeKeyBindingsType aType, const WidgetKeyboardEvent& aEvent,
        const Maybe& aWritingMode, nsTArray& aCommands) {
      // Stub for non-mac platforms.
    }

    }  // namespace widget
    }  // namespace mozilla