# Global Metrics

path: .metrics.loc.lloc
old: 336.0
new: 0.0
path: .metrics.loc.ploc
old: 794.0
new: 43.0
path: .metrics.loc.sloc
old: 1062.0
new: 60.0
path: .metrics.loc.cloc
old: 160.0
new: 7.0
path: .metrics.loc.blank
old: 108.0
new: 10.0
path: .metrics.nom.functions
old: 22.0
new: 1.0
path: .metrics.nom.total
old: 22.0
new: 1.0
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 39.99514058970443
path: .metrics.mi.mi_sei
old: -84.36471711565704
new: 48.92023956457496
path: .metrics.mi.mi_original
old: -38.386282827715505
new: 68.39169040839457
path: .metrics.nexits.sum
old: 58.0
new: 0.0
path: .metrics.nexits.average
old: 2.636363636363636
new: 0.0
path: .metrics.nargs.sum
old: 82.0
new: 1.0
path: .metrics.nargs.average
old: 3.727272727272727
new: 1.0
path: .metrics.halstead.bugs
old: 6.98808152327675
new: 0.11707945950751704
path: .metrics.halstead.difficulty
old: 79.26161369193154
new: 8.372093023255815
path: .metrics.halstead.length
old: 4353.0
new: 136.0
path: .metrics.halstead.purity_ratio
old: 0.8579333164541922
new: 2.0319774592709123
path: .metrics.halstead.volume
old: 38296.220622041415
new: 786.2649210393538
path: .metrics.halstead.effort
old: 3035420.244805229
new: 6582.683059864358
path: .metrics.halstead.time
old: 168634.45804473493
new: 365.7046144369088
path: .metrics.halstead.vocabulary
old: 445.0
new: 55.0
path: .metrics.halstead.N1
old: 2552.0
new: 76.0
path: .metrics.halstead.N2
old: 1801.0
new: 60.0
path: .metrics.halstead.n2
old: 409.0
new: 43.0
path: .metrics.halstead.n1
old: 36.0
new: 12.0
path: .metrics.halstead.level
old: 0.012616447652538712
new: 0.11944444444444444
path: .metrics.halstead.estimated_program_length
old: 3734.583726525099
new: 276.3489344608441
path: .metrics.cognitive.sum
old: 187.0
new: 0.0
path: .metrics.cognitive.average
old: 8.5
new: 0.0
path: .metrics.cyclomatic.sum
old: 181.0
new: 7.0
path: .metrics.cyclomatic.average
old: 7.869565217391305
new: 1.0

# Spaces Data

## Minimal test - lines (11, 11)

path: .spaces[0].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 4.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 0.0
new: null
path: .spaces[0].metrics.loc.sloc
old: 12.0
new: 1.0
path: .spaces[0].metrics.loc.ploc
old: 11.0
new: 1.0
path: .spaces[0].metrics.loc.lloc
old: 7.0
new: 0.0
path: .spaces[0].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 3.0
new: null
path: .spaces[0].metrics.nexits.sum
old: 3.0
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 3.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 3.0
new: null
path: .spaces[0].metrics.halstead.N1
old: 34.0
new: 0.0
path: .spaces[0].metrics.halstead.vocabulary
old: 22.0
new: 1.0
path: .spaces[0].metrics.halstead.difficulty
old: 8.307692307692308
new: 0.0
path: .spaces[0].metrics.halstead.n1
old: 9.0
new: 0.0
path: .spaces[0].metrics.halstead.level
old: 0.12037037037037036
new: null
path: .spaces[0].metrics.halstead.N2
old: 24.0
new: 1.0
path: .spaces[0].metrics.halstead.bugs
old: 0.05550566995581089
new: 0.0
path: .spaces[0].metrics.halstead.n2
old: 13.0
new: 1.0
path: .spaces[0].metrics.halstead.volume
old: 258.64703388096325
new: 0.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.3212938163588794
new: null
path: .spaces[0].metrics.halstead.length
old: 58.0
new: 1.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 76.63504134881501
new: null
path: .spaces[0].metrics.halstead.effort
old: 2148.7599737803102
new: 0.0
path: .spaces[0].metrics.halstead.time
old: 119.37555409890612
new: 0.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].metrics.mi.mi_original
old: 100.93609776424728
new: null
path: .spaces[0].metrics.mi.mi_sei
old: 70.32643513676824
new: null
path: .spaces[0].metrics.mi.mi_visual_studio
old: 59.02695775686976
new: null

### Code

    @class MPRemoteCommandEvent;

## Minimal test - lines (17, 58)

