# Global Metrics

path: .metrics.cyclomatic.sum
old: 41.0
new: 24.0
path: .metrics.cyclomatic.average
old: 2.5625
new: 1.411764705882353
path: .metrics.halstead.n2
old: 158.0
new: 93.0
path: .metrics.halstead.vocabulary
old: 186.0
new: 116.0
path: .metrics.halstead.bugs
old: 1.8389044268058328
new: 1.064471260309077
path: .metrics.halstead.volume
old: 9031.91225570742
new: 4800.5866965893
path: .metrics.halstead.N1
old: 686.0
new: 396.0
path: .metrics.halstead.length
old: 1198.0
new: 700.0
path: .metrics.halstead.estimated_program_length
old: 1288.6032960295952
new: 712.1836944223581
path: .metrics.halstead.time
old: 22763.97575559451
new: 10025.59802346248
path: .metrics.halstead.effort
old: 409751.5636007012
new: 180460.76442232463
path: .metrics.halstead.difficulty
old: 45.36708860759494
new: 37.59139784946237
path: .metrics.halstead.n1
old: 28.0
new: 23.0
path: .metrics.halstead.purity_ratio
old: 1.0756287946824667
new: 1.017405277746226
path: .metrics.halstead.level
old: 0.022042410714285716
new: 0.02660183066361556
path: .metrics.halstead.N2
old: 512.0
new: 304.0
path: .metrics.nexits.sum
old: 5.0
new: 11.0
path: .metrics.nexits.average
old: 0.4166666666666667
new: 0.7857142857142857
path: .metrics.nom.total
old: 12.0
new: 14.0
path: .metrics.nom.functions
old: 12.0
new: 14.0
path: .metrics.nargs.average
old: 4.333333333333333
new: 0.14285714285714285
path: .metrics.nargs.sum
old: 52.0
new: 2.0
path: .metrics.cognitive.sum
old: 27.0
new: 4.0
path: .metrics.cognitive.average
old: 2.25
new: 0.2857142857142857
path: .metrics.mi.mi_visual_studio
old: 12.22894177205036
new: 22.22972146352721
path: .metrics.mi.mi_original
old: 20.911490430206115
new: 38.01282370263152
path: .metrics.mi.mi_sei
old: -16.7407667303502
new: -2.019949439935914
path: .metrics.loc.ploc
old: 255.0
new: 141.0
path: .metrics.loc.blank
old: 27.0
new: 23.0
path: .metrics.loc.sloc
old: 317.0
new: 172.0
path: .metrics.loc.cloc
old: 35.0
new: 8.0
path: .metrics.loc.lloc
old: 41.0
new: 63.0

# Spaces Data

## Minimal test - lines (34, 38)

path: .spaces[0].spaces[0].spaces[1].metrics.loc.sloc
old: 22.0
new: 5.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.lloc
old: 5.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.ploc
old: 22.0
new: 5.0
path: .spaces[0].spaces[0].spaces[1].metrics.cognitive.average
old: 4.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.cognitive.sum
old: 4.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: 0.09366391184573004
new: 0.2857142857142857
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 389.3957486866659
new: 92.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 28.0
new: 16.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n1
old: 11.0
new: 7.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.3276619272378525
new: 2.094817802929741
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 10.676470588235292
new: 3.5
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.08618361122700524
new: 0.015659671944166023
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 4157.37225803705
new: 322.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 230.9651254465028
new: 17.88888888888889
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 17.0
new: 9.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 33.0
new: 9.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 81.0
new: 23.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 48.0
new: 14.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 107.54061610626604
new: 48.18080946738404
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.average
old: 0.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: 88.98921214414565
new: 121.18380521791258
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_sei
old: 53.09072249857997
new: 99.23224269132828
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 52.04047493809688
new: 70.86772234965647
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.average
old: 5.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.sum
old: 5.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.cyclomatic.sum
old: 4.0
new: 1.0

### Code

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreateNextTrackHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        HandleEvent(MediaControlKey::Nexttrack);
        return MPRemoteCommandHandlerStatusSuccess;
      });

## Minimal test - lines (41, 45)

