# Global Metrics

path: .metrics.nexits.sum
old: 10.0
new: 2.0
path: .metrics.nexits.average
old: 0.7142857142857143
new: 0.08333333333333333
path: .metrics.halstead.vocabulary
old: 800.0
new: 65.0
path: .metrics.halstead.length
old: 2398.0
new: 407.0
path: .metrics.halstead.bugs
old: 1.271289780025554
new: 0.6079514305982973
path: .metrics.halstead.level
old: 0.0981863664790494
new: 0.031468531468531465
path: .metrics.halstead.N1
old: 1332.0
new: 264.0
path: .metrics.halstead.purity_ratio
old: 3.1724746460803313
new: 0.8195871037655592
path: .metrics.halstead.n1
old: 15.0
new: 20.0
path: .metrics.halstead.effort
old: 235531.3468903477
new: 77890.62868579313
path: .metrics.halstead.volume
old: 23125.96714307979
new: 2451.103699902581
path: .metrics.halstead.estimated_program_length
old: 7607.594201300634
new: 333.5719512325826
path: .metrics.halstead.n2
old: 785.0
new: 45.0
path: .metrics.halstead.time
old: 13085.074827241537
new: 4327.257149210729
path: .metrics.halstead.difficulty
old: 10.18471337579618
new: 31.77777777777778
path: .metrics.halstead.N2
old: 1066.0
new: 143.0
path: .metrics.nom.functions
old: 14.0
new: 24.0
path: .metrics.nom.total
old: 14.0
new: 24.0
path: .metrics.loc.sloc
old: 743.0
new: 197.0
path: .metrics.loc.lloc
old: 10.0
new: 20.0
path: .metrics.loc.ploc
old: 562.0
new: 110.0
path: .metrics.loc.cloc
old: 109.0
new: 54.0
path: .metrics.loc.blank
old: 72.0
new: 33.0
path: .metrics.cyclomatic.average
old: 1.0
new: 1.064516129032258
path: .metrics.cyclomatic.sum
old: 30.0
new: 33.0
path: .metrics.mi.mi_original
old: 4.753424879242658
new: 37.2397723967992
path: .metrics.mi.mi_visual_studio
old: 2.7797806311360573
new: 21.77764467649076
path: .metrics.mi.mi_sei
old: -37.830670847311126
new: 17.63677510304406
path: .metrics.nargs.average
old: 0.0
new: 0.20833333333333337
path: .metrics.nargs.sum
old: 0.0
new: 5.0
path: .metrics.cognitive.average
old: 0.0
new: 0.08333333333333333
path: .metrics.cognitive.sum
old: 0.0
new: 2.0

# Spaces Data

## Minimal test - lines (44, 91)

path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 49.01627514255911
new: 42.72467462574031
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 83.81783049377607
new: 73.05919361001594
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 45.32453625883417
new: 54.5889399853542
path: .spaces[0].spaces[0].metrics.nom.total
old: 0.0
new: 8.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 0.0
new: 8.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 0.0
new: 6.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 0.0
new: 5.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 28.0
new: 37.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 0.0
new: 4.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 28.0
new: 48.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 99.0
new: 121.0
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 49.0
new: 37.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 1134.1282500035134
new: 6645.583057417987
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.03625101666196177
new: 0.11782410208746956
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 50.0
new: 84.0
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 2.0
new: 11.305555555555555
path: .spaces[0].spaces[0].metrics.halstead.time
old: 63.00712500019519
new: 369.1990587454437
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.5
new: 0.08845208845208845
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 2.8598058824408605
new: 0.9348132052146436
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 567.0641250017567
new: 587.8157004104362
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 53.0
new: 29.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 283.1207823616452
new: 113.11239783097189
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 49.0
new: 18.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 4.0
new: 11.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: null
new: 0.125
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 9.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: null
new: 0.0

