# Global Metrics

path: .metrics.nargs.sum
old: 9.0
new: 23.0
path: .metrics.nargs.average
old: 3.0
new: 1.9166666666666667
path: .metrics.nexits.average
old: 2.0
new: 0.5
path: .metrics.cognitive.average
old: 3.0
new: 0.0
path: .metrics.cognitive.sum
old: 9.0
new: 0.0
path: .metrics.mi.mi_original
old: 57.627987209234945
new: 43.211565485024465
path: .metrics.mi.mi_sei
old: 40.94768243251523
new: 15.851006519966385
path: .metrics.mi.mi_visual_studio
old: 33.70057731534207
new: 25.26992133627162
path: .metrics.cyclomatic.sum
old: 11.0
new: 14.0
path: .metrics.cyclomatic.average
old: 2.2
new: 1.0
path: .metrics.halstead.n2
old: 55.0
new: 50.0
path: .metrics.halstead.level
old: 0.045118949958982774
new: 0.024900398406374504
path: .metrics.halstead.difficulty
old: 22.163636363636364
new: 40.16
path: .metrics.halstead.purity_ratio
old: 1.6169222575983433
new: 0.5958568149547955
path: .metrics.halstead.volume
old: 1640.4899791230469
new: 3511.7929833472613
path: .metrics.halstead.bugs
old: 0.3658377162328646
new: 0.9031512469589652
path: .metrics.halstead.vocabulary
old: 78.0
new: 66.0
path: .metrics.halstead.time
old: 2019.956853081812
new: 7835.200345068111
path: .metrics.halstead.length
old: 261.0
new: 581.0
path: .metrics.halstead.n1
old: 23.0
new: 16.0
path: .metrics.halstead.effort
old: 36359.22335547262
new: 141033.606211226
path: .metrics.halstead.estimated_program_length
old: 422.0167092331676
new: 346.1928094887362
path: .metrics.halstead.N2
old: 106.0
new: 251.0
path: .metrics.halstead.N1
old: 155.0
new: 330.0
path: .metrics.nom.functions
old: 3.0
new: 12.0
path: .metrics.nom.total
old: 3.0
new: 12.0
path: .metrics.loc.ploc
old: 56.0
new: 101.0
path: .metrics.loc.sloc
old: 87.0
new: 159.0
path: .metrics.loc.lloc
old: 14.0
new: 7.0
path: .metrics.loc.blank
old: 13.0
new: 35.0
path: .metrics.loc.cloc
old: 18.0
new: 23.0

# Spaces Data

## Minimal test - lines (105, 109)

path: .spaces[1].metrics.mi.mi_original
old: 91.88105114549484
new: 118.78422603682928
path: .spaces[1].metrics.mi.mi_visual_studio
old: 53.73160885701453
new: 69.46445967066039
path: .spaces[1].metrics.mi.mi_sei
old: 57.26276428487573
new: 95.770381706559
path: .spaces[1].metrics.nexits.average
old: 2.0
new: 1.0
path: .spaces[1].metrics.nexits.sum
old: 2.0
new: 1.0
path: .spaces[1].metrics.loc.lloc
old: 6.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 16.0
new: 5.0
path: .spaces[1].metrics.loc.sloc
old: 17.0
new: 5.0
path: .spaces[1].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[1].metrics.cognitive.sum
old: 6.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 6.0
new: 0.0
path: .spaces[1].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.sum
old: 4.0
new: 1.0
path: .spaces[1].metrics.halstead.N2
old: 39.0
new: 14.0
path: .spaces[1].metrics.halstead.effort
old: 7870.017010339148
new: 1277.039531691708
path: .spaces[1].metrics.halstead.length
old: 95.0
new: 35.0
path: .spaces[1].metrics.halstead.time
old: 437.2231672410638
new: 70.94664064953935
path: .spaces[1].metrics.halstead.n1
old: 17.0
new: 10.0
path: .spaces[1].metrics.halstead.n2
old: 21.0
new: 8.0
path: .spaces[1].metrics.halstead.level
old: 0.06334841628959276
new: 0.11428571428571428
path: .spaces[1].metrics.halstead.difficulty
old: 15.785714285714286
new: 8.75
path: .spaces[1].metrics.halstead.estimated_program_length
old: 161.72553417960972
new: 57.219280948873624
path: .spaces[1].metrics.halstead.N1
old: 56.0
new: 21.0
path: .spaces[1].metrics.halstead.volume
old: 498.5531137771406
new: 145.94737505048093
path: .spaces[1].metrics.halstead.bugs
old: 0.13188513836619772
new: 0.03923572116870908
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.702374043995892
new: 1.6348365985392463
path: .spaces[1].metrics.halstead.vocabulary
old: 38.0
new: 18.0

### Code

    inline const nsTDependentSubstring Substring(
        const nsTSubstring& aStr, uint32_t aStartPos,
        uint32_t aLength = uint32_t(-1)) {
      return nsTDependentSubstring(aStr, aStartPos, aLength);
    }