path: .spaces[0].spaces[1].metrics.nexits.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[1].metrics.nexits.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[1].metrics.loc.ploc
old: 10.0
new: 5.0
path: .spaces[0].spaces[1].metrics.loc.sloc
old: 10.0
new: 5.0
path: .spaces[0].spaces[1].metrics.halstead.n2
old: 10.0
new: 9.0
path: .spaces[0].spaces[1].metrics.halstead.time
old: 78.37426262303414
new: 17.88888888888889
path: .spaces[0].spaces[1].metrics.halstead.effort
old: 1410.7367272146146
new: 322.0
path: .spaces[0].spaces[1].metrics.halstead.N2
old: 18.0
new: 9.0
path: .spaces[0].spaces[1].metrics.halstead.N1
old: 23.0
new: 14.0
path: .spaces[0].spaces[1].metrics.halstead.difficulty
old: 8.1
new: 3.5
path: .spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 61.74860596185444
new: 48.18080946738404
path: .spaces[0].spaces[1].metrics.halstead.level
old: 0.1234567901234568
new: 0.2857142857142857
path: .spaces[0].spaces[1].metrics.halstead.n1
old: 9.0
new: 7.0
path: .spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.50606356004523
new: 2.094817802929741
path: .spaces[0].spaces[1].metrics.halstead.bugs
old: 0.04192850658371062
new: 0.015659671944166023
path: .spaces[0].spaces[1].metrics.halstead.volume
old: 174.165028051187
new: 92.0
path: .spaces[0].spaces[1].metrics.halstead.vocabulary
old: 19.0
new: 16.0
path: .spaces[0].spaces[1].metrics.halstead.length
old: 41.0
new: 23.0
path: .spaces[0].spaces[1].metrics.mi.mi_original
old: 106.63610440209456
new: 121.18380521791258
path: .spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 62.36029497198513
new: 70.86772234965647
path: .spaces[0].spaces[1].metrics.mi.mi_sei
old: 78.24434686801133
new: 99.23224269132828

### Code

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreatePreviousTrackHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        HandleEvent(MediaControlKey::Previoustrack);
        return MPRemoteCommandHandlerStatusSuccess;
      });

## Minimal test - lines (20, 46)

path: .spaces[0].metrics.nargs.average
old: 4.333333333333333
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 52.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 0.4166666666666667
new: 1.6666666666666667
path: .spaces[0].metrics.cyclomatic.sum
old: 40.0
new: 6.0
path: .spaces[0].metrics.cyclomatic.average
old: 2.6666666666666665
new: 1.2
path: .spaces[0].metrics.nom.total
old: 12.0
new: 3.0
path: .spaces[0].metrics.nom.functions
old: 12.0
new: 3.0
path: .spaces[0].metrics.halstead.volume
old: 8861.804762941108
new: 498.5713584425332
path: .spaces[0].metrics.halstead.time
old: 23378.66511784914
new: 342.93268041020804
path: .spaces[0].metrics.halstead.N1
old: 686.0
new: 58.0
path: .spaces[0].metrics.halstead.effort
old: 420815.9721212845
new: 6172.788247383744
path: .spaces[0].metrics.halstead.N2
old: 502.0
new: 40.0
path: .spaces[0].metrics.halstead.level
old: 0.02105862265224815
new: 0.08076923076923076
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.0114520504467148
new: 1.4320855327978383
path: .spaces[0].metrics.halstead.n2
old: 148.0
new: 21.0
path: .spaces[0].metrics.halstead.difficulty
old: 47.48648648648648
new: 12.38095238095238
path: .spaces[0].metrics.halstead.estimated_program_length
old: 1201.605035930697
new: 140.34438221418816
path: .spaces[0].metrics.halstead.n1
old: 28.0
new: 13.0
path: .spaces[0].metrics.halstead.bugs
old: 1.8718608253294071
new: 0.1121673168722768
path: .spaces[0].metrics.halstead.length
old: 1188.0
new: 98.0
path: .spaces[0].metrics.halstead.vocabulary
old: 176.0
new: 34.0
path: .spaces[0].metrics.loc.cloc
old: 29.0
new: 0.0
path: .spaces[0].metrics.loc.lloc
old: 41.0
new: 7.0
path: .spaces[0].metrics.loc.ploc
old: 245.0
new: 24.0
path: .spaces[0].metrics.loc.blank
old: 25.0
new: 3.0
path: .spaces[0].metrics.loc.sloc
old: 299.0
new: 27.0
path: .spaces[0].metrics.cognitive.average
old: 2.25
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 27.0
new: 0.0
path: .spaces[0].metrics.mi.mi_sei
old: -16.42005951581101
new: 45.99021024517785
path: .spaces[0].metrics.mi.mi_visual_studio
old: 12.97507857509234
new: 49.07974257206211
path: .spaces[0].metrics.mi.mi_original
old: 22.1873843634079
new: 83.92635979822623