### Code

    class RWLock : public BlockingResourceBase {
     public:
      explicit RWLock(const char* aName);

      // Windows rwlocks don't need any special handling to be destroyed, but
      // POSIX ones do.
    #ifdef XP_WIN
      ~RWLock() = default;
    #else
      ~RWLock();
    #endif

    #ifdef DEBUG
      bool LockedForWritingByCurrentThread();
      void ReadLock();
      void ReadUnlock();
      void WriteLock();
      void WriteUnlock();
    #else
      void ReadLock() { ReadLockInternal(); }
      void ReadUnlock() { ReadUnlockInternal(); }
      void WriteLock() { WriteLockInternal(); }
      void WriteUnlock() { WriteUnlockInternal(); }
    #endif

     private:
      void ReadLockInternal();
      void ReadUnlockInternal();
      void WriteLockInternal();
      void WriteUnlockInternal();

      RWLock() = delete;
      RWLock(const RWLock&) = delete;
      RWLock& operator=(const RWLock&) = delete;

    #ifndef XP_WIN
      pthread_rwlock_t mRWLock;
    #else
      // SRWLock is pointer-sized.  We declare it in such a fashion here to
      // avoid pulling in windows.h wherever this header is used.
      void* mRWLock;
    #endif

    #ifdef DEBUG
      // We record the owning thread for write locks only.
      PRThread* mOwningThread;
    #endif
    };

## Minimal test - lines (20, 195)

path: .spaces[0].metrics.nargs.average
old: 0.0
new: 0.20833333333333337
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 5.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.0666666666666669
path: .spaces[0].metrics.cyclomatic.sum
old: 29.0
new: 32.0
path: .spaces[0].metrics.nom.functions
old: 14.0
new: 24.0
path: .spaces[0].metrics.nom.total
old: 14.0
new: 24.0
path: .spaces[0].metrics.nexits.sum
old: 10.0
new: 2.0
path: .spaces[0].metrics.nexits.average
old: 0.7142857142857143
new: 0.08333333333333333
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: 0.08333333333333333
path: .spaces[0].metrics.halstead.difficulty
old: 10.188860435339308
new: 33.41463414634146
path: .spaces[0].metrics.halstead.estimated_program_length
old: 7563.371953423014
new: 306.0981940870887
path: .spaces[0].metrics.halstead.level
old: 0.0981464027646874
new: 0.029927007299270073
path: .spaces[0].metrics.halstead.purity_ratio
old: 3.1606234657012178
new: 0.7633371423618172
path: .spaces[0].metrics.halstead.volume
old: 23060.442716960955
new: 2378.2256723627174
path: .spaces[0].metrics.halstead.vocabulary
old: 796.0
new: 61.0
path: .spaces[0].metrics.halstead.bugs
old: 1.2692317125174897
new: 0.6161293927379173
path: .spaces[0].metrics.halstead.N1
old: 1332.0
new: 264.0
path: .spaces[0].metrics.halstead.n1
old: 15.0
new: 20.0
path: .spaces[0].metrics.halstead.n2
old: 781.0
new: 41.0
path: .spaces[0].metrics.halstead.time
old: 13053.31291223622
new: 4414.863375524285
path: .spaces[0].metrics.halstead.effort
old: 234959.63242025196
new: 79467.54075943714
path: .spaces[0].metrics.halstead.length
old: 2393.0
new: 401.0
path: .spaces[0].metrics.halstead.N2
old: 1061.0
new: 137.0
path: .spaces[0].metrics.loc.cloc
old: 91.0
new: 46.0
path: .spaces[0].metrics.loc.lloc
old: 10.0
new: 20.0
path: .spaces[0].metrics.loc.blank
old: 67.0
new: 29.0
path: .spaces[0].metrics.loc.ploc
old: 552.0
new: 101.0
path: .spaces[0].metrics.loc.sloc
old: 710.0
new: 176.0
path: .spaces[0].metrics.mi.mi_sei
old: -38.1443252127847
new: 20.063894845536034
path: .spaces[0].metrics.mi.mi_original
old: 5.734162726406851
new: 39.452787421736545
path: .spaces[0].metrics.mi.mi_visual_studio
old: 3.353311535910439
new: 23.071805509787453

