# Global Metrics

path: .metrics.halstead.length
old: 91.0
new: 6673.0
path: .metrics.halstead.n2
old: 28.0
new: 413.0
path: .metrics.halstead.purity_ratio
old: 2.064933040949663
new: 0.5657255300836437
path: .metrics.halstead.estimated_program_length
old: 187.90890672641936
new: 3775.0864622481545
path: .metrics.halstead.n1
old: 14.0
new: 36.0
path: .metrics.halstead.vocabulary
old: 42.0
new: 449.0
path: .metrics.halstead.volume
old: 490.7008854728672
new: 58792.94451862767
path: .metrics.halstead.bugs
old: 0.0962550017832741
new: 11.503642910077492
path: .metrics.halstead.N1
old: 51.0
new: 4171.0
path: .metrics.halstead.effort
old: 4907.008854728672
new: 6411135.712689868
path: .metrics.halstead.time
old: 272.6116030404818
new: 356174.2062605482
path: .metrics.halstead.N2
old: 40.0
new: 2502.0
path: .metrics.halstead.difficulty
old: 10.0
new: 109.046004842615
path: .metrics.halstead.level
old: 0.1
new: 0.009170441424638067
path: .metrics.loc.cloc
old: 19.0
new: 83.0
path: .metrics.loc.lloc
old: 0.0
new: 701.0
path: .metrics.loc.ploc
old: 25.0
new: 1506.0
path: .metrics.loc.blank
old: 9.0
new: 296.0
path: .metrics.loc.sloc
old: 53.0
new: 1885.0
path: .metrics.cognitive.sum
old: 0.0
new: 102.0
path: .metrics.cognitive.average
old: 0.0
new: 0.9807692307692308
path: .metrics.nom.functions
old: 1.0
new: 104.0
path: .metrics.nom.total
old: 1.0
new: 104.0
path: .metrics.mi.mi_original
old: 72.85293031291563
new: -99.82050732272867
path: .metrics.mi.mi_sei
old: 70.12454886056719
new: -163.21791373141616
path: .metrics.mi.mi_visual_studio
old: 42.604052814570544
new: 0.0
path: .metrics.nargs.sum
old: 0.0
new: 122.0
path: .metrics.nargs.average
old: 0.0
new: 1.1730769230769231
path: .metrics.cyclomatic.average
old: 1.0
new: 3.7904761904761903
path: .metrics.cyclomatic.sum
old: 7.0
new: 398.0
path: .metrics.nexits.average
old: 0.0
new: 1.5961538461538465
path: .metrics.nexits.sum
old: 0.0
new: 166.0

# Spaces Data

## Minimal test - lines (23, 31)

path: .spaces[0].metrics.halstead.time
old: 0.0
new: 92.44123980731302
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 1663.9423165316346
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 11.0
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.5853112575712165
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 27.0
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 20.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 66.58307281799108
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 15.0
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 42.0
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.04680629402001702
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 9.0
path: .spaces[0].metrics.halstead.level
old: null
new: 0.1090909090909091
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 181.52097998526924
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 9.166666666666666
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 4.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 9.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 9.0
path: .spaces[0].metrics.nexits.average
old: null
new: 2.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 1.0
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 80.16645401480473
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 63.09814701939025
path: .spaces[0].metrics.mi.mi_original
old: null
new: 107.89783140315733
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nargs.average
old: null
new: 2.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0

### Code

    static nsresult String2Double(const char* aString, double* aResult) {
      char* next;
      double value = PR_strtod(aString, &next);
      if (next == aString) {
        return NS_ERROR_CANNOT_CONVERT_DATA;
      }
      *aResult = value;
      return NS_OK;
    }

## Minimal test - lines (33, 41)

path: .spaces[1].metrics.cognitive.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.cognitive.average
old: 0.0
new: 1.0
path: .spaces[1].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[1].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[1].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[1].metrics.nexits.average
old: 0.0
new: 2.0
path: .spaces[1].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[1].metrics.cyclomatic.sum
old: 5.0
new: 2.0
path: .spaces[1].metrics.loc.cloc
old: 12.0
new: 0.0
path: .spaces[1].metrics.loc.ploc
old: 20.0
new: 9.0
path: .spaces[1].metrics.loc.blank
old: 6.0
new: 0.0
path: .spaces[1].metrics.loc.lloc
old: 0.0
new: 4.0
path: .spaces[1].metrics.loc.sloc
old: 38.0
new: 9.0
path: .spaces[1].metrics.mi.mi_original
old: 79.06495283188082
new: 107.11756056507124
path: .spaces[1].metrics.mi.mi_visual_studio
old: 46.23681452156773
new: 62.641848283667386
path: .spaces[1].metrics.mi.mi_sei
old: 77.10972919581718
new: 79.04076114614766
path: .spaces[1].metrics.halstead.time
old: 246.4462087017071
new: 111.3127007119525
path: .spaces[1].metrics.halstead.estimated_program_length
old: 175.51440158047484
new: 86.03910001730775
path: .spaces[1].metrics.halstead.level
old: 0.10317460317460318
new: 0.10526315789473684
path: .spaces[1].metrics.halstead.n1
old: 14.0
new: 12.0
path: .spaces[1].metrics.halstead.difficulty
old: 9.692307692307692
new: 9.5
path: .spaces[1].metrics.halstead.bugs
old: 0.08999295440324183
new: 0.052977349770601034
path: .spaces[1].metrics.halstead.effort
old: 4436.031756630728
new: 2003.628612815145
path: .spaces[1].metrics.halstead.N2
old: 36.0
new: 19.0
path: .spaces[1].metrics.halstead.length
old: 86.0
new: 46.0
path: .spaces[1].metrics.halstead.N1
old: 50.0
new: 27.0
path: .spaces[1].metrics.halstead.n2
old: 26.0
new: 12.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 2.040865134656684
new: 1.8704152177675597
path: .spaces[1].metrics.halstead.vocabulary
old: 40.0
new: 24.0
path: .spaces[1].metrics.halstead.volume
old: 457.6858161603132
new: 210.90827503317317

### Code

    static nsresult AString2Double(const nsAString& aString, double* aResult) {
      char* pChars = ToNewCString(aString, mozilla::fallible);
      if (!pChars) {
        return NS_ERROR_OUT_OF_MEMORY;
      }
      nsresult rv = String2Double(pChars, aResult);
      free(pChars);
      return rv;
    }