Global Metrics

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

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

path: .metrics.mi.mi_sei
old: 25.56045901679104
new: 52.66773010687334

path: .metrics.mi.mi_visual_studio
old: 29.183718035526553
new: 41.44141617816922

path: .metrics.mi.mi_original
old: 49.9041578407504
new: 70.86482166466936

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

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

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

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

path: .metrics.halstead.n1
old: 14.0
new: 17.0

path: .metrics.halstead.vocabulary
old: 101.0
new: 46.0

path: .metrics.halstead.N2
old: 244.0
new: 47.0

path: .metrics.halstead.volume
old: 3688.6491614444944
new: 668.3509966828985

path: .metrics.halstead.length
old: 554.0
new: 121.0

path: .metrics.halstead.difficulty
old: 19.632183908045977
new: 13.775862068965518

path: .metrics.halstead.bugs
old: 0.5791210990996427
new: 0.1464291930794259

path: .metrics.halstead.effort
old: 72416.2387097379
new: 9207.11114395924

path: .metrics.halstead.level
old: 0.050936768149882905
new: 0.07259073842302878

path: .metrics.halstead.N1
old: 310.0
new: 74.0

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

path: .metrics.halstead.estimated_program_length
old: 613.8390530476457
new: 210.36831715995532

path: .metrics.halstead.time
old: 4023.124372763216
new: 511.50617466440224

path: .metrics.halstead.purity_ratio
old: 1.1080127311329346
new: 1.73858113355335

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

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

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

path: .metrics.loc.sloc
old: 116.0
new: 52.0

path: .metrics.loc.lloc
old: 2.0
new: 13.0

path: .metrics.loc.blank
old: 17.0
new: 10.0

path: .metrics.loc.ploc
old: 81.0
new: 36.0

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

path: .metrics.cyclomatic.sum
old: 6.0
new: 10.0

Spaces Data

Minimal test - lines (14, 44)

path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 90.4030653691422
new: 47.3953090982014

path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 154.58924178123317
new: 81.0459785579244

path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 147.42610035996177
new: 41.83469851392482

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

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

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

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

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

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

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

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

path: .spaces[0].spaces[0].spaces[0].metrics.nexits.average
old: 0.0
new: 3.0

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

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 5.0
new: 65.0

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 3.0
new: 23.0

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 7.0
new: 40.0

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 22.458839376460833
new: 564.1243780580604

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.00421201861424495
new: 0.13935159844975378

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 2.495426597384537
new: 474.8728158290678

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 4.0
new: 17.0

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.5943609377704335
new: 1.6370640876468592

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 12.754887502163468
new: 173.52879329056708

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 8.0
new: 106.0

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 2.0
new: 15.152173913043478

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 44.91767875292167
new: 8547.71068492322

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 3.0
new: 41.0

path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.5
new: 0.06599713055954089

Code

int32_t WidgetUtilsGTK::IsTouchDeviceSupportPresent() {
  int32_t result = 0;
  GdkDisplay* display = gdk_display_get_default();
  if (!display) {
    return 0;
  }

  GdkDeviceManager* manager = gdk_display_get_device_manager(display);
  if (!manager) {
    return 0;
  }

  GList* devices =
      gdk_device_manager_list_devices(manager, GDK_DEVICE_TYPE_SLAVE);
  GList* list = devices;

  while (devices) {
    GdkDevice* device = static_cast(devices->data);
    if (gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN) {
      result = 1;
      break;
    }
    devices = devices->next;
  }

  if (list) {
    g_list_free(list);
  }

  return result;
}

Minimal test - lines (46, 48)

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 31.0
new: 9.0

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: 0.15384615384615383
new: 0.3333333333333333

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 16.0
new: 8.0

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

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 48.0
new: 17.509775004326936

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 806.0
new: 81.0

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 44.77777777777778
new: 4.5

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 8.0
new: 2.0

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 18.0
new: 7.0

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.02886924590605193
new: 0.006240251469155711

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 6.5
new: 3.0

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 13.0
new: 2.0

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.5483870967741935
new: 1.9455305560363263

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 124.0
new: 27.0

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

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

path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 72.07401591152724
new: 79.4351632867568

path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: 123.24656720871158
new: 135.83412922035413

path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_sei
old: 102.20817918598826
new: 120.36819247706724

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

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

Code

bool IsMainWindowTransparent() {
  return nsWindow::IsToplevelWindowTransparent();
}

Minimal test - lines (10, 52)

path: .spaces[0].metrics.halstead.volume
old: 3652.775497663865
new: 649.6723626178384

path: .spaces[0].metrics.halstead.bugs
old: 0.5795507922381712
new: 0.146392936884568

path: .spaces[0].metrics.halstead.vocabulary
old: 99.0
new: 44.0

path: .spaces[0].metrics.halstead.effort
old: 72496.85017128165
new: 9203.69180375271

path: .spaces[0].metrics.halstead.difficulty
old: 19.847058823529412
new: 14.166666666666666

