# Global Metrics

path: .metrics.loc.ploc
old: 357.0
new: 34.0
path: .metrics.loc.cloc
old: 50.0
new: 5.0
path: .metrics.loc.lloc
old: 152.0
new: 1.0
path: .metrics.loc.sloc
old: 495.0
new: 59.0
path: .metrics.loc.blank
old: 88.0
new: 20.0
path: .metrics.mi.mi_visual_studio
old: 3.2321702657190023
new: 41.47846602260751
path: .metrics.mi.mi_sei
old: -37.16770313417983
new: 48.72506758339838
path: .metrics.mi.mi_original
old: 5.527011154379494
new: 70.92817689865885
path: .metrics.cyclomatic.average
old: 3.238095238095238
new: 1.0
path: .metrics.cyclomatic.sum
old: 68.0
new: 3.0
path: .metrics.nexits.sum
old: 16.0
new: 0.0
path: .metrics.nexits.average
old: 1.0
new: 0.0
path: .metrics.nom.total
old: 16.0
new: 1.0
path: .metrics.nom.functions
old: 16.0
new: 1.0
path: .metrics.halstead.N1
old: 920.0
new: 54.0
path: .metrics.halstead.N2
old: 695.0
new: 52.0
path: .metrics.halstead.difficulty
old: 44.30278884462152
new: 7.609756097560975
path: .metrics.halstead.bugs
old: 2.325571611570066
new: 0.09246863905321984
path: .metrics.halstead.effort
old: 582742.185065216
new: 4620.336226178393
path: .metrics.halstead.n2
old: 251.0
new: 41.0
path: .metrics.halstead.length
old: 1615.0
new: 106.0
path: .metrics.halstead.vocabulary
old: 283.0
new: 53.0
path: .metrics.halstead.time
old: 32374.565836956448
new: 256.6853458987996
path: .metrics.halstead.volume
old: 13153.62306217349
new: 607.1595681836991
path: .metrics.halstead.n1
old: 32.0
new: 12.0
path: .metrics.halstead.level
old: 0.022571942446043165
new: 0.13141025641025642
path: .metrics.halstead.estimated_program_length
old: 2160.8574320416437
new: 262.6791821979953
path: .metrics.halstead.purity_ratio
old: 1.337992217982442
new: 2.478105492433918
path: .metrics.cognitive.average
old: 2.125
new: 0.0
path: .metrics.cognitive.sum
old: 34.0
new: 0.0
path: .metrics.nargs.average
old: 1.9375
new: 1.0
path: .metrics.nargs.sum
old: 31.0
new: 1.0

# Spaces Data

## Minimal test - lines (25, 57)

path: .spaces[0].metrics.loc.lloc
old: 152.0
new: 1.0
path: .spaces[0].metrics.loc.cloc
old: 43.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 450.0
new: 33.0
path: .spaces[0].metrics.loc.blank
old: 85.0
new: 11.0
path: .spaces[0].metrics.loc.ploc
old: 322.0
new: 22.0
path: .spaces[0].metrics.halstead.length
old: 1582.0
new: 95.0
path: .spaces[0].metrics.halstead.time
old: 34016.05883293801
new: 226.90762664961264
path: .spaces[0].metrics.halstead.volume
old: 12601.87073833542
new: 518.6460037705432
path: .spaces[0].metrics.halstead.bugs
old: 2.403531092838148
new: 0.08517127413955924
path: .spaces[0].metrics.halstead.n2
old: 218.0
new: 32.0
path: .spaces[0].metrics.halstead.n1
old: 32.0
new: 12.0
path: .spaces[0].metrics.halstead.effort
old: 612289.0589928842
new: 4084.337279693027
path: .spaces[0].metrics.halstead.N2
old: 662.0
new: 42.0
path: .spaces[0].metrics.halstead.difficulty
old: 48.58715596330275
new: 7.875
path: .spaces[0].metrics.halstead.N1
old: 920.0
new: 53.0
path: .spaces[0].metrics.halstead.vocabulary
old: 250.0
new: 44.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.1715955643497913
new: 2.1370478948279357
path: .spaces[0].metrics.halstead.estimated_program_length
old: 1853.4641828013696
new: 203.01955000865388
path: .spaces[0].metrics.halstead.level
old: 0.020581570996978858
new: 0.12698412698412698
path: .spaces[0].metrics.cyclomatic.sum
old: 67.0
new: 2.0
path: .spaces[0].metrics.cyclomatic.average
old: 3.35
new: 1.0
path: .spaces[0].metrics.nexits.sum
old: 16.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 4.399921802630379
new: 47.59662298534825
path: .spaces[0].metrics.mi.mi_original
old: 7.5238662824979485
new: 81.3902253049455
path: .spaces[0].metrics.mi.mi_sei
old: -34.9846669983785
new: 41.9240621510765
path: .spaces[0].metrics.cognitive.sum
old: 34.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 2.125
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 1.9375
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 31.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 16.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 16.0
new: 1.0

### Code

    class nsDirectoryService final : public nsIDirectoryService,
                                     public nsIProperties,
                                     public nsIDirectoryServiceProvider2 {
     public:
      NS_DECL_THREADSAFE_ISUPPORTS

      NS_DECL_NSIPROPERTIES

      NS_DECL_NSIDIRECTORYSERVICE

      NS_DECL_NSIDIRECTORYSERVICEPROVIDER

      NS_DECL_NSIDIRECTORYSERVICEPROVIDER2

      nsDirectoryService();

      static void RealInit();
      void RegisterCategoryProviders();

      static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);

      static mozilla::StaticRefPtr gService;

      void SetCurrentProcessDirectory(nsIFile* aFile) { mXCurProcD = aFile; }
      nsresult GetCurrentProcessDirectory(nsIFile**);

     private:
      ~nsDirectoryService();
      nsCOMPtr mXCurProcD;

      nsInterfaceHashtable mHashtable;
      nsTArray> mProviders;
    };

## Minimal test - lines (48, 48)

path: .spaces[0].spaces[0].metrics.nom.total
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 2.5714285714285716
new: 1.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 18.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 5.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 133.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 40.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 100.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 28.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 5.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 1.25
new: 0.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 46.13929203958621
new: 152.05810867913445
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 7.49078879804887
new: 143.77444718573403
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 26.98204212841299
new: 88.92287057259325
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 9.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 2.25
new: 0.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.5596024477487063
new: 0.008859751325042116
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 23.536585365853657
new: 3.75
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 82.0
new: 4.0
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.04248704663212435
new: 0.26666666666666666
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 245.0
new: 6.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 68786.19559246565
new: 137.0295339141037
path: .spaces[0].spaces[0].metrics.halstead.length
old: 438.0
new: 11.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 2922.522299783515
new: 36.541209043760986
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 20.0
new: 6.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.3875749458365985
new: 2.1372522731206307
path: .spaces[0].spaces[0].metrics.halstead.time
old: 3821.455310692536
new: 7.612751884116872
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 102.0
new: 10.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 607.7578262764301
new: 23.509775004326936
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 193.0
new: 5.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 2.75
new: 1.0
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 11.0
new: 1.0

### Code

      void SetCurrentProcessDirectory(nsIFile* aFile) { mXCurProcD = aFile; }