### Code

    namespace mozilla {

    // A RWLock is similar to a Mutex, but whereas a Mutex permits only a single
    // reader thread or a single writer thread to access a piece of data, a
    // RWLock distinguishes between readers and writers: you may have multiple
    // reader threads concurrently accessing a piece of data or a single writer
    // thread.  This difference should guide your usage of RWLock: if you are not
    // reading the data from multiple threads simultaneously or you are writing
    // to the data roughly as often as read from it, then Mutex will suit your
    // purposes just fine.
    //
    // You should be using the AutoReadLock and AutoWriteLock classes, below,
    // for RAII read locking and write locking, respectively.  If you really must
    // take a read lock manually, call the ReadLock method; to relinquish that
    // read lock, call the ReadUnlock method.  Similarly, WriteLock and WriteUnlock
    // perform the same operations, but for write locks.
    //
    // It is unspecified what happens when a given thread attempts to acquire the
    // same lock in multiple ways; some underlying implementations of RWLock do
    // support acquiring a read lock multiple times on a given thread, but you
    // should not rely on this behavior.
    //
    // It is unspecified whether RWLock gives priority to waiting readers or
    // a waiting writer when unlocking.
    class RWLock : public BlockingResourceBase {
     public:
      explicit RWLock(const char* aName);

      // Windows rwlocks don't need any special handling to be destroyed, but
      // POSIX ones do.
    #ifdef XP_WIN
      ~RWLock() = default;
    #else
      ~RWLock();
    #endif

    #ifdef DEBUG
      bool LockedForWritingByCurrentThread();
      void ReadLock();
      void ReadUnlock();
      void WriteLock();
      void WriteUnlock();
    #else
      void ReadLock() { ReadLockInternal(); }
      void ReadUnlock() { ReadUnlockInternal(); }
      void WriteLock() { WriteLockInternal(); }
      void WriteUnlock() { WriteUnlockInternal(); }
    #endif

     private:
      void ReadLockInternal();
      void ReadUnlockInternal();
      void WriteLockInternal();
      void WriteUnlockInternal();

      RWLock() = delete;
      RWLock(const RWLock&) = delete;
      RWLock& operator=(const RWLock&) = delete;

    #ifndef XP_WIN
      pthread_rwlock_t mRWLock;
    #else
      // SRWLock is pointer-sized.  We declare it in such a fashion here to
      // avoid pulling in windows.h wherever this header is used.
      void* mRWLock;
    #endif

    #ifdef DEBUG
      // We record the owning thread for write locks only.
      PRThread* mOwningThread;
    #endif
    };

    template
    class MOZ_RAII BaseAutoReadLock {
     public:
      explicit BaseAutoReadLock(T& aLock) : mLock(&aLock) {
        MOZ_ASSERT(mLock, "null lock");
        mLock->ReadLock();
      }

      ~BaseAutoReadLock() { mLock->ReadUnlock(); }

     private:
      BaseAutoReadLock() = delete;
      BaseAutoReadLock(const BaseAutoReadLock&) = delete;
      BaseAutoReadLock& operator=(const BaseAutoReadLock&) = delete;

      T* mLock;
    };

    template
    class MOZ_RAII BaseAutoWriteLock final {
     public:
      explicit BaseAutoWriteLock(T& aLock) : mLock(&aLock) {
        MOZ_ASSERT(mLock, "null lock");
        mLock->WriteLock();
      }

      ~BaseAutoWriteLock() { mLock->WriteUnlock(); }

     private:
      BaseAutoWriteLock() = delete;
      BaseAutoWriteLock(const BaseAutoWriteLock&) = delete;
      BaseAutoWriteLock& operator=(const BaseAutoWriteLock&) = delete;

      T* mLock;
    };

    // Read lock and unlock a RWLock with RAII semantics.  Much preferred to bare
    // calls to ReadLock() and ReadUnlock().
    typedef BaseAutoReadLock AutoReadLock;

    // Write lock and unlock a RWLock with RAII semantics.  Much preferred to bare
    // calls to WriteLock() and WriteUnlock().
    typedef BaseAutoWriteLock AutoWriteLock;

    // XXX: normally we would define StaticRWLock as
    // MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS, but the contexts in which it
    // is used (e.g. member variables in a third-party library) are non-trivial
    // to modify to properly declare everything at static scope.  As those
    // third-party libraries are the only clients, put it behind the detail
    // namespace to discourage other (possibly erroneous) uses from popping up.

    namespace detail {

    class StaticRWLock {
     public:
      // In debug builds, check that mLock is initialized for us as we expect by
      // the compiler.  In non-debug builds, don't declare a constructor so that
      // the compiler can see that the constructor is trivial.
    #ifdef DEBUG
      StaticRWLock() { MOZ_ASSERT(!mLock); }
    #endif

      void ReadLock() { Lock()->ReadLock(); }
      void ReadUnlock() { Lock()->ReadUnlock(); }
      void WriteLock() { Lock()->WriteLock(); }
      void WriteUnlock() { Lock()->WriteUnlock(); }

     private:
      RWLock* Lock() {
        if (mLock) {
          return mLock;
        }

        RWLock* lock = new RWLock("StaticRWLock");
        if (!mLock.compareExchange(nullptr, lock)) {
          delete lock;
        }

        return mLock;
      }

      Atomic mLock;

      // Disallow copy constructor, but only in debug mode.  We only define
      // a default constructor in debug mode (see above); if we declared
      // this constructor always, the compiler wouldn't generate a trivial
      // default constructor for us in non-debug mode.
    #ifdef DEBUG
      StaticRWLock(const StaticRWLock& aOther);
    #endif

      // Disallow these operators.
      StaticRWLock& operator=(StaticRWLock* aRhs);
      static void* operator new(size_t) noexcept(true);
      static void operator delete(void*);
    };

    typedef BaseAutoReadLock StaticAutoReadLock;
    typedef BaseAutoWriteLock StaticAutoWriteLock;

    }  // namespace detail

    }  // namespace mozilla

