# Global Metrics

path: .metrics.halstead.difficulty
old: 102.7420424403183
new: 26.92198581560284
path: .metrics.halstead.n1
old: 33.0
new: 26.0
path: .metrics.halstead.estimated_program_length
old: 7373.514223743401
new: 1128.8881733598982
path: .metrics.halstead.n2
old: 754.0
new: 141.0
path: .metrics.halstead.length
old: 11627.0
new: 690.0
path: .metrics.halstead.volume
old: 111854.29591117556
new: 5094.755961807095
path: .metrics.halstead.effort
old: 11492138.81763792
new: 137160.94773772862
path: .metrics.halstead.N2
old: 4695.0
new: 292.0
path: .metrics.halstead.purity_ratio
old: 0.6341716886336459
new: 1.6360698164636207
path: .metrics.halstead.time
old: 638452.15653544
new: 7620.052652096035
path: .metrics.halstead.bugs
old: 16.975112226259736
new: 0.8865414862176597
path: .metrics.halstead.level
old: 0.00973311388646852
new: 0.03714436248682824
path: .metrics.halstead.N1
old: 6932.0
new: 398.0
path: .metrics.halstead.vocabulary
old: 787.0
new: 167.0
path: .metrics.nexits.sum
old: 355.0
new: 10.0
path: .metrics.nexits.average
old: 2.4825174825174825
new: 1.1111111111111112
path: .metrics.cyclomatic.average
old: 3.006849315068493
new: 2.3333333333333335
path: .metrics.cyclomatic.sum
old: 439.0
new: 21.0
path: .metrics.nom.closures
old: 0.0
new: 1.0
path: .metrics.nom.functions
old: 143.0
new: 8.0
path: .metrics.nom.total
old: 143.0
new: 9.0
path: .metrics.cognitive.average
old: 2.2797202797202796
new: 1.2222222222222223
path: .metrics.cognitive.sum
old: 326.0
new: 11.0
path: .metrics.loc.sloc
old: 2680.0
new: 241.0
path: .metrics.loc.cloc
old: 195.0
new: 43.0
path: .metrics.loc.blank
old: 389.0
new: 46.0
path: .metrics.loc.lloc
old: 841.0
new: 68.0
path: .metrics.loc.ploc
old: 2096.0
new: 152.0
path: .metrics.mi.mi_sei
old: -181.37507507390436
new: 4.377696779930943
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 19.256877797333463
path: .metrics.mi.mi_original
old: -118.2956199354208
new: 32.92926103344023
path: .metrics.nargs.average
old: 1.167832167832168
new: 0.3333333333333333
path: .metrics.nargs.sum
old: 167.0
new: 3.0

# Spaces Data

## Minimal test - lines (104, 112)

path: .spaces[1].metrics.cognitive.sum
old: 3.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 3.0
new: 0.0
path: .spaces[1].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.sum
old: 4.0
new: 1.0
path: .spaces[1].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[1].metrics.loc.sloc
old: 24.0
new: 9.0
path: .spaces[1].metrics.loc.lloc
old: 9.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 21.0
new: 9.0
path: .spaces[1].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.4175215666497096
new: 1.7055085613960277
path: .spaces[1].metrics.halstead.time
old: 439.97231142322767
new: 34.4936447547737
path: .spaces[1].metrics.halstead.effort
old: 7919.5016056180975
new: 620.8856055859266
path: .spaces[1].metrics.halstead.difficulty
old: 13.695652173913045
new: 4.9
path: .spaces[1].metrics.halstead.estimated_program_length
old: 157.34489389811776
new: 52.87076540327685
path: .spaces[1].metrics.halstead.n1
old: 14.0
new: 7.0
path: .spaces[1].metrics.halstead.N1
old: 66.0
new: 17.0
path: .spaces[1].metrics.halstead.vocabulary
old: 37.0
new: 17.0
path: .spaces[1].metrics.halstead.level
old: 0.07301587301587302
new: 0.2040816326530612
path: .spaces[1].metrics.halstead.N2
old: 45.0
new: 14.0
path: .spaces[1].metrics.halstead.n2
old: 23.0
new: 10.0
path: .spaces[1].metrics.halstead.volume
old: 578.2493235848135
new: 126.71134807876052
path: .spaces[1].metrics.halstead.bugs
old: 0.13243739998322626
new: 0.02425975847967489
path: .spaces[1].metrics.halstead.length
old: 111.0
new: 31.0
path: .spaces[1].metrics.mi.mi_visual_studio
old: 50.0137434300304
new: 64.3257434315655
path: .spaces[1].metrics.mi.mi_original
old: 85.523501265352
new: 109.997021267977
path: .spaces[1].metrics.mi.mi_sei
old: 69.71350054828288
new: 83.09312496325994
path: .spaces[1].metrics.nexits.sum
old: 4.0
new: 0.0
path: .spaces[1].metrics.nexits.average
old: 4.0
new: 0.0

