# Global Metrics

path: .metrics.nom.functions
old: 1.0
new: 6.0
path: .metrics.nom.total
old: 1.0
new: 6.0
path: .metrics.mi.mi_sei
old: 65.72497387111622
new: 46.27784756621326
path: .metrics.mi.mi_original
old: 75.2118604309625
new: 60.64198186909162
path: .metrics.mi.mi_visual_studio
old: 43.98354411167398
new: 35.46314729186645
path: .metrics.nargs.sum
old: 0.0
new: 4.0
path: .metrics.nargs.average
old: 0.0
new: 0.6666666666666666
path: .metrics.loc.blank
old: 14.0
new: 10.0
path: .metrics.loc.cloc
old: 10.0
new: 16.0
path: .metrics.loc.sloc
old: 49.0
new: 73.0
path: .metrics.loc.lloc
old: 0.0
new: 12.0
path: .metrics.loc.ploc
old: 25.0
new: 47.0
path: .metrics.nexits.sum
old: 0.0
new: 4.0
path: .metrics.nexits.average
old: 0.0
new: 0.6666666666666666
path: .metrics.cyclomatic.average
old: 1.0
new: 1.4444444444444444
path: .metrics.cyclomatic.sum
old: 7.0
new: 13.0
path: .metrics.halstead.difficulty
old: 8.5
new: 29.78205128205128
path: .metrics.halstead.bugs
old: 0.07512906913006362
new: 0.41082525525871766
path: .metrics.halstead.estimated_program_length
old: 153.0586500259616
new: 310.172611524939
path: .metrics.halstead.level
old: 0.1176470588235294
new: 0.03357727077055532
path: .metrics.halstead.purity_ratio
old: 1.987774675661839
new: 1.2711992275612254
path: .metrics.halstead.vocabulary
old: 36.0
new: 62.0
path: .metrics.halstead.n2
old: 24.0
new: 39.0
path: .metrics.halstead.volume
old: 398.08422511105806
new: 1452.8238997343974
path: .metrics.halstead.N1
old: 43.0
new: 143.0
path: .metrics.halstead.n1
old: 12.0
new: 23.0
path: .metrics.halstead.effort
old: 3383.7159134439935
new: 43268.07588567955
path: .metrics.halstead.time
old: 187.9842174135552
new: 2403.781993648864
path: .metrics.halstead.length
old: 77.0
new: 244.0
path: .metrics.halstead.N2
old: 34.0
new: 101.0
path: .metrics.cognitive.average
old: 0.0
new: 1.6666666666666667
path: .metrics.cognitive.sum
old: 0.0
new: 10.0

# Spaces Data

## Minimal test - lines (43, 46)

path: .spaces[0].spaces[0].spaces[2].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_sei
old: 69.92533498063543
new: 108.99357265873246
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: 52.51320461547946
new: 74.82446992007843
path: .spaces[0].spaces[0].spaces[2].metrics.mi.mi_original
old: 89.79757989246988
new: 127.9498435633341
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.effort
old: 2603.2997875211877
new: 175.66316253533665
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.level
old: 0.12179487179487178
new: 0.2857142857142857
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.bugs
old: 0.06308046226130687
new: 0.010455204778755302
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.N1
old: 38.0
new: 7.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.length
old: 64.0
new: 14.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.time
old: 144.6277659733993
new: 9.75906458529648
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.n1
old: 12.0
new: 6.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.n2
old: 19.0
new: 6.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.vocabulary
old: 31.0
new: 12.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.N2
old: 26.0
new: 7.0
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.difficulty
old: 8.210526315789474
new: 3.5
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: 123.730172764082
new: 31.019550008653873
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.purity_ratio
old: 1.9332839494387812
new: 2.2156821434752767
path: .spaces[0].spaces[0].spaces[2].metrics.halstead.volume
old: 317.06856386476
new: 50.18947501009619
path: .spaces[0].spaces[0].spaces[2].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.ploc
old: 14.0
new: 4.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.sloc
old: 23.0
new: 4.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[2].metrics.loc.blank
old: 8.0
new: 0.0

### Code

      ATTRIBUTE_NO_SANITIZE_ALL
      inline bool AddValueModPrime(uintptr_t Value) {
        return AddValue(Value % kMapPrimeMod);
      }

## Minimal test - lines (32, 41)

path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 0.0
new: 3000.645538008283
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 1.0
new: 25.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 1.0
new: 56.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 0.0
new: 260.05594662738457
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 1.0
new: 25.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 1.0
new: 13.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 0.0
new: 11.538461538461538
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n1
old: 0.0
new: 12.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 0.0
new: 31.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: null
new: 0.08666666666666667
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 0.0
new: 166.70252988934908
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.0
new: 0.06934607354629772
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: null
new: 91.12526634448808
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: null
new: 1.6272368990087156
path: .spaces[0].spaces[0].spaces[1].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_sei
old: null
new: 75.23683813029392
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: null
new: 104.55145820003636
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: null
new: 61.141203625752254
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.average
old: null
new: 1.0
path: .spaces[0].spaces[0].spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.sloc
old: 1.0
new: 10.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.ploc
old: 1.0
new: 10.0