## Minimal test - lines (94, 109)

path: .spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 72.0907368131057
new: 56.12831909173469
path: .spaces[0].spaces[1].metrics.mi.mi_original
old: 123.27515995041075
new: 95.97942564686632
path: .spaces[0].spaces[1].metrics.mi.mi_sei
old: 102.24942979264311
new: 63.37910857251906
path: .spaces[0].spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].spaces[1].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[1].metrics.nargs.average
old: null
new: 0.4
path: .spaces[0].spaces[1].metrics.nom.functions
old: 0.0
new: 5.0
path: .spaces[0].spaces[1].metrics.nom.total
old: 0.0
new: 5.0
path: .spaces[0].spaces[1].metrics.loc.ploc
old: 6.0
new: 13.0
path: .spaces[0].spaces[1].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].spaces[1].metrics.loc.sloc
old: 6.0
new: 16.0
path: .spaces[0].spaces[1].metrics.loc.blank
old: 0.0
new: 3.0
path: .spaces[0].spaces[1].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[1].metrics.cyclomatic.sum
old: 1.0
new: 6.0
path: .spaces[0].spaces[1].metrics.halstead.n1
old: 4.0
new: 11.0
path: .spaces[0].spaces[1].metrics.halstead.level
old: 0.5
new: 0.06926406926406926
path: .spaces[0].spaces[1].metrics.halstead.bugs
old: 0.00564754704415116
new: 0.07856446355090686
path: .spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 19.60964047443681
new: 62.05374780501027
path: .spaces[0].spaces[1].metrics.halstead.n2
old: 5.0
new: 8.0
path: .spaces[0].spaces[1].metrics.halstead.vocabulary
old: 9.0
new: 19.0
path: .spaces[0].spaces[1].metrics.halstead.time
old: 3.874352779540604
new: 201.02431972473133
path: .spaces[0].spaces[1].metrics.halstead.difficulty
old: 2.0
new: 14.4375
path: .spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.7826945885851644
new: 1.0517584373730553
path: .spaces[0].spaces[1].metrics.halstead.effort
old: 69.73835003173087
new: 3618.437755045164
path: .spaces[0].spaces[1].metrics.halstead.volume
old: 34.86917501586544
new: 250.62772329317153
path: .spaces[0].spaces[1].metrics.halstead.length
old: 11.0
new: 59.0
path: .spaces[0].spaces[1].metrics.halstead.N1
old: 6.0
new: 38.0
path: .spaces[0].spaces[1].metrics.halstead.N2
old: 5.0
new: 21.0