### Code

    nsAppShell::nsAppShell()
        : mAutoreleasePool(NULL),
          mDelegate(NULL),
          mCFRunLoop(NULL),
          mCFRunLoopSource(NULL),
          mTerminated(false),
          mNotifiedWillTerminate(false) {
      gAppShell = this;
    }

## Minimal test - lines (173, 183)

path: .spaces[5].metrics.cognitive.sum
old: 0.0
new: 1.0
path: .spaces[5].metrics.cognitive.average
old: 0.0
new: 1.0
path: .spaces[5].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[5].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[5].metrics.loc.cloc
old: 0.0
new: 3.0
path: .spaces[5].metrics.loc.sloc
old: 4.0
new: 11.0
path: .spaces[5].metrics.loc.lloc
old: 2.0
new: 6.0
path: .spaces[5].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[5].metrics.loc.ploc
old: 4.0
new: 7.0
path: .spaces[5].metrics.mi.mi_visual_studio
old: 73.32997499609597
new: 62.84765347781987
path: .spaces[5].metrics.mi.mi_original
old: 125.39425724332408
new: 107.46948744707196
path: .spaces[5].metrics.mi.mi_sei
old: 105.30664094829032
new: 115.72972472918087
path: .spaces[5].metrics.halstead.N1
old: 14.0
new: 18.0
path: .spaces[5].metrics.halstead.volume
old: 82.0447025077789
new: 105.48604608143
path: .spaces[5].metrics.halstead.N2
old: 7.0
new: 9.0
path: .spaces[5].metrics.halstead.length
old: 21.0
new: 27.0
path: .spaces[5].metrics.halstead.level
old: 0.25
new: 0.1944444444444444
path: .spaces[5].metrics.halstead.effort
old: 328.1788100311156
new: 542.4996655616401
path: .spaces[5].metrics.halstead.time
old: 18.232156112839753
new: 30.138870308980003
path: .spaces[5].metrics.halstead.bugs
old: 0.015859364080294203
new: 0.02217235015185297
path: .spaces[5].metrics.halstead.purity_ratio
old: 2.0786421168763445
new: 1.616721646459379
path: .spaces[5].metrics.halstead.difficulty
old: 4.0
new: 5.142857142857143

### Code

    void nsAppShell::WillTerminate() {
      mNotifiedWillTerminate = true;
      if (mTerminated) return;
      mTerminated = true;
      // We won't get another chance to process events
      NS_ProcessPendingEvents(NS_GetCurrentThread());

      // Unless we call nsBaseAppShell::Exit() here, it might not get called
      // at all.
      nsBaseAppShell::Exit();
    }

## Minimal test - lines (134, 156)