### Code

      ATTRIBUTE_NO_SANITIZE_ALL
      inline bool AddValue(uintptr_t Value) {
        uintptr_t Idx = Value % kMapSizeInBits;
        uintptr_t WordIdx = Idx / kBitsInWord;
        uintptr_t BitIdx = Idx % kBitsInWord;
        uintptr_t Old = Map[WordIdx];
        uintptr_t New = Old | (1ULL << BitIdx);
        Map[WordIdx] = New;
        return New != Old;
      }

## Minimal test - lines (20, 69)

path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 0.0
new: 4.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 1.0
new: 6.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 1.0
new: 6.0
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 0.0
new: 10.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 0.0
new: 1.6666666666666667
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 11.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.5714285714285714
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 59.27265730407104
new: 43.907379121650706
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 48.93824256261314
new: 39.42981741614884
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 83.68439478206847
new: 67.42498778161452
path: .spaces[0].spaces[0].metrics.halstead.time
old: 171.58333333333331
new: 2410.1497230432497
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 3088.4999999999995
new: 43382.695014778496
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 29.0
new: 97.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 71.0
new: 238.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.07069311994181326
new: 0.41155046534398654
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 8.7
new: 30.98611111111111
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 42.0
new: 141.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 20.0
new: 36.0
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 32.0
new: 59.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.823353688822551
new: 1.2191564077362795
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 12.0
new: 23.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 129.45811190640111
new: 290.15922504123455
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.1149425287356322
new: 0.03227252353204841
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 355.0
new: 1400.0690457481182
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 0.0
new: 12.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 18.0
new: 40.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 12.0
new: 6.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 31.0
new: 50.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 1.0
new: 4.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 0.0
new: 4.0

### Code

    struct ValueBitMap {
      static const size_t kMapSizeInBits = 1 << 16;
      static const size_t kMapPrimeMod = 65371;  // Largest Prime < kMapSizeInBits;
      static const size_t kBitsInWord = (sizeof(uintptr_t) * 8);
      static const size_t kMapSizeInWords = kMapSizeInBits / kBitsInWord;
     public:

      // Clears all bits.
      void Reset() { memset(Map, 0, sizeof(Map)); }

      // Computes a hash function of Value and sets the corresponding bit.
      // Returns true if the bit was changed from 0 to 1.
      ATTRIBUTE_NO_SANITIZE_ALL
      inline bool AddValue(uintptr_t Value) {
        uintptr_t Idx = Value % kMapSizeInBits;
        uintptr_t WordIdx = Idx / kBitsInWord;
        uintptr_t BitIdx = Idx % kBitsInWord;
        uintptr_t Old = Map[WordIdx];
        uintptr_t New = Old | (1ULL << BitIdx);
        Map[WordIdx] = New;
        return New != Old;
      }

      ATTRIBUTE_NO_SANITIZE_ALL
      inline bool AddValueModPrime(uintptr_t Value) {
        return AddValue(Value % kMapPrimeMod);
      }

      inline bool Get(uintptr_t Idx) {
        assert(Idx < kMapSizeInBits);
        uintptr_t WordIdx = Idx / kBitsInWord;
        uintptr_t BitIdx = Idx % kBitsInWord;
        return Map[WordIdx] & (1ULL << BitIdx);
      }

      size_t SizeInBits() const { return kMapSizeInBits; }

      template
      ATTRIBUTE_NO_SANITIZE_ALL
      void ForEach(Callback CB) const {
        for (size_t i = 0; i < kMapSizeInWords; i++)
          if (uintptr_t M = Map[i])
            for (size_t j = 0; j < sizeof(M) * 8; j++)
              if (M & ((uintptr_t)1 << j))
                CB(i * sizeof(M) * 8 + j);
      }

     private:
      ATTRIBUTE_ALIGNED(512) uintptr_t Map[kMapSizeInWords];
    };

## Minimal test - lines (17, 71)

