Global Metrics

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

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

path: .metrics.loc.lloc
old: 593.0
new: 8.0

path: .metrics.loc.sloc
old: 993.0
new: 33.0

path: .metrics.loc.cloc
old: 78.0
new: 5.0

path: .metrics.loc.ploc
old: 800.0
new: 24.0

path: .metrics.loc.blank
old: 115.0
new: 4.0

path: .metrics.mi.mi_sei
old: -61.25186313006695
new: 69.23696821804336

path: .metrics.mi.mi_original
old: -8.304720949391026
new: 80.45497244135372

path: .metrics.mi.mi_visual_studio
old: 0.0
new: 47.04969148617177

path: .metrics.nargs.sum
old: 30.0
new: 2.0

path: .metrics.nargs.average
old: 1.0344827586206895
new: 0.6666666666666666

path: .metrics.cyclomatic.sum
old: 53.0
new: 5.0

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

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

path: .metrics.nom.total
old: 29.0
new: 3.0

path: .metrics.nom.functions
old: 15.0
new: 3.0

path: .metrics.halstead.vocabulary
old: 108.0
new: 45.0

path: .metrics.halstead.purity_ratio
old: 0.1056611767590148
new: 2.0695095844313087

path: .metrics.halstead.N2
old: 2662.0
new: 42.0

path: .metrics.halstead.N1
old: 3516.0
new: 57.0

path: .metrics.halstead.effort
old: 13407386.282986384
new: 6299.344875734838

path: .metrics.halstead.bugs
old: 18.81228256596892
new: 0.11369525387122124

path: .metrics.halstead.time
old: 744854.7934992436
new: 349.963604207491

path: .metrics.halstead.length
old: 6178.0
new: 99.0

path: .metrics.halstead.difficulty
old: 321.2758620689655
new: 11.586206896551724

path: .metrics.halstead.n1
old: 21.0
new: 16.0

path: .metrics.halstead.level
old: 0.0031125898894493937
new: 0.08630952380952381

path: .metrics.halstead.n2
old: 87.0
new: 29.0

path: .metrics.halstead.volume
old: 41731.6949883659
new: 543.6934565366378

path: .metrics.halstead.estimated_program_length
old: 652.7747500171934
new: 204.88144885869957

path: .metrics.nexits.average
old: 0.4827586206896552
new: 0.6666666666666666

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

Spaces Data

Minimal test - lines (9, 16)

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

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

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

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

path: .spaces[0].metrics.mi.mi_sei
old: 8.313543018137736
new: 116.715423221568

path: .spaces[0].metrics.mi.mi_visual_studio
old: 33.89007978587749
new: 67.35907848608319

path: .spaces[0].metrics.mi.mi_original
old: 57.95203643385051
new: 115.18402421120226

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

path: .spaces[0].metrics.cognitive.average
old: 2.0
new: 0.0

path: .spaces[0].metrics.halstead.N2
old: 232.0
new: 8.0

path: .spaces[0].metrics.halstead.time
old: 7617.110073376364
new: 10.242750002060443

path: .spaces[0].metrics.halstead.effort
old: 137107.98132077456
new: 184.369500037088

path: .spaces[0].metrics.halstead.length
old: 534.0
new: 18.0

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

path: .spaces[0].metrics.halstead.level
old: 0.022413793103448276
new: 0.35

path: .spaces[0].metrics.halstead.volume
old: 3073.109926155292
new: 64.5293250129808

path: .spaces[0].metrics.halstead.N1
old: 302.0
new: 10.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 264.7340454697555
new: 31.26112492884004

path: .spaces[0].metrics.halstead.bugs
old: 0.8863132387975455
new: 0.010797870897332045

path: .spaces[0].metrics.halstead.vocabulary
old: 54.0
new: 12.0

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

path: .spaces[0].metrics.halstead.difficulty
old: 44.61538461538461
new: 2.857142857142857

path: .spaces[0].metrics.halstead.purity_ratio
old: 0.4957566394564709
new: 1.7367291627133357

path: .spaces[0].metrics.loc.sloc
old: 77.0
new: 8.0

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

path: .spaces[0].metrics.loc.lloc
old: 57.0
new: 2.0

path: .spaces[0].metrics.loc.ploc
old: 68.0
new: 7.0

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

Code

class nsPrintSettingsAndroid : public nsPrintSettings {
 public:
  nsPrintSettingsAndroid() {
    // The aim here is to set up the objects enough that silent printing works
    SetOutputFormat(nsIPrintSettings::kOutputFormatPDF);
    SetPrinterName(u"PDF printer"_ns);
  }
};

Minimal test - lines (18, 26)

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

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

path: .spaces[1].metrics.mi.mi_sei
old: 8.501961794524703
new: 79.43564721672983

path: .spaces[1].metrics.mi.mi_original
old: 58.082638377467674
new: 107.4618508800089

path: .spaces[1].metrics.mi.mi_visual_studio
old: 33.966455191501566
new: 62.84318764912801

path: .spaces[1].metrics.nargs.average
old: 2.0
new: 1.0