### Code

    namespace mozilla {
    namespace widget {

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreatePlayPauseHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        MPNowPlayingInfoCenter* center = [MPNowPlayingInfoCenter defaultCenter];
        center.playbackState = center.playbackState == MPNowPlayingPlaybackStatePlaying
                                   ? MPNowPlayingPlaybackStatePaused
                                   : MPNowPlayingPlaybackStatePlaying;
        HandleEvent(MediaControlKey::Playpause);
        return MPRemoteCommandHandlerStatusSuccess;
      });
    }

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreateNextTrackHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        HandleEvent(MediaControlKey::Nexttrack);
        return MPRemoteCommandHandlerStatusSuccess;
      });
    }

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreatePreviousTrackHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        HandleEvent(MediaControlKey::Previoustrack);
        return MPRemoteCommandHandlerStatusSuccess;
      });
    }

## Minimal test - lines (23, 32)

path: .spaces[0].spaces[0].spaces[0].metrics.loc.sloc
old: 5.0
new: 10.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.ploc
old: 5.0
new: 10.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 51.89240001794877
new: 106.474009014461
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 9.0
new: 15.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 32.0
new: 46.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 133.437600046154
new: 221.13832641464975
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 18.0
new: 26.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 14.0
new: 20.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 934.063200323078
new: 1916.532162260298
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.031851477793786206
new: 0.05143074552667416
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 7.0
new: 8.666666666666666
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.7830828133113006
new: 2.3197625058687383
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 57.05865002596162
new: 106.70907526996196
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.14285714285714285
new: 0.1153846153846154
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 9.0
new: 13.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 18.0
new: 28.0
path: .spaces[0].spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 119.25020926201564
new: 105.16442172460022
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 96.44265339467282
new: 76.22297742683249
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 69.7369644807109
new: 61.499661827251586

### Code

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreatePlayPauseHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        MPNowPlayingInfoCenter* center = [MPNowPlayingInfoCenter defaultCenter];
        center.playbackState = center.playbackState == MPNowPlayingPlaybackStatePlaying
                                   ? MPNowPlayingPlaybackStatePaused
                                   : MPNowPlayingPlaybackStatePlaying;
        HandleEvent(MediaControlKey::Playpause);
        return MPRemoteCommandHandlerStatusSuccess;
      });
    }

## Minimal test - lines (21, 39)

path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 3.272727272727273
new: 1.3333333333333333
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 36.0
new: 4.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 35.0
new: 4.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 254.0
new: 19.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 20.0
new: 2.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 206.0
new: 17.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 28.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.2222222222222222
new: 1.5
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 2.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 9.0
new: 2.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 9.0
new: 2.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 26.577408625820823
new: 91.8202029426126
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: -9.09332293914494
new: 57.17497888433047
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 15.542344225626213
new: 53.69602511263894
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 38.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 4.222222222222222
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 3.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 27.0
new: 0.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 7557.846591816207
new: 356.702134347855
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 597.0
new: 42.0
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 429.0
new: 30.0
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 43.83941605839416
new: 10.833333333333334
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 331331.58124414703
new: 3864.273122101763
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 1107.036333183205
new: 123.1643663617958
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.02281052281052281
new: 0.0923076923076923
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 137.0
new: 18.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 1026.0
new: 72.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.0789827808803167
new: 1.710616199469386
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 165.0
new: 31.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 28.0
new: 13.0
path: .spaces[0].spaces[0].metrics.halstead.time
old: 18407.31006911928
new: 214.68184011676465
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 1.596077470596895
new: 0.08208376873348423

### Code

    namespace widget {

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreatePlayPauseHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        MPNowPlayingInfoCenter* center = [MPNowPlayingInfoCenter defaultCenter];
        center.playbackState = center.playbackState == MPNowPlayingPlaybackStatePlaying
                                   ? MPNowPlayingPlaybackStatePaused
                                   : MPNowPlayingPlaybackStatePlaying;
        HandleEvent(MediaControlKey::Playpause);
        return MPRemoteCommandHandlerStatusSuccess;
      });
    }

    MediaCenterEventHandler MediaHardwareKeysEventSourceMacMediaCenter::CreateNextTrackHandler() {
      return Block_copy(^MPRemoteCommandHandlerStatus(MPRemoteCommandEvent* event) {
        HandleEvent(MediaControlKey::Nexttrack);
        return MPRemoteCommandHandlerStatusSuccess;
      });
    }