### Code

    class MOZ_RAII BaseAutoReadLock {
     public:
      explicit BaseAutoReadLock(T& aLock) : mLock(&aLock) {
        MOZ_ASSERT(mLock, "null lock");
        mLock->ReadLock();
      }

      ~BaseAutoReadLock() { mLock->ReadUnlock(); }

     private:
      BaseAutoReadLock() = delete;
      BaseAutoReadLock(const BaseAutoReadLock&) = delete;
      BaseAutoReadLock& operator=(const BaseAutoReadLock&) = delete;

      T* mLock;
    };

## Minimal test - lines (112, 127)

path: .spaces[0].spaces[2].metrics.halstead.N2
old: 239.0
new: 21.0
path: .spaces[0].spaces[2].metrics.halstead.volume
old: 3795.985189227169
new: 250.62772329317153
path: .spaces[0].spaces[2].metrics.halstead.bugs
old: 0.12876023142100643
new: 0.07856446355090686
path: .spaces[0].spaces[2].metrics.halstead.n1
old: 4.0
new: 11.0
path: .spaces[0].spaces[2].metrics.halstead.N1
old: 240.0
new: 38.0
path: .spaces[0].spaces[2].metrics.halstead.effort
old: 7591.970378454338
new: 3618.437755045164
path: .spaces[0].spaces[2].metrics.halstead.difficulty
old: 2.0
new: 14.4375
path: .spaces[0].spaces[2].metrics.halstead.length
old: 479.0
new: 59.0
path: .spaces[0].spaces[2].metrics.halstead.vocabulary
old: 243.0
new: 19.0
path: .spaces[0].spaces[2].metrics.halstead.time
old: 421.7761321363521
new: 201.02431972473133
path: .spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: 1896.307167107399
new: 62.05374780501027
path: .spaces[0].spaces[2].metrics.halstead.level
old: 0.5
new: 0.06926406926406926
path: .spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 3.9588876140029208
new: 1.0517584373730553
path: .spaces[0].spaces[2].metrics.halstead.n2
old: 239.0
new: 8.0
path: .spaces[0].spaces[2].metrics.mi.mi_sei
old: -3.528079956498331
new: 63.37910857251906
path: .spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 29.213904854468584
new: 56.12831909173469
path: .spaces[0].spaces[2].metrics.mi.mi_original
old: 49.95577730114128
new: 95.97942564686632
path: .spaces[0].spaces[2].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].spaces[2].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].spaces[2].metrics.loc.sloc
old: 123.0
new: 16.0
path: .spaces[0].spaces[2].metrics.loc.ploc
old: 123.0
new: 13.0
path: .spaces[0].spaces[2].metrics.loc.blank
old: 0.0
new: 3.0
path: .spaces[0].spaces[2].metrics.nom.functions
old: 0.0
new: 5.0
path: .spaces[0].spaces[2].metrics.nom.total
old: 0.0
new: 5.0
path: .spaces[0].spaces[2].metrics.nargs.average
old: null
new: 0.4
path: .spaces[0].spaces[2].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[2].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[2].metrics.cyclomatic.sum
old: 1.0
new: 6.0

### Code

    class MOZ_RAII BaseAutoWriteLock final {
     public:
      explicit BaseAutoWriteLock(T& aLock) : mLock(&aLock) {
        MOZ_ASSERT(mLock, "null lock");
        mLock->WriteLock();
      }

      ~BaseAutoWriteLock() { mLock->WriteUnlock(); }

     private:
      BaseAutoWriteLock() = delete;
      BaseAutoWriteLock(const BaseAutoWriteLock&) = delete;
      BaseAutoWriteLock& operator=(const BaseAutoWriteLock&) = delete;

      T* mLock;
    };

## Minimal test - lines (144, 193)

