Global Metrics

path: .metrics.nom.functions
old: 7.0
new: 2.0

path: .metrics.nom.total
old: 7.0
new: 2.0

path: .metrics.nargs.average
old: 0.42857142857142855
new: 2.0

path: .metrics.nargs.sum
old: 3.0
new: 4.0

path: .metrics.cyclomatic.sum
old: 14.0
new: 4.0

path: .metrics.nexits.sum
old: 4.0
new: 2.0

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

path: .metrics.halstead.time
old: 990.016192377189
new: 55.84768228225812

path: .metrics.halstead.N1
old: 165.0
new: 26.0

path: .metrics.halstead.level
old: 0.08787878787878789
new: 0.2125

path: .metrics.halstead.effort
old: 17820.291462789402
new: 1005.2582810806462

path: .metrics.halstead.difficulty
old: 11.379310344827584
new: 4.705882352941177

path: .metrics.halstead.volume
old: 1566.0256133966443
new: 213.6173847296373

path: .metrics.halstead.bugs
old: 0.22741648737824857
new: 0.03345008185697686

path: .metrics.halstead.N2
old: 88.0
new: 20.0

path: .metrics.halstead.estimated_program_length
old: 398.3662566515269
new: 93.48686830125575

path: .metrics.halstead.n2
old: 58.0
new: 17.0

path: .metrics.halstead.n1
old: 15.0
new: 8.0

path: .metrics.halstead.length
old: 253.0
new: 46.0

path: .metrics.halstead.vocabulary
old: 73.0
new: 25.0

path: .metrics.halstead.purity_ratio
old: 1.574570184393387
new: 2.0323232239403426

path: .metrics.mi.mi_sei
old: 38.83103091517061
new: 89.01520384920072

path: .metrics.mi.mi_original
old: 53.97954626714606
new: 90.04044187375452

path: .metrics.mi.mi_visual_studio
old: 31.566986121138047
new: 52.65522916593832

path: .metrics.loc.cloc
old: 27.0
new: 6.0

path: .metrics.loc.blank
old: 16.0
new: 5.0

path: .metrics.loc.sloc
old: 106.0
new: 25.0

path: .metrics.loc.ploc
old: 63.0
new: 14.0

Spaces Data

Minimal test - lines (14, 17)

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

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

path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.42857142857142855
new: 3.0

path: .spaces[0].spaces[0].metrics.halstead.n1
old: 15.0
new: 8.0

path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.2239261891797808
new: 0.02198948410727374

path: .spaces[0].spaces[0].metrics.halstead.length
old: 248.0
new: 24.0

path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.0873015873015873
new: 0.175

path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.5184602547499355
new: 1.8188118522668013

path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 70.0
new: 15.0

path: .spaces[0].spaces[0].metrics.halstead.volume
old: 1520.0621882023518
new: 93.76537429460444

path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 11.454545454545457
new: 5.714285714285714

path: .spaces[0].spaces[0].metrics.halstead.N2
old: 84.0
new: 10.0

path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 376.5781431779841
new: 43.65148445440323

path: .spaces[0].spaces[0].metrics.halstead.n2
old: 55.0
new: 7.0

path: .spaces[0].spaces[0].metrics.halstead.N1
old: 164.0
new: 14.0

path: .spaces[0].spaces[0].metrics.halstead.time
old: 967.3123015833148
new: 29.766785490350617

path: .spaces[0].spaces[0].metrics.halstead.effort
old: 17411.621428499668
new: 535.8021388263111

path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.5714285714285714
new: 1.0

path: .spaces[0].spaces[0].metrics.nexits.sum
old: 4.0
new: 1.0

path: .spaces[0].spaces[0].metrics.loc.cloc
old: 15.0
new: 0.0

path: .spaces[0].spaces[0].metrics.loc.ploc
old: 55.0
new: 4.0

path: .spaces[0].spaces[0].metrics.loc.lloc
old: 4.0
new: 1.0

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

path: .spaces[0].spaces[0].metrics.loc.sloc
old: 85.0
new: 4.0

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

path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 39.73512153301396
new: 104.30488654298986

path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 34.01825480007363
new: 72.92391462086348

path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 58.1712157081259
new: 124.69989400167655

Code

GenericFactory::CreateInstance(nsISupports* aOuter, REFNSIID aIID,
                               void** aResult) {
  return mCtor(aOuter, aIID, aResult);
}

Minimal test - lines (9, 25)

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

path: .spaces[0].metrics.nargs.sum
old: 3.0
new: 4.0

path: .spaces[0].metrics.nargs.average
old: 0.42857142857142855
new: 2.0

path: .spaces[0].metrics.mi.mi_original
old: 57.5053547015069
new: 96.69883285914494

path: .spaces[0].metrics.mi.mi_visual_studio
old: 33.62886239854205
new: 56.54902506382746

path: .spaces[0].metrics.mi.mi_sei
old: 39.41341633251208
new: 64.1115342118398

path: .spaces[0].metrics.loc.cloc
old: 16.0
new: 0.0

path: .spaces[0].metrics.loc.blank
old: 14.0
new: 4.0

path: .spaces[0].metrics.loc.ploc
old: 57.0
new: 13.0

path: .spaces[0].metrics.loc.sloc
old: 87.0
new: 17.0

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

path: .spaces[0].metrics.nexits.average
old: 0.5714285714285714
new: 1.0

path: .spaces[0].metrics.halstead.N2
old: 85.0
new: 19.0

path: .spaces[0].metrics.halstead.time
old: 972.3372491776375
new: 54.44642969606373

path: .spaces[0].metrics.halstead.length
old: 250.0
new: 45.0

path: .spaces[0].metrics.halstead.n1
old: 15.0
new: 8.0

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

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.5352609382774145
new: 1.9555555555555555

path: .spaces[0].metrics.halstead.difficulty
old: 11.383928571428571
new: 4.75

path: .spaces[0].metrics.halstead.volume
old: 1537.4367798761705
new: 206.32331253245204

path: .spaces[0].metrics.halstead.bugs
old: 0.22470101333395537
new: 0.032888193544466364

path: .spaces[0].metrics.halstead.N1
old: 165.0
new: 26.0

path: .spaces[0].metrics.halstead.effort
old: 17502.070485197477
new: 980.0357345291472

path: .spaces[0].metrics.halstead.estimated_program_length
old: 383.8152345693536
new: 88.0

path: .spaces[0].metrics.halstead.level
old: 0.08784313725490196
new: 0.21052631578947367

path: .spaces[0].metrics.halstead.n2
old: 56.0
new: 16.0

path: .spaces[0].metrics.nom.functions
old: 7.0
new: 2.0

path: .spaces[0].metrics.nom.total
old: 7.0
new: 2.0

Code

namespace mozilla {

NS_IMPL_ISUPPORTS(GenericFactory, nsIFactory)

NS_IMETHODIMP
GenericFactory::CreateInstance(nsISupports* aOuter, REFNSIID aIID,
                               void** aResult) {
  return mCtor(aOuter, aIID, aResult);
}

NS_IMETHODIMP
GenericFactory::LockFactory(bool aLock) {
  NS_ERROR("Vestigial method, never called!");
  return NS_ERROR_FAILURE;
}

}  // namespace mozilla