# Global Metrics

path: .metrics.mi.mi_sei
old: -6.5576425798776325
new: 21.48697009628077
path: .metrics.mi.mi_visual_studio
old: 24.89440614053709
new: 31.290171241003343
path: .metrics.mi.mi_original
old: 42.56943450031842
new: 53.50619282211572
path: .metrics.halstead.time
old: 2648.816784686726
new: 4138.838110826042
path: .metrics.halstead.estimated_program_length
old: 587.8177795803584
new: 312.6872089127504
path: .metrics.halstead.effort
old: 47678.702124361065
new: 74499.08599486876
path: .metrics.halstead.bugs
old: 0.4382901344698965
new: 0.5901730516904523
path: .metrics.halstead.vocabulary
old: 97.0
new: 61.0
path: .metrics.halstead.N1
old: 239.0
new: 225.0
path: .metrics.halstead.n2
old: 85.0
new: 46.0
path: .metrics.halstead.length
old: 461.0
new: 412.0
path: .metrics.halstead.level
old: 0.06381381381381382
new: 0.03279857397504456
path: .metrics.halstead.n1
old: 12.0
new: 15.0
path: .metrics.halstead.volume
old: 3042.559820248266
new: 2443.4637830759093
path: .metrics.halstead.difficulty
old: 15.670588235294115
new: 30.48913043478261
path: .metrics.halstead.N2
old: 222.0
new: 187.0
path: .metrics.halstead.purity_ratio
old: 1.2750927973543569
new: 0.7589495361959961
path: .metrics.nargs.sum
old: 11.0
new: 14.0
path: .metrics.nargs.average
old: 1.0
new: 3.5
path: .metrics.cyclomatic.sum
old: 17.0
new: 6.0
path: .metrics.nom.functions
old: 11.0
new: 4.0
path: .metrics.nom.total
old: 11.0
new: 4.0
path: .metrics.nexits.average
old: 0.6363636363636364
new: 0.5
path: .metrics.nexits.sum
old: 7.0
new: 2.0
path: .metrics.loc.ploc
old: 132.0
new: 84.0
path: .metrics.loc.blank
old: 33.0
new: 15.0
path: .metrics.loc.sloc
old: 166.0
new: 106.0
path: .metrics.loc.cloc
old: 1.0
new: 7.0
path: .metrics.loc.lloc
old: 9.0
new: 2.0

# Spaces Data

## Minimal test - lines (14, 104)

path: .spaces[0].metrics.halstead.bugs
old: 0.016015578878681887
new: 0.5985993699312859
path: .spaces[0].metrics.halstead.n1
old: 6.0
new: 15.0
path: .spaces[0].metrics.halstead.level
old: 0.23333333333333336
new: 0.03132969034608379
path: .spaces[0].metrics.halstead.N1
old: 11.0
new: 224.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 35.161259458730164
new: 291.93274338631795
path: .spaces[0].metrics.halstead.time
old: 18.502198590705454
new: 4227.793435059077
path: .spaces[0].metrics.halstead.volume
old: 77.70923408096293
new: 2384.1982650169216
path: .spaces[0].metrics.halstead.n2
old: 7.0
new: 43.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6743456885109602
new: 0.717279467779651
path: .spaces[0].metrics.halstead.difficulty
old: 4.285714285714286
new: 31.91860465116279
path: .spaces[0].metrics.halstead.length
old: 21.0
new: 407.0
path: .spaces[0].metrics.halstead.N2
old: 10.0
new: 183.0
path: .spaces[0].metrics.halstead.vocabulary
old: 13.0
new: 58.0
path: .spaces[0].metrics.halstead.effort
old: 333.03957463269825
new: 76100.28183106337
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 14.0
path: .spaces[0].metrics.nargs.average
old: null
new: 3.5
path: .spaces[0].metrics.mi.mi_sei
old: 100.49869134956164
new: 17.466124759279246
path: .spaces[0].metrics.mi.mi_visual_studio
old: 71.38107633607659
new: 32.94483123309575
path: .spaces[0].metrics.mi.mi_original
old: 122.06164053469097
new: 56.33566140859374
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: null
new: 0.5
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.ploc
old: 5.0
new: 79.0
path: .spaces[0].metrics.loc.sloc
old: 5.0
new: 91.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 10.0
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 4.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 4.0