path: .spaces[0].spaces[3].metrics.nexits.average
old: null
new: 0.3333333333333333
path: .spaces[0].spaces[3].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[3].metrics.mi.mi_visual_studio
old: 22.201597100246907
new: 41.48405008932402
path: .spaces[0].spaces[3].metrics.mi.mi_sei
old: -20.827502930465172
new: 56.697477639345216
path: .spaces[0].spaces[3].metrics.mi.mi_original
old: 37.96473104142221
new: 70.93772565274408
path: .spaces[0].spaces[3].metrics.loc.ploc
old: 210.0
new: 32.0
path: .spaces[0].spaces[3].metrics.loc.lloc
old: 0.0
new: 10.0
path: .spaces[0].spaces[3].metrics.loc.blank
old: 0.0
new: 10.0
path: .spaces[0].spaces[3].metrics.loc.sloc
old: 210.0
new: 50.0
path: .spaces[0].spaces[3].metrics.loc.cloc
old: 0.0
new: 8.0
path: .spaces[0].spaces[3].metrics.cyclomatic.average
old: 1.0
new: 1.25
path: .spaces[0].spaces[3].metrics.cyclomatic.sum
old: 1.0
new: 10.0
path: .spaces[0].spaces[3].metrics.halstead.purity_ratio
old: 4.337168340023562
new: 1.288493345433618
path: .spaces[0].spaces[3].metrics.halstead.N1
old: 414.0
new: 90.0
path: .spaces[0].spaces[3].metrics.halstead.estimated_program_length
old: 3586.838217199486
new: 179.1005750152729
path: .spaces[0].spaces[3].metrics.halstead.level
old: 0.4987893462469733
new: 0.05215419501133787
path: .spaces[0].spaces[3].metrics.halstead.time
old: 801.414208783929
new: 793.267102248995
path: .spaces[0].spaces[3].metrics.halstead.vocabulary
old: 416.0
new: 41.0
path: .spaces[0].spaces[3].metrics.halstead.N2
old: 413.0
new: 49.0
path: .spaces[0].spaces[3].metrics.halstead.effort
old: 14425.455758110722
new: 14278.80784048191
path: .spaces[0].spaces[3].metrics.halstead.n2
old: 412.0
new: 23.0
path: .spaces[0].spaces[3].metrics.halstead.bugs
old: 0.19752941341334687
new: 0.19618842377626552
path: .spaces[0].spaces[3].metrics.halstead.length
old: 827.0
new: 139.0
path: .spaces[0].spaces[3].metrics.halstead.n1
old: 4.0
new: 18.0
path: .spaces[0].spaces[3].metrics.halstead.volume
old: 7195.263646902684
new: 744.6997286419137
path: .spaces[0].spaces[3].metrics.halstead.difficulty
old: 2.004854368932039
new: 19.17391304347826
path: .spaces[0].spaces[3].metrics.nargs.average
old: null
new: 0.0
path: .spaces[0].spaces[3].metrics.cognitive.average
old: null
new: 0.3333333333333333
path: .spaces[0].spaces[3].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[0].spaces[3].metrics.nom.functions
old: 0.0
new: 6.0
path: .spaces[0].spaces[3].metrics.nom.total
old: 0.0
new: 6.0

### Code

    namespace detail {

    class StaticRWLock {
     public:
      // In debug builds, check that mLock is initialized for us as we expect by
      // the compiler.  In non-debug builds, don't declare a constructor so that
      // the compiler can see that the constructor is trivial.
    #ifdef DEBUG
      StaticRWLock() { MOZ_ASSERT(!mLock); }
    #endif

      void ReadLock() { Lock()->ReadLock(); }
      void ReadUnlock() { Lock()->ReadUnlock(); }
      void WriteLock() { Lock()->WriteLock(); }
      void WriteUnlock() { Lock()->WriteUnlock(); }

     private:
      RWLock* Lock() {
        if (mLock) {
          return mLock;
        }

        RWLock* lock = new RWLock("StaticRWLock");
        if (!mLock.compareExchange(nullptr, lock)) {
          delete lock;
        }

        return mLock;
      }

      Atomic mLock;

      // Disallow copy constructor, but only in debug mode.  We only define
      // a default constructor in debug mode (see above); if we declared
      // this constructor always, the compiler wouldn't generate a trivial
      // default constructor for us in non-debug mode.
    #ifdef DEBUG
      StaticRWLock(const StaticRWLock& aOther);
    #endif

      // Disallow these operators.
      StaticRWLock& operator=(StaticRWLock* aRhs);
      static void* operator new(size_t) noexcept(true);
      static void operator delete(void*);
    };

    typedef BaseAutoReadLock StaticAutoReadLock;
    typedef BaseAutoWriteLock StaticAutoWriteLock;

    }  // namespace detail