path: .spaces[0].metrics.halstead.estimated_program_length
old: 598.101198480511
new: 197.8688308596694

path: .spaces[0].metrics.halstead.level
old: 0.05038529934795495
new: 0.07058823529411765

path: .spaces[0].metrics.halstead.length
old: 551.0
new: 119.0

path: .spaces[0].metrics.halstead.n2
old: 85.0
new: 27.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.085483118839403
new: 1.662763284535037

path: .spaces[0].metrics.halstead.n1
old: 14.0
new: 17.0

path: .spaces[0].metrics.halstead.N1
old: 310.0
new: 74.0

path: .spaces[0].metrics.halstead.N2
old: 241.0
new: 45.0

path: .spaces[0].metrics.halstead.time
old: 4027.602787293425
new: 511.316211319595

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

path: .spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 9.0

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

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

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

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

path: .spaces[0].metrics.mi.mi_original
old: 52.11052903744413
new: 74.32092359860965

path: .spaces[0].metrics.mi.mi_visual_studio
old: 30.47399358914861
new: 43.462528420239565

path: .spaces[0].metrics.mi.mi_sei
old: 24.233834220760293
new: 44.140865748129215

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

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

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

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

path: .spaces[0].metrics.loc.ploc
old: 77.0
new: 33.0

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

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

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

path: .spaces[0].metrics.loc.sloc
old: 103.0
new: 43.0

Code

namespace mozilla {

namespace widget {

int32_t WidgetUtilsGTK::IsTouchDeviceSupportPresent() {
  int32_t result = 0;
  GdkDisplay* display = gdk_display_get_default();
  if (!display) {
    return 0;
  }

  GdkDeviceManager* manager = gdk_display_get_device_manager(display);
  if (!manager) {
    return 0;
  }

  GList* devices =
      gdk_device_manager_list_devices(manager, GDK_DEVICE_TYPE_SLAVE);
  GList* list = devices;

  while (devices) {
    GdkDevice* device = static_cast(devices->data);
    if (gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN) {
      result = 1;
      break;
    }
    devices = devices->next;
  }

  if (list) {
    g_list_free(list);
  }

  return result;
}

bool IsMainWindowTransparent() {
  return nsWindow::IsToplevelWindowTransparent();
}

}  // namespace widget

}  // namespace mozilla

Minimal test - lines (12, 50)

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

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

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

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

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

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

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

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

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

path: .spaces[0].spaces[0].metrics.loc.ploc
old: 73.0
new: 31.0

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

path: .spaces[0].spaces[0].metrics.loc.sloc
old: 94.0
new: 39.0

path: .spaces[0].spaces[0].metrics.loc.blank
old: 11.0
new: 8.0

path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 31.678220504039167
new: 44.59210037227368

path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 27.059978783619584
new: 35.122798422755565

path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 54.16975706190698
new: 76.25249163658799

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

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

path: .spaces[0].spaces[0].metrics.halstead.time
old: 3739.680772610439
new: 507.3557545646461

path: .spaces[0].spaces[0].metrics.halstead.effort
old: 67314.2539069879
new: 9132.40358216363

path: .spaces[0].spaces[0].metrics.halstead.length
old: 520.0
new: 117.0

path: .spaces[0].spaces[0].metrics.halstead.N1
old: 292.0
new: 73.0

path: .spaces[0].spaces[0].metrics.halstead.volume
old: 3416.324916332093
new: 634.8729763001454

path: .spaces[0].spaces[0].metrics.halstead.N2
old: 228.0
new: 44.0

path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.5515904897124793
new: 0.14563602243075785

path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 566.830819142461
new: 191.69830097292416

path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 95.0
new: 43.0

path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 19.703703703703702
new: 14.384615384615383

path: .spaces[0].spaces[0].metrics.halstead.n2
old: 81.0
new: 26.0

path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.05075187969924813
new: 0.06951871657754011

path: .spaces[0].spaces[0].metrics.halstead.n1
old: 14.0
new: 17.0

path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.0900592675816558
new: 1.6384470168625995

Code

namespace widget {

int32_t WidgetUtilsGTK::IsTouchDeviceSupportPresent() {
  int32_t result = 0;
  GdkDisplay* display = gdk_display_get_default();
  if (!display) {
    return 0;
  }

  GdkDeviceManager* manager = gdk_display_get_device_manager(display);
  if (!manager) {
    return 0;
  }

  GList* devices =
      gdk_device_manager_list_devices(manager, GDK_DEVICE_TYPE_SLAVE);
  GList* list = devices;

  while (devices) {
    GdkDevice* device = static_cast(devices->data);
    if (gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN) {
      result = 1;
      break;
    }
    devices = devices->next;
  }

  if (list) {
    g_list_free(list);
  }

  return result;
}

bool IsMainWindowTransparent() {
  return nsWindow::IsToplevelWindowTransparent();
}

}  // namespace widget