path: .spaces[3].metrics.halstead.level
old: 0.12307692307692308
new: 0.12121212121212122
path: .spaces[3].metrics.halstead.difficulty
old: 8.125
new: 8.25
path: .spaces[3].metrics.halstead.n2
old: 80.0
new: 24.0
path: .spaces[3].metrics.halstead.effort
old: 17692.511558304166
new: 3512.2765458530657
path: .spaces[3].metrics.halstead.length
old: 333.0
new: 83.0
path: .spaces[3].metrics.halstead.n1
old: 13.0
new: 11.0
path: .spaces[3].metrics.halstead.purity_ratio
old: 1.663243134915385
new: 1.7842511785821449
path: .spaces[3].metrics.halstead.N1
old: 233.0
new: 47.0
path: .spaces[3].metrics.halstead.volume
old: 2177.539884098974
new: 425.7304904064322
path: .spaces[3].metrics.halstead.estimated_program_length
old: 553.8599639268232
new: 148.09284782231802
path: .spaces[3].metrics.halstead.vocabulary
old: 93.0
new: 35.0
path: .spaces[3].metrics.halstead.bugs
old: 0.22632806162364424
new: 0.07702018326659027
path: .spaces[3].metrics.halstead.N2
old: 100.0
new: 36.0
path: .spaces[3].metrics.halstead.time
old: 982.917308794676
new: 195.12647476961476
path: .spaces[3].metrics.mi.mi_visual_studio
old: 34.49581100794109
new: 51.75157890695748
path: .spaces[3].metrics.mi.mi_original
old: 58.98783682357927
new: 88.49519993089729
path: .spaces[3].metrics.mi.mi_sei
old: 21.51275960964347
new: 78.61080140178302
path: .spaces[3].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[3].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[3].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[3].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[3].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[3].metrics.loc.ploc
old: 75.0
new: 14.0
path: .spaces[3].metrics.loc.cloc
old: 2.0
new: 3.0
path: .spaces[3].metrics.loc.sloc
old: 83.0
new: 23.0
path: .spaces[3].metrics.loc.lloc
old: 0.0
new: 9.0

### Code

    nsresult nsAppShell::Init() {
      mAutoreleasePool = [[NSAutoreleasePool alloc] init];

      // Add a CFRunLoopSource to the main native run loop.  The source is
      // responsible for interrupting the run loop when Gecko events are ready.

      mCFRunLoop = [[NSRunLoop currentRunLoop] getCFRunLoop];
      NS_ENSURE_STATE(mCFRunLoop);
      ::CFRetain(mCFRunLoop);

      CFRunLoopSourceContext context;
      bzero(&context, sizeof(context));
      // context.version = 0;
      context.info = this;
      context.perform = ProcessGeckoEvents;

      mCFRunLoopSource = ::CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &context);
      NS_ENSURE_STATE(mCFRunLoopSource);

      ::CFRunLoopAddSource(mCFRunLoop, mCFRunLoopSource, kCFRunLoopCommonModes);

      return nsBaseAppShell::Init();
    }

## Minimal test - lines (188, 196)

path: .spaces[6].metrics.halstead.purity_ratio
old: 1.543715149046361
new: 1.7088247351654982
path: .spaces[6].metrics.halstead.difficulty
old: 7.222222222222222
new: 3.5
path: .spaces[6].metrics.halstead.n1
old: 10.0
new: 7.0
path: .spaces[6].metrics.halstead.estimated_program_length
old: 61.74860596185444
new: 39.302968908806456
path: .spaces[6].metrics.halstead.level
old: 0.13846153846153847
new: 0.2857142857142857
path: .spaces[6].metrics.halstead.vocabulary
old: 19.0
new: 14.0
path: .spaces[6].metrics.halstead.effort
old: 1227.179059439258
new: 306.4920712256371
path: .spaces[6].metrics.halstead.time
old: 68.17661441329211
new: 17.027337290313174
path: .spaces[6].metrics.halstead.length
old: 40.0
new: 23.0
path: .spaces[6].metrics.halstead.bugs
old: 0.038207683056268336
new: 0.015152754069314303
path: .spaces[6].metrics.halstead.N2
old: 13.0
new: 7.0
path: .spaces[6].metrics.halstead.N1
old: 27.0
new: 16.0
path: .spaces[6].metrics.halstead.n2
old: 9.0
new: 7.0
path: .spaces[6].metrics.halstead.volume
old: 169.9171005377434
new: 87.56916320732489
path: .spaces[6].metrics.mi.mi_sei
old: 80.6620413124209
new: 110.3225319107998
path: .spaces[6].metrics.mi.mi_visual_studio
old: 63.29903294808261
new: 65.31481372786824
path: .spaces[6].metrics.mi.mi_original
old: 108.24134634122127
new: 111.6883314746547
path: .spaces[6].metrics.nexits.sum
old: 2.0
new: 1.0
path: .spaces[6].metrics.nexits.average
old: 2.0
new: 1.0
path: .spaces[6].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[6].metrics.loc.blank
old: 1.0
new: 2.0
path: .spaces[6].metrics.loc.ploc
old: 8.0
new: 6.0

