# Global Metrics

path: .metrics.nexits.average
old: 0.7692307692307693
new: 1.5
path: .metrics.nexits.sum
old: 10.0
new: 12.0
path: .metrics.nargs.sum
old: 5.0
new: 3.0
path: .metrics.nargs.average
old: 0.38461538461538464
new: 0.375
path: .metrics.mi.mi_original
old: 39.376175447942614
new: 23.66865617407956
path: .metrics.mi.mi_sei
old: 15.50983113903893
new: -11.814807144559133
path: .metrics.mi.mi_visual_studio
old: 23.027003185931353
new: 13.841319400046526
path: .metrics.halstead.vocabulary
old: 98.0
new: 230.0
path: .metrics.halstead.n2
old: 74.0
new: 200.0
path: .metrics.halstead.length
old: 544.0
new: 1081.0
path: .metrics.halstead.n1
old: 24.0
new: 30.0
path: .metrics.halstead.difficulty
old: 34.21621621621622
new: 35.7
path: .metrics.halstead.effort
old: 123123.70617517624
new: 302770.79839903006
path: .metrics.halstead.time
old: 6840.205898620902
new: 16820.599911057227
path: .metrics.halstead.bugs
old: 0.8249732471649656
new: 1.5029853104379445
path: .metrics.halstead.volume
old: 3598.4021551986734
new: 8480.97474507087
path: .metrics.halstead.N2
old: 211.0
new: 476.0
path: .metrics.halstead.estimated_program_length
old: 569.53864907385
new: 1675.9779558232003
path: .metrics.halstead.purity_ratio
old: 1.046946046091636
new: 1.5503958888281224
path: .metrics.halstead.level
old: 0.0292259083728278
new: 0.028011204481792715
path: .metrics.halstead.N1
old: 333.0
new: 605.0
path: .metrics.cyclomatic.average
old: 1.25
new: 5.25
path: .metrics.cyclomatic.sum
old: 25.0
new: 42.0
path: .metrics.nom.closures
old: 0.0
new: 1.0
path: .metrics.nom.total
old: 13.0
new: 8.0
path: .metrics.nom.functions
old: 13.0
new: 7.0
path: .metrics.cognitive.sum
old: 5.0
new: 65.0
path: .metrics.cognitive.average
old: 0.38461538461538464
new: 8.125
path: .metrics.loc.cloc
old: 34.0
new: 32.0
path: .metrics.loc.sloc
old: 171.0
new: 269.0
path: .metrics.loc.blank
old: 20.0
new: 31.0
path: .metrics.loc.ploc
old: 117.0
new: 206.0
path: .metrics.loc.lloc
old: 26.0
new: 65.0

# Spaces Data

## Minimal test - lines (26, 45)

path: .spaces[0].metrics.halstead.n1
old: 24.0
new: 15.0
path: .spaces[0].metrics.halstead.level
old: 0.028708133971291863
new: 0.0753623188405797
path: .spaces[0].metrics.halstead.length
old: 542.0
new: 107.0
path: .spaces[0].metrics.halstead.time
old: 6906.772057006399
new: 422.5940860052918
path: .spaces[0].metrics.halstead.effort
old: 124321.89702611518
new: 7606.6935480952525
path: .spaces[0].metrics.halstead.bugs
old: 0.8303168108667983
new: 0.1289266481674638
path: .spaces[0].metrics.halstead.estimated_program_length
old: 554.2737001211542
new: 180.8147916057962
path: .spaces[0].metrics.halstead.difficulty
old: 34.833333333333336
new: 13.26923076923077
path: .spaces[0].metrics.halstead.vocabulary
old: 96.0
new: 41.0
path: .spaces[0].metrics.halstead.n2
old: 72.0
new: 26.0
path: .spaces[0].metrics.halstead.volume
old: 3569.0496753908665
new: 573.2580644941349
path: .spaces[0].metrics.halstead.N2
old: 209.0
new: 46.0
path: .spaces[0].metrics.halstead.N1
old: 333.0
new: 61.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.0226452031755613
new: 1.6898578654747307
path: .spaces[0].metrics.cyclomatic.average
old: 1.263157894736842
new: 3.0
path: .spaces[0].metrics.cyclomatic.sum
old: 24.0
new: 3.0
path: .spaces[0].metrics.nom.functions
old: 13.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 13.0
new: 1.0
path: .spaces[0].metrics.loc.cloc
old: 3.0
new: 2.0
path: .spaces[0].metrics.loc.blank
old: 18.0
new: 2.0
path: .spaces[0].metrics.loc.sloc
old: 133.0
new: 20.0
path: .spaces[0].metrics.loc.lloc
old: 26.0
new: 6.0
path: .spaces[0].metrics.loc.ploc
old: 112.0
new: 16.0
path: .spaces[0].metrics.nexits.sum
old: 10.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 0.7692307692307693
new: 0.0
path: .spaces[0].metrics.mi.mi_original
old: 43.72005998457728
new: 88.75219002218309
path: .spaces[0].metrics.mi.mi_visual_studio
old: 25.567286540688464
new: 51.901865510048594
path: .spaces[0].metrics.mi.mi_sei
old: 1.3463592037573644
new: 76.17374411818409
path: .spaces[0].metrics.nargs.sum
old: 5.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 0.38461538461538464
new: 1.0
path: .spaces[0].metrics.cognitive.sum
old: 5.0
new: 3.0
path: .spaces[0].metrics.cognitive.average
old: 0.38461538461538464
new: 3.0

### Code

    void nsMenuUtilsX::DispatchCommandTo(nsIContent* aTargetContent) {
      MOZ_ASSERT(aTargetContent, "null ptr");

      dom::Document* doc = aTargetContent->OwnerDoc();
      if (doc) {
        RefPtr event =
            new dom::XULCommandEvent(doc, doc->GetPresContext(), nullptr);

        IgnoredErrorResult rv;
        event->InitCommandEvent(u"command"_ns, true, true,
                                nsGlobalWindowInner::Cast(doc->GetInnerWindow()), 0, false, false,
                                false, false, nullptr, 0, rv);
        // FIXME: Should probably figure out how to init this with the actual
        // pressed keys, but this is a big old edge case anyway. -dwh
        if (!rv.Failed()) {
          event->SetTrusted(true);
          aTargetContent->DispatchEvent(*event);
        }
      }
    }