path: .spaces[0].metrics.halstead.level
old: 0.11666666666666668
new: 0.032830523513753325
path: .spaces[0].metrics.halstead.bugs
old: 0.0717247097455097
new: 0.4114125350186326
path: .spaces[0].metrics.halstead.N2
old: 30.0
new: 98.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 135.25821588700785
new: 296.79169951758246
path: .spaces[0].metrics.halstead.difficulty
old: 8.571428571428571
new: 30.45945945945946
path: .spaces[0].metrics.halstead.volume
old: 368.2407707131671
new: 1423.560633541653
path: .spaces[0].metrics.halstead.n1
old: 12.0
new: 23.0
path: .spaces[0].metrics.halstead.time
old: 175.35274795865098
new: 2408.938189191356
path: .spaces[0].metrics.halstead.effort
old: 3156.3494632557176
new: 43360.8874054444
path: .spaces[0].metrics.halstead.n2
old: 21.0
new: 37.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8528522724247651
new: 1.2315008278737862
path: .spaces[0].metrics.halstead.N1
old: 43.0
new: 143.0
path: .spaces[0].metrics.halstead.length
old: 73.0
new: 241.0
path: .spaces[0].metrics.halstead.vocabulary
old: 33.0
new: 60.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 6.0
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 6.0
path: .spaces[0].metrics.nexits.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 4.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: 1.6666666666666667
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 10.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.5
path: .spaces[0].metrics.cyclomatic.sum
old: 6.0
new: 12.0
path: .spaces[0].metrics.loc.blank
old: 11.0
new: 8.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 12.0
path: .spaces[0].metrics.loc.sloc
old: 33.0
new: 55.0
path: .spaces[0].metrics.loc.ploc
old: 20.0
new: 42.0
path: .spaces[0].metrics.loc.cloc
old: 2.0
new: 5.0
path: .spaces[0].metrics.mi.mi_original
old: 82.25114514339343
new: 65.56443659662736
path: .spaces[0].metrics.mi.mi_sei
old: 62.18370371527456
new: 42.62538740451799
path: .spaces[0].metrics.mi.mi_visual_studio
old: 48.10008487917744
new: 38.341775787501376
path: .spaces[0].metrics.nargs.average
old: 0.0
new: 0.6666666666666666
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 4.0

### Code

    namespace fuzzer {

    // A bit map containing kMapSizeInWords bits.
    struct ValueBitMap {
      static const size_t kMapSizeInBits = 1 << 16;
      static const size_t kMapPrimeMod = 65371;  // Largest Prime < kMapSizeInBits;
      static const size_t kBitsInWord = (sizeof(uintptr_t) * 8);
      static const size_t kMapSizeInWords = kMapSizeInBits / kBitsInWord;
     public:

      // Clears all bits.
      void Reset() { memset(Map, 0, sizeof(Map)); }

      // Computes a hash function of Value and sets the corresponding bit.
      // Returns true if the bit was changed from 0 to 1.
      ATTRIBUTE_NO_SANITIZE_ALL
      inline bool AddValue(uintptr_t Value) {
        uintptr_t Idx = Value % kMapSizeInBits;
        uintptr_t WordIdx = Idx / kBitsInWord;
        uintptr_t BitIdx = Idx % kBitsInWord;
        uintptr_t Old = Map[WordIdx];
        uintptr_t New = Old | (1ULL << BitIdx);
        Map[WordIdx] = New;
        return New != Old;
      }

      ATTRIBUTE_NO_SANITIZE_ALL
      inline bool AddValueModPrime(uintptr_t Value) {
        return AddValue(Value % kMapPrimeMod);
      }

      inline bool Get(uintptr_t Idx) {
        assert(Idx < kMapSizeInBits);
        uintptr_t WordIdx = Idx / kBitsInWord;
        uintptr_t BitIdx = Idx % kBitsInWord;
        return Map[WordIdx] & (1ULL << BitIdx);
      }

      size_t SizeInBits() const { return kMapSizeInBits; }

      template
      ATTRIBUTE_NO_SANITIZE_ALL
      void ForEach(Callback CB) const {
        for (size_t i = 0; i < kMapSizeInWords; i++)
          if (uintptr_t M = Map[i])
            for (size_t j = 0; j < sizeof(M) * 8; j++)
              if (M & ((uintptr_t)1 << j))
                CB(i * sizeof(M) * 8 + j);
      }

     private:
      ATTRIBUTE_ALIGNED(512) uintptr_t Map[kMapSizeInWords];
    };

    }  // namespace fuzzer

## Minimal test - lines (28, 28)

path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: null
new: 141.96524600794845
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: null
new: 150.80406598368663
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: null
new: 88.18951227116177
path: .spaces[0].spaces[0].spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.average
old: null
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 10.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 1.0
new: 5.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.6792696431662095
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 0.0
new: 3.75
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 0.0
new: 9.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 0.0
new: 46.50699332842307
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 0.0
new: 9.688956943421474
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 0.0
new: 174.40122498158652
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: null
new: 23.509775004326936
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 0.0
new: 6.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 1.0
new: 4.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 1.0
new: 14.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: null
new: 0.26666666666666666
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.010405072229378904
path: .spaces[0].spaces[0].spaces[0].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.nexits.average
old: null
new: 0.0

### Code

      void Reset() { memset(Map, 0, sizeof(Map)); }