### Code

    void nsAppShell::ScheduleNativeEventCallback() {
      if (mTerminated) return;

      NS_ADDREF_THIS();

      // This will invoke ProcessGeckoEvents on the main thread.
      ::CFRunLoopSourceSignal(mCFRunLoopSource);
      ::CFRunLoopWakeUp(mCFRunLoop);
    }

## Minimal test - lines (97, 102)

path: .spaces[0].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[0].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.loc.lloc
old: 3.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 10.0
new: 6.0
path: .spaces[0].metrics.loc.ploc
old: 8.0
new: 3.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.cloc
old: 2.0
new: 1.0
path: .spaces[0].metrics.mi.mi_sei
old: 109.77055812537506
new: 131.1530250665717
path: .spaces[0].metrics.mi.mi_visual_studio
old: 62.15312133202236
new: 71.82614081290335
path: .spaces[0].metrics.mi.mi_original
old: 106.28183747775824
new: 122.82270079006472
path: .spaces[0].metrics.halstead.bugs
old: 0.04570181188069797
new: 0.009500334461331307
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.9059707739381877
new: 1.6887218755408668
path: .spaces[0].metrics.halstead.N2
old: 15.0
new: 4.0
path: .spaces[0].metrics.halstead.N1
old: 25.0
new: 8.0
path: .spaces[0].metrics.halstead.vocabulary
old: 22.0
new: 9.0
path: .spaces[0].metrics.halstead.time
old: 89.18863237274594
new: 8.4531333371795
path: .spaces[0].metrics.halstead.estimated_program_length
old: 76.2388309575275
new: 20.264662506490403
path: .spaces[0].metrics.halstead.length
old: 40.0
new: 12.0
path: .spaces[0].metrics.halstead.difficulty
old: 9.0
new: 4.0
path: .spaces[0].metrics.halstead.n1
old: 12.0
new: 6.0
path: .spaces[0].metrics.halstead.level
old: 0.1111111111111111
new: 0.25
path: .spaces[0].metrics.halstead.effort
old: 1605.395382709427
new: 152.15640006923098
path: .spaces[0].metrics.halstead.volume
old: 178.37726474549189
new: 38.039100017307746
path: .spaces[0].metrics.halstead.n2
old: 10.0
new: 3.0

### Code

    @end

    // nsAppShell implementation

    NS_IMETHODIMP
    nsAppShell::ResumeNative(void) { return nsBaseAppShell::ResumeNative(); }

## Minimal test - lines (114, 129)

path: .spaces[2].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[2].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[2].metrics.loc.sloc
old: 5.0
new: 16.0
path: .spaces[2].metrics.loc.blank
old: 0.0
new: 2.0
path: .spaces[2].metrics.loc.ploc
old: 5.0
new: 14.0
path: .spaces[2].metrics.loc.lloc
old: 2.0
new: 9.0
path: .spaces[2].metrics.cognitive.average
old: 0.0
new: 4.0
path: .spaces[2].metrics.cognitive.sum
old: 0.0
new: 4.0
path: .spaces[2].metrics.halstead.length
old: 29.0
new: 48.0
path: .spaces[2].metrics.halstead.effort
old: 543.1222972575118
new: 1651.5942172268658
path: .spaces[2].metrics.halstead.n2
old: 12.0
new: 10.0
path: .spaces[2].metrics.halstead.time
old: 30.173460958750656
new: 91.75523429038144
path: .spaces[2].metrics.halstead.purity_ratio
old: 2.3110189658156512
new: 1.2864292908719674
path: .spaces[2].metrics.halstead.N2
old: 13.0
new: 18.0
path: .spaces[2].metrics.halstead.n1
old: 8.0
new: 9.0
path: .spaces[2].metrics.halstead.N1
old: 16.0
new: 30.0
path: .spaces[2].metrics.halstead.difficulty
old: 4.333333333333333
new: 8.1
path: .spaces[2].metrics.halstead.level
old: 0.2307692307692308
new: 0.1234567901234568
path: .spaces[2].metrics.halstead.estimated_program_length
old: 67.01955000865388
new: 61.74860596185444
path: .spaces[2].metrics.halstead.bugs
old: 0.022189311844147783
new: 0.04657444063625482
path: .spaces[2].metrics.halstead.vocabulary
old: 20.0
new: 19.0
path: .spaces[2].metrics.halstead.volume
old: 125.33591475173353
new: 203.9005206452921
path: .spaces[2].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[2].metrics.nargs.average
old: 3.0
new: 0.0
path: .spaces[2].metrics.mi.mi_sei
old: 96.91255332478111
new: 65.38704742545063
path: .spaces[2].metrics.mi.mi_visual_studio
old: 69.92743805480441
new: 57.02478075933044
path: .spaces[2].metrics.mi.mi_original
old: 119.57591907371554
new: 97.51237509845504
path: .spaces[2].metrics.cyclomatic.sum
old: 1.0
new: 4.0
path: .spaces[2].metrics.cyclomatic.average
old: 1.0
new: 4.0