### Code

    class nsNativeBasicThemeCocoa : public nsNativeBasicTheme {
     public:
      nsNativeBasicThemeCocoa() = default;

      using ScrollbarParams = mozilla::widget::ScrollbarParams;
      using ScrollbarDrawingMac = mozilla::widget::ScrollbarDrawingMac;

      NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
                                      StyleAppearance aAppearance,
                                      mozilla::LayoutDeviceIntSize* aResult,
                                      bool* aIsOverridable) override;

      ScrollbarSizes GetScrollbarSizes(nsPresContext*, StyleScrollbarWidth,
                                       Overlay) override;

      template
      void DoPaintScrollbarThumb(PaintBackendData&, const LayoutDeviceRect& aRect,
                                 bool aHorizontal, nsIFrame* aFrame,
                                 const ComputedStyle& aStyle,
                                 const EventStates& aElementState,
                                 const EventStates& aDocumentState,
                                 DPIRatio aDpiRatio);
      bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect& aRect,
                               bool aHorizontal, nsIFrame* aFrame,
                               const ComputedStyle& aStyle,
                               const EventStates& aElementState,
                               const EventStates& aDocumentState,
                               DPIRatio aDpiRatio) override;
      bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect& aRect,
                               bool aHorizontal, nsIFrame* aFrame,
                               const ComputedStyle& aStyle,
                               const EventStates& aElementState,
                               const EventStates& aDocumentState,
                               DPIRatio aDpiRatio) override;

      template
      void DoPaintScrollbarTrack(PaintBackendData&, const LayoutDeviceRect& aRect,
                                 bool aHorizontal, nsIFrame* aFrame,
                                 const ComputedStyle& aStyle,
                                 const EventStates& aDocumentState,
                                 DPIRatio aDpiRatio);
      bool PaintScrollbarTrack(DrawTarget&, const LayoutDeviceRect& aRect,
                               bool aHorizontal, nsIFrame* aFrame,
                               const ComputedStyle& aStyle,
                               const EventStates& aDocumentState,
                               DPIRatio aDpiRatio) override;
      bool PaintScrollbarTrack(WebRenderBackendData&, const LayoutDeviceRect& aRect,
                               bool aHorizontal, nsIFrame* aFrame,
                               const ComputedStyle& aStyle,
                               const EventStates& aDocumentState,
                               DPIRatio aDpiRatio) override;

      bool PaintScrollbar(DrawTarget&, const LayoutDeviceRect& aRect,
                          bool aHorizontal, nsIFrame* aFrame,
                          const ComputedStyle& aStyle,
                          const EventStates& aDocumentState,
                          DPIRatio aDpiRatio) override {
        // Draw nothing; the scrollbar track is drawn in PaintScrollbarTrack.
        return true;
      }
      bool PaintScrollbar(WebRenderBackendData&, const LayoutDeviceRect& aRect,
                          bool aHorizontal, nsIFrame* aFrame,
                          const ComputedStyle& aStyle,
                          const EventStates& aDocumentState,
                          DPIRatio aDpiRatio) override {
        // Draw nothing; the scrollbar track is drawn in PaintScrollbarTrack.
        return true;
      }

      template
      void DoPaintScrollCorner(PaintBackendData&, const LayoutDeviceRect& aRect,
                               nsIFrame* aFrame, const ComputedStyle& aStyle,
                               const EventStates& aDocumentState,
                               DPIRatio aDpiRatio);

      bool PaintScrollCorner(DrawTarget&, const LayoutDeviceRect& aRect,
                             nsIFrame* aFrame, const ComputedStyle& aStyle,
                             const EventStates& aDocumentState,
                             DPIRatio aDpiRatio) override;
      bool PaintScrollCorner(WebRenderBackendData&, const LayoutDeviceRect& aRect,
                             nsIFrame* aFrame, const ComputedStyle& aStyle,
                             const EventStates& aDocumentState,
                             DPIRatio aDpiRatio) override;

      ThemeGeometryType ThemeGeometryTypeForWidget(nsIFrame*,
                                                   StyleAppearance) override;
      bool ThemeSupportsWidget(nsPresContext*, nsIFrame*, StyleAppearance) override;

     protected:
      virtual ~nsNativeBasicThemeCocoa() = default;
    };