path: .spaces[2].metrics.cognitive.sum
old: 44.0
new: 0.0
path: .spaces[2].metrics.cognitive.average
old: 44.0
new: 0.0
path: .spaces[2].metrics.mi.mi_visual_studio
old: 26.11932850532448
new: 44.11642152426202
path: .spaces[2].metrics.mi.mi_sei
old: 19.21469673336943
new: 50.12497157658414
path: .spaces[2].metrics.mi.mi_original
old: 44.66405174410487
new: 75.43908080648805
path: .spaces[2].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[2].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[2].metrics.nexits.sum
old: 8.0
new: 0.0
path: .spaces[2].metrics.nexits.average
old: 8.0
new: 0.0
path: .spaces[2].metrics.loc.blank
old: 11.0
new: 7.0
path: .spaces[2].metrics.loc.cloc
old: 18.0
new: 2.0
path: .spaces[2].metrics.loc.sloc
old: 125.0
new: 42.0
path: .spaces[2].metrics.loc.ploc
old: 96.0
new: 33.0
path: .spaces[2].metrics.loc.lloc
old: 50.0
new: 0.0
path: .spaces[2].metrics.cyclomatic.sum
old: 27.0
new: 4.0
path: .spaces[2].metrics.cyclomatic.average
old: 27.0
new: 1.0
path: .spaces[2].metrics.halstead.vocabulary
old: 105.0
new: 51.0
path: .spaces[2].metrics.halstead.estimated_program_length
old: 629.1933293917698
new: 249.15023654428157
path: .spaces[2].metrics.halstead.difficulty
old: 21.625
new: 8.0
path: .spaces[2].metrics.halstead.purity_ratio
old: 1.3358669413838
new: 2.009276101163561
path: .spaces[2].metrics.halstead.bugs
old: 0.5574358632168084
new: 0.10545464623519583
path: .spaces[2].metrics.halstead.N2
old: 173.0
new: 52.0
path: .spaces[2].metrics.halstead.n1
old: 21.0
new: 12.0
path: .spaces[2].metrics.halstead.effort
old: 68387.10843949858
new: 5627.045939235723
path: .spaces[2].metrics.halstead.time
old: 3799.2838021943658
new: 312.61366329087355
path: .spaces[2].metrics.halstead.volume
old: 3162.4096388207436
new: 703.3807424044654
path: .spaces[2].metrics.halstead.n2
old: 84.0
new: 39.0
path: .spaces[2].metrics.halstead.length
old: 471.0
new: 124.0
path: .spaces[2].metrics.halstead.N1
old: 298.0
new: 72.0
path: .spaces[2].metrics.halstead.level
old: 0.046242774566473986
new: 0.125

### Code

    namespace mozilla {
    namespace widget {

    typedef MPRemoteCommandHandlerStatus (^MediaCenterEventHandler)(MPRemoteCommandEvent* event);

    class MediaHardwareKeysEventSourceMacMediaCenter final
        : public mozilla::dom::MediaControlKeySource {
     public:
      NS_INLINE_DECL_REFCOUNTING(MediaHardwareKeysEventSourceMacMediaCenter, override)
      MediaHardwareKeysEventSourceMacMediaCenter();

      MediaCenterEventHandler CreatePlayPauseHandler();
      MediaCenterEventHandler CreateNextTrackHandler();
      MediaCenterEventHandler CreatePreviousTrackHandler();
      MediaCenterEventHandler CreatePlayHandler();
      MediaCenterEventHandler CreatePauseHandler();

      bool Open() override;
      void Close() override;
      bool IsOpened() const override;
      void SetPlaybackState(dom::MediaSessionPlaybackState aState) override;
      void SetMediaMetadata(const dom::MediaMetadataBase& aMetadata) override;
      // Currently we don't support showing supported keys on the touch bar.
      void SetSupportedMediaKeys(const MediaKeysArray& aSupportedKeys) override {}

     private:
      ~MediaHardwareKeysEventSourceMacMediaCenter();
      void BeginListeningForEvents();
      void EndListeningForEvents();
      void HandleEvent(dom::MediaControlKey aKey);

      bool mOpened = false;

      MediaCenterEventHandler mPlayPauseHandler;
      MediaCenterEventHandler mNextTrackHandler;
      MediaCenterEventHandler mPreviousTrackHandler;
      MediaCenterEventHandler mPauseHandler;
      MediaCenterEventHandler mPlayHandler;
    };

    }  // namespace widget
    }  // namespace mozilla

## Minimal test - lines (13, 13)

path: .spaces[1].metrics.nargs.average
old: 3.0
new: null
path: .spaces[1].metrics.nargs.sum
old: 3.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[1].metrics.loc.sloc
old: 13.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 13.0
new: 1.0
path: .spaces[1].metrics.nexits.average
old: 0.0
new: null
path: .spaces[1].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[1].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[1].metrics.mi.mi_sei
old: 66.91820820087692
new: null
path: .spaces[1].metrics.mi.mi_original
old: 98.78542331833938
new: null
path: .spaces[1].metrics.mi.mi_visual_studio
old: 57.76925340253765
new: null
path: .spaces[1].metrics.halstead.bugs
old: 0.05332032528375762
new: 0.0
path: .spaces[1].metrics.halstead.difficulty
old: 5.8125
new: 0.0
path: .spaces[1].metrics.halstead.level
old: 0.1720430107526882
new: null
path: .spaces[1].metrics.halstead.n2
old: 24.0
new: 1.0
path: .spaces[1].metrics.halstead.time
old: 112.39540647195555
new: 0.0
path: .spaces[1].metrics.halstead.vocabulary
old: 33.0
new: 1.0
path: .spaces[1].metrics.halstead.N2
old: 31.0
new: 1.0
path: .spaces[1].metrics.halstead.length
old: 69.0
new: 1.0
path: .spaces[1].metrics.halstead.effort
old: 2023.1173164952
new: 0.0
path: .spaces[1].metrics.halstead.n1
old: 9.0
new: 0.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: 138.56842503028855
new: null
path: .spaces[1].metrics.halstead.N1
old: 38.0
new: 0.0
path: .spaces[1].metrics.halstead.volume
old: 348.0631942357333
new: 0.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 2.0082380439172254
new: null

### Code

    typedef struct objc_object MPRemoteCommandEvent;