### Code

    nsAppShell::~nsAppShell() {
      if (mAutoreleasePool) {
        [mAutoreleasePool release];
        mAutoreleasePool = NULL;
      }

      if (mCFRunLoop) {
        if (mCFRunLoopSource) {
          ::CFRunLoopRemoveSource(mCFRunLoop, mCFRunLoopSource, kCFRunLoopCommonModes);
          ::CFRelease(mCFRunLoopSource);
        }
        ::CFRelease(mCFRunLoop);
      }

      gAppShell = NULL;
    }

## Minimal test - lines (164, 168)

path: .spaces[4].metrics.nexits.average
old: 2.0
new: 0.0
path: .spaces[4].metrics.nexits.sum
old: 2.0
new: 0.0
path: .spaces[4].metrics.halstead.purity_ratio
old: 1.783659166810898
new: 1.762358846775895
path: .spaces[4].metrics.halstead.N2
old: 26.0
new: 11.0
path: .spaces[4].metrics.halstead.vocabulary
old: 28.0
new: 17.0
path: .spaces[4].metrics.halstead.estimated_program_length
old: 107.01955000865388
new: 52.87076540327685
path: .spaces[4].metrics.halstead.difficulty
old: 9.75
new: 7.857142857142857
path: .spaces[4].metrics.halstead.effort
old: 2812.3026294036986
new: 963.4733840090084
path: .spaces[4].metrics.halstead.N1
old: 34.0
new: 19.0
path: .spaces[4].metrics.halstead.n2
old: 16.0
new: 7.0
path: .spaces[4].metrics.halstead.time
old: 156.23903496687214
new: 53.52629911161158
path: .spaces[4].metrics.halstead.length
old: 60.0
new: 30.0
path: .spaces[4].metrics.halstead.volume
old: 288.44129532345625
new: 122.62388523751017
path: .spaces[4].metrics.halstead.level
old: 0.10256410256410256
new: 0.1272727272727273
path: .spaces[4].metrics.halstead.bugs
old: 0.06641305331452593
new: 0.032516607325800174
path: .spaces[4].metrics.halstead.n1
old: 12.0
new: 10.0
path: .spaces[4].metrics.mi.mi_visual_studio
old: 58.96441873843656
new: 69.99396041992449
path: .spaces[4].metrics.mi.mi_sei
old: 69.96851112665719
new: 97.07666456629758
path: .spaces[4].metrics.mi.mi_original
old: 100.82915604272652
new: 119.68967231807088
path: .spaces[4].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[4].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[4].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[4].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[4].metrics.nargs.sum
old: 3.0
new: 1.0
path: .spaces[4].metrics.nargs.average
old: 3.0
new: 1.0
path: .spaces[4].metrics.loc.ploc
old: 10.0
new: 5.0
path: .spaces[4].metrics.loc.blank
old: 2.0
new: 0.0
path: .spaces[4].metrics.loc.sloc
old: 12.0
new: 5.0
path: .spaces[4].metrics.loc.lloc
old: 3.0
new: 2.0

