Global Metrics

path: .metrics.halstead.volume
old: 1477.1850506721175
new: 26144.452929330593

path: .metrics.halstead.effort
old: 15108.561805036145
new: 1750886.090115776

path: .metrics.halstead.estimated_program_length
old: 462.05318954085726
new: 2933.860067303631

path: .metrics.halstead.bugs
old: 0.2037171048937988
new: 4.842288642528123

path: .metrics.halstead.time
old: 839.3645447242302
new: 97271.44945087643

path: .metrics.halstead.n1
old: 13.0
new: 34.0

path: .metrics.halstead.purity_ratio
old: 1.983060899316984
new: 0.9547217921586824

path: .metrics.halstead.length
old: 233.0
new: 3073.0

path: .metrics.halstead.vocabulary
old: 81.0
new: 364.0

path: .metrics.halstead.n2
old: 68.0
new: 330.0

path: .metrics.halstead.N1
old: 126.0
new: 1773.0

path: .metrics.halstead.N2
old: 107.0
new: 1300.0

path: .metrics.halstead.difficulty
old: 10.227941176470589
new: 66.96969696969697

path: .metrics.halstead.level
old: 0.09777138749101363
new: 0.01493212669683258

path: .metrics.nexits.sum
old: 1.0
new: 28.0

path: .metrics.nexits.average
old: 1.0
new: 1.0769230769230769

path: .metrics.cognitive.sum
old: 0.0
new: 146.0

path: .metrics.cognitive.average
old: 0.0
new: 5.615384615384615

path: .metrics.nargs.average
old: 0.0
new: 0.6923076923076923

path: .metrics.nargs.sum
old: 0.0
new: 18.0

path: .metrics.nom.functions
old: 1.0
new: 21.0

path: .metrics.nom.total
old: 1.0
new: 26.0

path: .metrics.nom.closures
old: 0.0
new: 5.0

path: .metrics.loc.sloc
old: 91.0
new: 38.0

path: .metrics.loc.lloc
old: 1.0
new: 251.0

path: .metrics.loc.ploc
old: 61.0
new: 614.0

path: .metrics.loc.blank
old: 20.0
new: 0.0

path: .metrics.loc.cloc
old: 10.0
new: 155.0

path: .metrics.cyclomatic.average
old: 1.0
new: 5.857142857142857

path: .metrics.cyclomatic.sum
old: 12.0
new: 123.0

path: .metrics.mi.mi_sei
old: 32.628558799821874
new: -17.97341332421828

path: .metrics.mi.mi_original
old: 57.21502946743048
new: 30.889864138459124

path: .metrics.mi.mi_visual_studio
old: 33.459081559900866
new: 18.064248034186623

Spaces Data

Minimal test - lines (123, 145)

path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 3.0

path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 3.0

path: .spaces[0].metrics.loc.blank
old: 0.0
new: 6.0

path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 17.0

path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 23.0

path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 11.0

path: .spaces[0].metrics.mi.mi_original
old: null
new: 90.66469888978632

path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 53.02029174841304

path: .spaces[0].metrics.mi.mi_sei
old: null
new: 55.406119058186434

path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0

path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0

path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.5450401760300014

path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 256.75790004038475

path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 34.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 86.52224985768008

path: .spaces[0].metrics.halstead.length
old: 1.0
new: 56.0

path: .spaces[0].metrics.halstead.level
old: null
new: 0.1272727272727273

path: .spaces[0].metrics.halstead.time
old: 0.0
new: 112.07686112873938

path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 7.857142857142857

path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.05321953246698053

path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 24.0

path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 22.0

path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 2017.3835003173087

path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 14.0

path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 10.0

path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 2.0

path: .spaces[0].metrics.nexits.average
old: null
new: 2.0

path: .spaces[0].metrics.cognitive.average
old: null
new: 4.0

path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 4.0

path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 1.0

path: .spaces[0].metrics.nargs.average
old: null
new: 1.0

Code

nsresult nsMenuBarX::Create(Element* aContent) {
  NS_OBJC_BEGIN_TRY_ABORT_BLOCK;

  mContent = aContent;

  if (mContent) {
    AquifyMenuBar();

    nsresult rv = nsMenuGroupOwnerX::Create(aContent);
    if (NS_FAILED(rv)) {
      return rv;
    }

    RegisterForContentChanges(mContent, this);
    ConstructNativeMenus();
  } else {
    ConstructFallbackNativeMenus();
  }

  return NS_OK;

  NS_OBJC_END_TRY_ABORT_BLOCK;
}

Minimal test - lines (147, 154)

path: .spaces[1].metrics.halstead.n2
old: 60.0
new: 13.0

path: .spaces[1].metrics.halstead.N2
old: 97.0
new: 18.0

path: .spaces[1].metrics.halstead.bugs
old: 0.19766154323739116
new: 0.05565611151683271

path: .spaces[1].metrics.halstead.purity_ratio
old: 1.813149333659213
new: 1.8864986798366352

path: .spaces[1].metrics.halstead.vocabulary
old: 73.0
new: 26.0

path: .spaces[1].metrics.halstead.effort
old: 14439.932222183248
new: 2157.501830626761

path: .spaces[1].metrics.halstead.N1
old: 125.0
new: 33.0

path: .spaces[1].metrics.halstead.time
old: 802.2184567879582
new: 119.86121281259784

path: .spaces[1].metrics.halstead.estimated_program_length
old: 402.5191520723453
new: 96.2114326716684

path: .spaces[1].metrics.halstead.level
old: 0.09516256938937352
new: 0.1111111111111111

path: .spaces[1].metrics.halstead.length
old: 222.0
new: 51.0

path: .spaces[1].metrics.halstead.difficulty
old: 10.508333333333333
new: 9.0

path: .spaces[1].metrics.halstead.volume
old: 1374.141052071364
new: 239.72242562519568

path: .spaces[1].metrics.mi.mi_sei
old: 33.295242975520736
new: 80.60285045294052

path: .spaces[1].metrics.mi.mi_visual_studio
old: 36.433531945151564
new: 63.23376737741892

path: .spaces[1].metrics.mi.mi_original
old: 62.30133962620917
new: 108.12974221538636

path: .spaces[1].metrics.nexits.average
old: 1.0
new: 0.0

path: .spaces[1].metrics.nexits.sum
old: 1.0
new: 0.0

path: .spaces[1].metrics.cognitive.average
old: 0.0
new: 3.0

path: .spaces[1].metrics.cognitive.sum
old: 0.0
new: 3.0

path: .spaces[1].metrics.loc.cloc
old: 4.0
new: 0.0

path: .spaces[1].metrics.loc.ploc
old: 50.0
new: 8.0

path: .spaces[1].metrics.loc.sloc
old: 70.0
new: 8.0

path: .spaces[1].metrics.loc.lloc
old: 1.0
new: 3.0

path: .spaces[1].metrics.loc.blank
old: 16.0
new: 0.0

path: .spaces[1].metrics.cyclomatic.sum
old: 10.0
new: 3.0

path: .spaces[1].metrics.cyclomatic.average
old: 1.0
new: 3.0

Code

void nsMenuBarX::ConstructNativeMenus() {
  for (nsIContent* menuContent = mContent->GetFirstChild(); menuContent;
       menuContent = menuContent->GetNextSibling()) {
    if (menuContent->IsXULElement(nsGkAtoms::menu)) {
      InsertMenuAtIndex(MakeUnique(this, this, menuContent->AsElement()), GetMenuCount());
    }
  }
}