## Minimal test - lines (112, 116)

path: .spaces[2].metrics.nargs.sum
old: 4.0
new: 3.0
path: .spaces[2].metrics.nargs.average
old: 4.0
new: 3.0
path: .spaces[2].metrics.halstead.N2
old: 39.0
new: 14.0
path: .spaces[2].metrics.halstead.bugs
old: 0.09533609085276404
new: 0.03923572116870908
path: .spaces[2].metrics.halstead.n1
old: 14.0
new: 10.0
path: .spaces[2].metrics.halstead.length
old: 92.0
new: 35.0
path: .spaces[2].metrics.halstead.vocabulary
old: 42.0
new: 18.0
path: .spaces[2].metrics.halstead.estimated_program_length
old: 187.90890672641936
new: 57.219280948873624
path: .spaces[2].metrics.halstead.difficulty
old: 9.75
new: 8.75
path: .spaces[2].metrics.halstead.n2
old: 28.0
new: 8.0
path: .spaces[2].metrics.halstead.time
old: 268.7171515684749
new: 70.94664064953935
path: .spaces[2].metrics.halstead.purity_ratio
old: 2.0424881165915147
new: 1.6348365985392463
path: .spaces[2].metrics.halstead.volume
old: 496.0932028956459
new: 145.94737505048093
path: .spaces[2].metrics.halstead.N1
old: 53.0
new: 21.0
path: .spaces[2].metrics.halstead.level
old: 0.10256410256410256
new: 0.11428571428571428
path: .spaces[2].metrics.halstead.effort
old: 4836.908728232548
new: 1277.039531691708
path: .spaces[2].metrics.cognitive.average
old: 3.0
new: 0.0
path: .spaces[2].metrics.cognitive.sum
old: 3.0
new: 0.0
path: .spaces[2].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[2].metrics.cyclomatic.sum
old: 4.0
new: 1.0
path: .spaces[2].metrics.nexits.sum
old: 3.0
new: 1.0
path: .spaces[2].metrics.nexits.average
old: 3.0
new: 1.0
path: .spaces[2].metrics.mi.mi_original
old: 84.41227091642253
new: 118.78422603682928
path: .spaces[2].metrics.mi.mi_visual_studio
old: 49.36390112071493
new: 69.46445967066039
path: .spaces[2].metrics.mi.mi_sei
old: 79.84212864592914
new: 95.770381706559
path: .spaces[2].metrics.loc.lloc
old: 7.0
new: 1.0
path: .spaces[2].metrics.loc.sloc
old: 27.0
new: 5.0
path: .spaces[2].metrics.loc.ploc
old: 18.0
new: 5.0
path: .spaces[2].metrics.loc.cloc
old: 6.0
new: 0.0
path: .spaces[2].metrics.loc.blank
old: 3.0
new: 0.0

### Code

    inline const nsTDependentSubstring Substring(
        const nsTLiteralString& aStr, uint32_t aStartPos,
        uint32_t aLength = uint32_t(-1)) {
      return nsTDependentSubstring(aStr, aStartPos, aLength);
    }

## Minimal test - lines (119, 122)

path: .spaces[3].metrics.halstead.time
old: 24.818313566005124
new: 77.14285714285714
path: .spaces[3].metrics.halstead.difficulty
old: 5.333333333333333
new: 9.642857142857142
path: .spaces[3].metrics.halstead.bugs
old: 0.019479385850283696
new: 0.04148816518348825
path: .spaces[3].metrics.halstead.N2
old: 8.0
new: 15.0
path: .spaces[3].metrics.halstead.purity_ratio
old: 1.7958988638330426
new: 1.3383558185384454
path: .spaces[3].metrics.halstead.N1
old: 14.0
new: 21.0
path: .spaces[3].metrics.halstead.vocabulary
old: 14.0
new: 16.0
path: .spaces[3].metrics.halstead.n1
old: 8.0
new: 9.0
path: .spaces[3].metrics.halstead.estimated_program_length
old: 39.50977500432694
new: 48.18080946738404
path: .spaces[3].metrics.halstead.effort
old: 446.7296441880922
new: 1388.5714285714284
path: .spaces[3].metrics.halstead.volume
old: 83.76180828526729
new: 144.0
path: .spaces[3].metrics.halstead.length
old: 22.0
new: 36.0
path: .spaces[3].metrics.halstead.level
old: 0.1875
new: 0.10370370370370371
path: .spaces[3].metrics.halstead.n2
old: 6.0
new: 7.0
path: .spaces[3].metrics.loc.sloc
old: 3.0
new: 4.0
path: .spaces[3].metrics.loc.ploc
old: 3.0
new: 4.0
path: .spaces[3].metrics.mi.mi_visual_studio
old: 75.99239749499792
new: 71.61929952752197
path: .spaces[3].metrics.mi.mi_original
old: 129.94699971644644
new: 122.4690021920626
path: .spaces[3].metrics.mi.mi_sei
old: 111.8748599367085
new: 101.0863899925