### Code

    void nsAppShell::ProcessGeckoEvents(void* aInfo) {
      nsAppShell* self = static_cast(aInfo);
      self->NativeEventCallback();
      self->Release();
    }

## Minimal test - lines (201, 241)

path: .spaces[7].metrics.mi.mi_sei
old: 80.6620413124209
new: 55.04022647980808
path: .spaces[7].metrics.mi.mi_visual_studio
old: 63.29903294808261
new: 43.27799452243599
path: .spaces[7].metrics.mi.mi_original
old: 108.24134634122127
new: 74.00537063336554
path: .spaces[7].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[7].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[7].metrics.nexits.average
old: 2.0
new: 5.0
path: .spaces[7].metrics.nexits.sum
old: 2.0
new: 5.0
path: .spaces[7].metrics.cyclomatic.sum
old: 2.0
new: 7.0
path: .spaces[7].metrics.cyclomatic.average
old: 2.0
new: 7.0
path: .spaces[7].metrics.cognitive.average
old: 1.0
new: 5.0
path: .spaces[7].metrics.cognitive.sum
old: 1.0
new: 5.0
path: .spaces[7].metrics.loc.ploc
old: 8.0
new: 30.0
path: .spaces[7].metrics.loc.sloc
old: 9.0
new: 41.0
path: .spaces[7].metrics.loc.cloc
old: 0.0
new: 4.0
path: .spaces[7].metrics.loc.blank
old: 1.0
new: 7.0
path: .spaces[7].metrics.loc.lloc
old: 5.0
new: 15.0
path: .spaces[7].metrics.halstead.N2
old: 13.0
new: 64.0
path: .spaces[7].metrics.halstead.estimated_program_length
old: 61.74860596185444
new: 235.95187424008475
path: .spaces[7].metrics.halstead.length
old: 40.0
new: 155.0
path: .spaces[7].metrics.halstead.n1
old: 10.0
new: 17.0
path: .spaces[7].metrics.halstead.purity_ratio
old: 1.543715149046361
new: 1.5222701563876435
path: .spaces[7].metrics.halstead.bugs
old: 0.038207683056268336
new: 0.1974878931293048
path: .spaces[7].metrics.halstead.n2
old: 9.0
new: 33.0
path: .spaces[7].metrics.halstead.effort
old: 1227.179059439258
new: 14420.907694600144
path: .spaces[7].metrics.halstead.N1
old: 27.0
new: 91.0
path: .spaces[7].metrics.halstead.volume
old: 169.9171005377434
new: 874.7977094150823
path: .spaces[7].metrics.halstead.level
old: 0.13846153846153847
new: 0.06066176470588235
path: .spaces[7].metrics.halstead.vocabulary
old: 19.0
new: 50.0
path: .spaces[7].metrics.halstead.time
old: 68.17661441329211
new: 801.1615385888969
path: .spaces[7].metrics.halstead.difficulty
old: 7.222222222222222
new: 16.484848484848484

### Code

    bool nsAppShell::ProcessNextNativeEvent(bool aMayWait) {
      if (mTerminated) return false;

      NSString* currentMode = nil;
      NSDate* waitUntil = nil;
      if (aMayWait) waitUntil = [NSDate distantFuture];
      NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop];

      BOOL eventProcessed = NO;
      do {
        currentMode = [currentRunLoop currentMode];
        if (!currentMode) currentMode = NSDefaultRunLoopMode;

        if (aMayWait)
          eventProcessed = [currentRunLoop runMode:currentMode beforeDate:waitUntil];
        else
          [currentRunLoop acceptInputForMode:currentMode beforeDate:waitUntil];
      } while (eventProcessed && aMayWait);

      return false;
    }

    // Run
    //
    // public
    NS_IMETHODIMP
    nsAppShell::Run(void) {
      ALOG("nsAppShell::Run");
      char argv[1][4] = {"app"};
      UIApplicationMain(1, (char**)argv, nil, @"AppShellDelegate");
      // UIApplicationMain doesn't exit. :-(
      return NS_OK;
    }

    NS_IMETHODIMP
    nsAppShell::Exit(void) {
      if (mTerminated) return NS_OK;

      mTerminated = true;
      return nsBaseAppShell::Exit();
    }