# Global Metrics

path: .metrics.mi.mi_visual_studio
old: 0.0
new: 37.35093369160639
path: .metrics.mi.mi_original
old: -30.879391259328003
new: 63.87009661264693
path: .metrics.mi.mi_sei
old: -70.1959658964718
new: 48.58334990381123
path: .metrics.cognitive.sum
old: 199.0
new: 0.0
path: .metrics.cognitive.average
old: 7.653846153846154
new: null
path: .metrics.nexits.average
old: 2.3076923076923075
new: null
path: .metrics.nexits.sum
old: 60.0
new: 0.0
path: .metrics.nargs.average
old: 1.5
new: null
path: .metrics.nargs.sum
old: 39.0
new: 0.0
path: .metrics.cyclomatic.average
old: 5.777777777777778
new: 1.0
path: .metrics.cyclomatic.sum
old: 156.0
new: 2.0
path: .metrics.halstead.time
old: 108357.82370010598
new: 803.6895247360724
path: .metrics.halstead.length
old: 3194.0
new: 229.0
path: .metrics.halstead.N2
old: 1375.0
new: 103.0
path: .metrics.halstead.bugs
old: 5.2035603758535185
new: 0.19790311065838545
path: .metrics.halstead.difficulty
old: 75.45731707317073
new: 9.992537313432836
path: .metrics.halstead.estimated_program_length
old: 2082.2405308718667
new: 454.5336920965049
path: .metrics.halstead.n1
old: 27.0
new: 13.0
path: .metrics.halstead.vocabulary
old: 273.0
new: 80.0
path: .metrics.halstead.n2
old: 246.0
new: 67.0
path: .metrics.halstead.effort
old: 1950440.8266019076
new: 14466.411445249303
path: .metrics.halstead.level
old: 0.013252525252525254
new: 0.10007468259895444
path: .metrics.halstead.purity_ratio
old: 0.6519225206236277
new: 1.9848632842642135
path: .metrics.halstead.N1
old: 1819.0
new: 126.0
path: .metrics.halstead.volume
old: 25848.26630809801
new: 1447.721533729206
path: .metrics.nom.functions
old: 26.0
new: 0.0
path: .metrics.nom.total
old: 26.0
new: 0.0
path: .metrics.loc.blank
old: 144.0
new: 13.0
path: .metrics.loc.lloc
old: 441.0
new: 0.0
path: .metrics.loc.ploc
old: 682.0
new: 43.0
path: .metrics.loc.sloc
old: 1081.0
new: 70.0
path: .metrics.loc.cloc
old: 255.0
new: 14.0

# Spaces Data

## Minimal test - lines (21, 68)

path: .spaces[0].metrics.halstead.length
old: 40.0
new: 200.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 74.11313393845472
new: 387.8686140532334
path: .spaces[0].metrics.halstead.level
old: 0.25
new: 0.10256410256410256
path: .spaces[0].metrics.halstead.effort
old: 702.7707876446017
new: 11992.00688303413
path: .spaces[0].metrics.halstead.n2
old: 15.0
new: 58.0
path: .spaces[0].metrics.halstead.volume
old: 175.69269691115042
new: 1229.9494239009364
path: .spaces[0].metrics.halstead.N1
old: 20.0
new: 113.0
path: .spaces[0].metrics.halstead.bugs
old: 0.026348418068888393
new: 0.1746384995445524
path: .spaces[0].metrics.halstead.N2
old: 20.0
new: 87.0
path: .spaces[0].metrics.halstead.n1
old: 6.0
new: 13.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.852828348461368
new: 1.9393430702661667
path: .spaces[0].metrics.halstead.vocabulary
old: 21.0
new: 71.0
path: .spaces[0].metrics.halstead.difficulty
old: 4.0
new: 9.75
path: .spaces[0].metrics.halstead.time
old: 39.04282153581121
new: 666.2226046130072
path: .spaces[0].metrics.mi.mi_original
old: 110.20561759577762
new: 71.05995631383723
path: .spaces[0].metrics.mi.mi_sei
old: 83.39406585092559
new: 58.000255446775995
path: .spaces[0].metrics.mi.mi_visual_studio
old: 64.44772958817404
new: 41.55553000809195
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 0.0
new: null
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 9.0
path: .spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 8.0
new: 48.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 8.0
path: .spaces[0].metrics.loc.ploc
old: 8.0
new: 31.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: null
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: null

### Code

    class nsDragService : public nsBaseDragService {
     public:
      nsDragService();

      // nsBaseDragService
      MOZ_CAN_RUN_SCRIPT virtual nsresult InvokeDragSessionImpl(
          nsIArray* anArrayTransferables, const mozilla::Maybe& aRegion,
          uint32_t aActionType) override;
      // nsIDragService
      MOZ_CAN_RUN_SCRIPT NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override;
      NS_IMETHOD UpdateDragImage(nsINode* aImage, int32_t aImageX, int32_t aImageY) override;

      // nsIDragSession
      NS_IMETHOD GetData(nsITransferable* aTransferable, uint32_t aItemIndex) override;
      NS_IMETHOD IsDataFlavorSupported(const char* aDataFlavor, bool* _retval) override;
      NS_IMETHOD GetNumDropItems(uint32_t* aNumItems) override;

      void DragMovedWithView(NSDraggingSession* aSession, NSPoint aPoint);

     protected:
      virtual ~nsDragService();

     private:
      // Creates and returns the drag image for a drag. aImagePoint will be set to
      // the origin of the drag relative to mNativeDragView.
      NSImage* ConstructDragImage(nsINode* aDOMNode,
                                  const mozilla::Maybe& aRegion,
                                  NSPoint* aImagePoint);

      // Creates and returns the drag image for a drag. aPoint should be the origin
      // of the drag, for example the mouse coordinate of the mousedown event.
      // aDragRect will be set the area of the drag relative to this.
      NSImage* ConstructDragImage(nsINode* aDOMNode,
                                  const mozilla::Maybe& aRegion,
                                  mozilla::CSSIntPoint aPoint, mozilla::LayoutDeviceIntRect* aDragRect);

      bool IsValidType(NSString* availableType, bool allowFileURL);
      NSString* GetStringForType(NSPasteboardItem* item, const NSString* type,
                                 bool allowFileURL = false);
      NSString* GetTitleForURL(NSPasteboardItem* item);
      NSString* GetFilePath(NSPasteboardItem* item);

      nsCOMPtr mDataItems;  // only valid for a drag started within gecko
      ChildView* mNativeDragView;
      NSEvent* mNativeDragEvent;

      bool mDragImageChanged;
    };