### Code

    inline const nsTDependentSubstring Substring(
        const nsReadingIterator& aStart, const nsReadingIterator& aEnd) {
      return nsTDependentSubstring(aStart.get(), aEnd.get());
    }

## Minimal test - lines (27, 99)

path: .spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.mi.mi_sei
old: 113.35207426654748
new: 35.386831626439744
path: .spaces[0].metrics.mi.mi_original
old: 130.97092666425706
new: 61.61445878504669
path: .spaces[0].metrics.mi.mi_visual_studio
old: 76.59118518377606
new: 36.03184724271736
path: .spaces[0].metrics.halstead.vocabulary
old: 7.0
new: 51.0
path: .spaces[0].metrics.halstead.effort
old: 56.14709844115208
new: 36860.95296006104
path: .spaces[0].metrics.halstead.estimated_program_length
old: 12.754887502163468
new: 246.0527434370776
path: .spaces[0].metrics.halstead.time
old: 3.1192832467306713
new: 2047.8307200033912
path: .spaces[0].metrics.halstead.N1
old: 7.0
new: 153.0
path: .spaces[0].metrics.halstead.N2
old: 3.0
new: 124.0
path: .spaces[0].metrics.halstead.n1
old: 4.0
new: 14.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.2754887502163468
new: 0.8882770521194138
path: .spaces[0].metrics.halstead.bugs
old: 0.0048876146417121315
new: 0.369195544384877
path: .spaces[0].metrics.halstead.n2
old: 3.0
new: 37.0
path: .spaces[0].metrics.halstead.level
old: 0.5
new: 0.04262672811059908
path: .spaces[0].metrics.halstead.difficulty
old: 2.0
new: 23.45945945945946
path: .spaces[0].metrics.halstead.volume
old: 28.07354922057604
new: 1571.2618197261042
path: .spaces[0].metrics.halstead.length
old: 10.0
new: 277.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 4.0
new: 73.0
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 6.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 19.0
path: .spaces[0].metrics.loc.ploc
old: 4.0
new: 48.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 9.0
path: .spaces[0].metrics.nargs.average
old: null
new: 1.5
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 6.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 6.0
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 7.0

### Code

    class nsTDependentSubstring : public nsTSubstring {
     public:
      typedef nsTDependentSubstring self_type;
      typedef nsTSubstring substring_type;
      typedef typename substring_type::fallible_t fallible_t;

      typedef typename substring_type::char_type char_type;
      typedef typename substring_type::char_traits char_traits;
      typedef
          typename substring_type::incompatible_char_type incompatible_char_type;

      typedef typename substring_type::substring_tuple_type substring_tuple_type;

      typedef typename substring_type::const_iterator const_iterator;
      typedef typename substring_type::iterator iterator;

      typedef typename substring_type::comparator_type comparator_type;

      typedef typename substring_type::const_char_iterator const_char_iterator;

      typedef typename substring_type::index_type index_type;
      typedef typename substring_type::size_type size_type;

      // These are only for internal use within the string classes:
      typedef typename substring_type::DataFlags DataFlags;
      typedef typename substring_type::ClassFlags ClassFlags;

     public:
      void Rebind(const substring_type&, uint32_t aStartPos,
                  uint32_t aLength = size_type(-1));

      void Rebind(const char_type* aData, size_type aLength);

      void Rebind(const char_type* aStart, const char_type* aEnd);

      nsTDependentSubstring(const substring_type& aStr, uint32_t aStartPos,
                            uint32_t aLength = size_type(-1))
          : substring_type() {
        Rebind(aStr, aStartPos, aLength);
      }

      nsTDependentSubstring(const char_type* aData, size_type aLength)
          : substring_type(const_cast(aData), aLength, DataFlags(0),
                           ClassFlags(0)) {}

      explicit nsTDependentSubstring(mozilla::Span aData)
          : nsTDependentSubstring(aData.Elements(), aData.Length()) {}

      nsTDependentSubstring(const char_type* aStart, const char_type* aEnd);

    #if defined(MOZ_USE_CHAR16_WRAPPER)
      template >
      nsTDependentSubstring(char16ptr_t aData, size_type aLength)
          : nsTDependentSubstring(static_cast(aData), aLength) {}

      template >
      nsTDependentSubstring(char16ptr_t aStart, char16ptr_t aEnd);
    #endif

      nsTDependentSubstring(const const_iterator& aStart,
                            const const_iterator& aEnd);

      // Create a nsTDependentSubstring to be bound later
      nsTDependentSubstring() : substring_type() {}

      // auto-generated copy-constructor OK (XXX really?? what about base class
      // copy-ctor?)

     private:
      // NOT USED
      void operator=(const self_type&) =
          delete;  // we're immutable, you can't assign into a substring
    };