path: .spaces[1].metrics.nargs.sum
old: 2.0
new: 1.0

path: .spaces[1].metrics.cyclomatic.sum
old: 4.0
new: 1.0

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

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

path: .spaces[1].metrics.loc.ploc
old: 68.0
new: 9.0

path: .spaces[1].metrics.loc.lloc
old: 57.0
new: 4.0

path: .spaces[1].metrics.loc.sloc
old: 77.0
new: 9.0

path: .spaces[1].metrics.halstead.bugs
old: 0.9367992218341524
new: 0.04023962538837979

path: .spaces[1].metrics.halstead.length
old: 531.0
new: 45.0

path: .spaces[1].metrics.halstead.level
old: 0.020114942528735632
new: 0.15555555555555556

path: .spaces[1].metrics.halstead.difficulty
old: 49.714285714285715
new: 6.428571428571429

path: .spaces[1].metrics.halstead.time
old: 8277.118234889618
new: 73.68689733301859

path: .spaces[1].metrics.halstead.n2
old: 35.0
new: 14.0

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

path: .spaces[1].metrics.halstead.N1
old: 299.0
new: 27.0

path: .spaces[1].metrics.halstead.volume
old: 2996.887636770379
new: 206.32331253245204

path: .spaces[1].metrics.halstead.purity_ratio
old: 0.4484524755691179
new: 1.9227166635040016

path: .spaces[1].metrics.halstead.n1
old: 15.0
new: 10.0

path: .spaces[1].metrics.halstead.vocabulary
old: 50.0
new: 24.0

path: .spaces[1].metrics.halstead.effort
old: 148988.1282280131
new: 1326.3641519943346

path: .spaces[1].metrics.halstead.estimated_program_length
old: 238.1282645272016
new: 86.52224985768008

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

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

Code

nsresult nsPrintSettingsServiceAndroid::_CreatePrintSettings(
    nsIPrintSettings** _retval) {
  nsPrintSettings* printSettings = new nsPrintSettingsAndroid();
  NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
  NS_ADDREF(*_retval = printSettings);
  (void)InitPrintSettingsFromPrefs(*_retval, false,
                                   nsIPrintSettings::kInitSaveAll);
  return NS_OK;
}

Minimal test - lines (28, 33)

path: .spaces[2].metrics.halstead.effort
old: 269236.56644501246
new: 1139.9376129263674

path: .spaces[2].metrics.halstead.n1
old: 14.0
new: 12.0

path: .spaces[2].metrics.halstead.time
old: 14957.587024722914
new: 63.329867384798185

path: .spaces[2].metrics.halstead.vocabulary
old: 49.0
new: 23.0

path: .spaces[2].metrics.halstead.purity_ratio
old: 0.31463226284037876
new: 2.4567666004140647

path: .spaces[2].metrics.halstead.difficulty
old: 64.8
new: 7.636363636363637

path: .spaces[2].metrics.halstead.estimated_program_length
old: 232.82787450188027
new: 81.07329781366414

path: .spaces[2].metrics.halstead.n2
old: 35.0
new: 11.0

path: .spaces[2].metrics.halstead.N1
old: 416.0
new: 19.0

path: .spaces[2].metrics.halstead.volume
old: 4154.885284645255
new: 149.27754454988144

path: .spaces[2].metrics.halstead.level
old: 0.0154320987654321
new: 0.13095238095238096

path: .spaces[2].metrics.halstead.bugs
old: 1.389850563654064
new: 0.03637470398504856

path: .spaces[2].metrics.halstead.length
old: 740.0
new: 33.0

path: .spaces[2].metrics.halstead.N2
old: 324.0
new: 14.0

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

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

path: .spaces[2].metrics.cyclomatic.average
old: 5.0
new: 1.0

path: .spaces[2].metrics.cyclomatic.sum
old: 5.0
new: 1.0

path: .spaces[2].metrics.nargs.sum
old: 2.0
new: 1.0

path: .spaces[2].metrics.nargs.average
old: 2.0
new: 1.0

path: .spaces[2].metrics.loc.blank
old: 12.0
new: 0.0

path: .spaces[2].metrics.loc.sloc
old: 103.0
new: 6.0

path: .spaces[2].metrics.loc.cloc
old: 2.0
new: 0.0

path: .spaces[2].metrics.loc.lloc
old: 78.0
new: 2.0

path: .spaces[2].metrics.loc.ploc
old: 89.0
new: 6.0

path: .spaces[2].metrics.mi.mi_visual_studio
old: 30.082328585675892
new: 67.66859573048092

path: .spaces[2].metrics.mi.mi_original
old: 51.44078188150577
new: 115.71329869912236

path: .spaces[2].metrics.mi.mi_sei
old: 9.731709911135315
new: 91.33997006551888

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

path: .spaces[2].metrics.cognitive.average
old: 4.0
new: 0.0

Code

already_AddRefed CreatePlatformPrintSettings(
    const mozilla::PrintSettingsInitializer& aSettings) {
  RefPtr settings = new nsPrintSettingsAndroid();
  settings->InitWithInitializer(aSettings);
  return settings.forget();
}