# Global Metrics

path: .metrics.cyclomatic.average
old: 2.5052631578947366
new: 1.0
path: .metrics.cyclomatic.sum
old: 238.0
new: 6.0
path: .metrics.nexits.sum
old: 103.0
new: 0.0
path: .metrics.nexits.average
old: 1.1444444444444444
new: 0.0
path: .metrics.nargs.average
old: 0.6555555555555556
new: 0.25
path: .metrics.nargs.sum
old: 59.0
new: 1.0
path: .metrics.mi.mi_original
old: -57.878470875328595
new: 59.52964486823538
path: .metrics.mi.mi_sei
old: -102.5680814654586
new: 52.3123737659267
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 34.81265781768151
path: .metrics.halstead.n2
old: 424.0
new: 45.0
path: .metrics.halstead.N2
old: 1975.0
new: 82.0
path: .metrics.halstead.effort
old: 3738387.982599161
new: 13966.271849916058
path: .metrics.halstead.length
old: 4772.0
new: 219.0
path: .metrics.halstead.difficulty
old: 88.50235849056604
new: 10.933333333333334
path: .metrics.halstead.volume
old: 42240.546425637425
new: 1277.4029131020784
path: .metrics.halstead.N1
old: 2797.0
new: 137.0
path: .metrics.halstead.level
old: 0.011299133910726185
new: 0.09146341463414634
path: .metrics.halstead.n1
old: 38.0
new: 12.0
path: .metrics.halstead.purity_ratio
old: 0.8172798655166917
new: 1.3248992664086263
path: .metrics.halstead.time
old: 207688.22125550895
new: 775.9039916620032
path: .metrics.halstead.bugs
old: 8.029126984991796
new: 0.19331508262972671
path: .metrics.halstead.estimated_program_length
old: 3900.0595182456527
new: 290.1529393434892
path: .metrics.halstead.vocabulary
old: 462.0
new: 57.0
path: .metrics.cognitive.sum
old: 192.0
new: 0.0
path: .metrics.cognitive.average
old: 2.1333333333333333
new: 0.0
path: .metrics.loc.lloc
old: 412.0
new: 0.0
path: .metrics.loc.sloc
old: 1526.0
new: 90.0
path: .metrics.loc.cloc
old: 316.0
new: 36.0
path: .metrics.loc.blank
old: 136.0
new: 13.0
path: .metrics.loc.ploc
old: 1074.0
new: 41.0
path: .metrics.nom.functions
old: 90.0
new: 4.0
path: .metrics.nom.total
old: 90.0
new: 4.0

# Spaces Data

## Minimal test - lines (21, 88)

path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 10.0
path: .spaces[0].metrics.loc.lloc
old: 2.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 5.0
new: 32.0
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 26.0
path: .spaces[0].metrics.loc.sloc
old: 5.0
new: 68.0
path: .spaces[0].metrics.halstead.n2
old: 10.0
new: 38.0
path: .spaces[0].metrics.halstead.volume
old: 130.79881092001085
new: 1185.2097998526922
path: .spaces[0].metrics.halstead.N1
old: 18.0
new: 136.0
path: .spaces[0].metrics.halstead.bugs
old: 0.024778708268278275
new: 0.19222438648463355
path: .spaces[0].metrics.halstead.effort
old: 640.9141735080532
new: 13848.240819331457
path: .spaces[0].metrics.halstead.difficulty
old: 4.9
new: 11.68421052631579
path: .spaces[0].metrics.halstead.time
old: 35.60634297266962
new: 769.346712185081
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6522114188524015
new: 1.1544799786643338
path: .spaces[0].metrics.halstead.N2
old: 14.0
new: 74.0
path: .spaces[0].metrics.halstead.vocabulary
old: 17.0
new: 50.0
path: .spaces[0].metrics.halstead.n1
old: 7.0
new: 12.0
path: .spaces[0].metrics.halstead.length
old: 32.0
new: 210.0
path: .spaces[0].metrics.halstead.level
old: 0.2040816326530612
new: 0.08558558558558559
path: .spaces[0].metrics.halstead.estimated_program_length
old: 52.87076540327685
new: 242.44079551951012
path: .spaces[0].metrics.mi.mi_sei
old: 96.5924956634619
new: 59.036672093510575
path: .spaces[0].metrics.mi.mi_visual_studio
old: 69.7977029287459
new: 37.83044721542202
path: .spaces[0].metrics.mi.mi_original
old: 119.3540720081555
new: 64.69006473837165
path: .spaces[0].metrics.nargs.average
old: 1.0
new: 0.25
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 4.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 4.0

### Code

    class nsPrintSettingsService : public nsIPrintSettingsService {
     public:
      NS_DECL_ISUPPORTS
      NS_DECL_NSIPRINTSETTINGSSERVICE

      nsPrintSettingsService() = default;

      /**
       * method Init
       *  Initializes member variables. Every consumer that does manual
       *  creation (instead of do_CreateInstance) needs to call this method
       *  immediately after instantiation.
       */
      virtual nsresult Init();

     private:
      // Copying is not supported.
      nsPrintSettingsService(const nsPrintSettingsService& x) = delete;
      nsPrintSettingsService& operator=(const nsPrintSettingsService& x) = delete;

     protected:
      virtual ~nsPrintSettingsService() = default;

      void ReadBitFieldPref(const char* aPrefId, int32_t anOption);
      void WriteBitFieldPref(const char* aPrefId, int32_t anOption);
      void ReadJustification(const char* aPrefId, int16_t& aJust,
                             int16_t aInitValue);
      void WriteJustification(const char* aPrefId, int16_t aJust);
      void ReadInchesToTwipsPref(const char* aPrefId, int32_t& aTwips,
                                 const char* aMarginPref);
      void WriteInchesFromTwipsPref(const char* aPrefId, int32_t aTwips);
      void ReadInchesIntToTwipsPref(const char* aPrefId, int32_t& aTwips,
                                    const char* aMarginPref);
      void WriteInchesIntFromTwipsPref(const char* aPrefId, int32_t aTwips);

      nsresult ReadPrefDouble(const char* aPrefId, double& aVal);
      nsresult WritePrefDouble(const char* aPrefId, double aVal);

      /**
       * method ReadPrefs
       * @param aPS          a pointer to the printer settings
       * @param aPrinterName the name of the printer for which to read prefs
       * @param aFlags       flag specifying which prefs to read
       */
      virtual nsresult ReadPrefs(nsIPrintSettings* aPS,
                                 const nsAString& aPrinterName, uint32_t aFlags);
      /**
       * method WritePrefs
       * @param aPS          a pointer to the printer settings
       * @param aPrinterName the name of the printer for which to write prefs
       * @param aFlags       flag specifying which prefs to read
       */
      virtual nsresult WritePrefs(nsIPrintSettings* aPS,
                                  const nsAString& aPrinterName, uint32_t aFlags);

      const char* GetPrefName(const char* aPrefName, const nsAString& aPrinterName);

      /**
       * method _CreatePrintSettings
       *   May be implemented by the platform-specific derived class
       *
       * @return             printer settings instance
       */
      virtual nsresult _CreatePrintSettings(nsIPrintSettings** _retval) = 0;

      // Members
      nsCString mPrefName;
    };