# Global Metrics

path: .metrics.nom.functions
old: 8.0
new: 9.0
path: .metrics.nom.total
old: 8.0
new: 9.0
path: .metrics.loc.blank
old: 19.0
new: 51.0
path: .metrics.loc.cloc
old: 11.0
new: 20.0
path: .metrics.loc.lloc
old: 23.0
new: 214.0
path: .metrics.loc.ploc
old: 73.0
new: 286.0
path: .metrics.loc.sloc
old: 103.0
new: 357.0
path: .metrics.halstead.level
old: 0.03669222343921139
new: 0.01282258064516129
path: .metrics.halstead.length
old: 385.0
new: 1526.0
path: .metrics.halstead.estimated_program_length
old: 504.53547137069125
new: 1375.6255136857071
path: .metrics.halstead.bugs
old: 0.5550462685017585
new: 3.1275128575213653
path: .metrics.halstead.volume
old: 2493.157370922063
new: 11653.489170949608
path: .metrics.halstead.n2
old: 67.0
new: 159.0
path: .metrics.halstead.difficulty
old: 27.253731343283583
new: 77.9874213836478
path: .metrics.halstead.N1
old: 219.0
new: 906.0
path: .metrics.halstead.purity_ratio
old: 1.3104817438199774
new: 0.9014583969106862
path: .metrics.halstead.N2
old: 166.0
new: 620.0
path: .metrics.halstead.effort
old: 67947.84118363712
new: 908825.5705646236
path: .metrics.halstead.n1
old: 22.0
new: 40.0
path: .metrics.halstead.vocabulary
old: 89.0
new: 199.0
path: .metrics.halstead.time
old: 3774.880065757618
new: 50490.30947581241
path: .metrics.mi.mi_visual_studio
old: 29.61789667608057
new: 4.813569347007781
path: .metrics.mi.mi_original
old: 50.64660331609777
new: 8.231203583383305
path: .metrics.mi.mi_sei
old: 23.64913373341104
new: -37.55062909518675
path: .metrics.nexits.average
old: 1.0
new: 1.1111111111111112
path: .metrics.nexits.sum
old: 8.0
new: 10.0
path: .metrics.nargs.average
old: 1.0
new: 1.6666666666666667
path: .metrics.nargs.sum
old: 8.0
new: 15.0
path: .metrics.cognitive.sum
old: 9.0
new: 177.0
path: .metrics.cognitive.average
old: 1.125
new: 19.666666666666668
path: .metrics.cyclomatic.sum
old: 20.0
new: 82.0
path: .metrics.cyclomatic.average
old: 1.6666666666666667
new: 8.2

# Spaces Data

## Minimal test - lines (33, 37)

path: .spaces[1].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[1].metrics.halstead.length
old: 1.0
new: 20.0
path: .spaces[1].metrics.halstead.level
old: null
new: 0.15873015873015872
path: .spaces[1].metrics.halstead.n1
old: 0.0
new: 9.0
path: .spaces[1].metrics.halstead.time
old: 0.0
new: 26.651484454403228
path: .spaces[1].metrics.halstead.volume
old: 0.0
new: 76.14709844115208
path: .spaces[1].metrics.halstead.vocabulary
old: 1.0
new: 14.0
path: .spaces[1].metrics.halstead.difficulty
old: 0.0
new: 6.3
path: .spaces[1].metrics.halstead.purity_ratio
old: null
new: 2.006948274370881
path: .spaces[1].metrics.halstead.N1
old: 0.0
new: 13.0
path: .spaces[1].metrics.halstead.n2
old: 1.0
new: 5.0
path: .spaces[1].metrics.halstead.effort
old: 0.0
new: 479.7267201792581
path: .spaces[1].metrics.halstead.bugs
old: 0.0
new: 0.020427161279358765
path: .spaces[1].metrics.halstead.N2
old: 1.0
new: 7.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: null
new: 40.13896548741762
path: .spaces[1].metrics.cognitive.average
old: null
new: 1.0
path: .spaces[1].metrics.cognitive.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.nargs.average
old: null
new: 0.0
path: .spaces[1].metrics.nexits.average
old: null
new: 0.0
path: .spaces[1].metrics.loc.lloc
old: 0.0
new: 4.0
path: .spaces[1].metrics.loc.sloc
old: 1.0
new: 5.0
path: .spaces[1].metrics.loc.ploc
old: 1.0
new: 5.0
path: .spaces[1].metrics.mi.mi_sei
old: null
new: 100.42103563471564
path: .spaces[1].metrics.mi.mi_original
old: null
new: 121.93723754641988
path: .spaces[1].metrics.mi.mi_visual_studio
old: null
new: 71.30832605053794
path: .spaces[1].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[1].metrics.cyclomatic.average
old: 1.0
new: 2.0

### Code

    nsDecodeAppleFile::~nsDecodeAppleFile() {
      free(m_dataBuffer);
      m_dataBuffer = nullptr;
      if (m_entries) delete[] m_entries;
    }

## Minimal test - lines (39, 50)

path: .spaces[2].metrics.loc.ploc
old: 66.0
new: 9.0
path: .spaces[2].metrics.loc.blank
old: 14.0
new: 3.0
path: .spaces[2].metrics.loc.cloc
old: 5.0
new: 0.0
path: .spaces[2].metrics.loc.lloc
old: 23.0
new: 5.0
path: .spaces[2].metrics.loc.sloc
old: 85.0
new: 12.0
path: .spaces[2].metrics.nom.functions
old: 8.0
new: 1.0
path: .spaces[2].metrics.nom.total
old: 8.0
new: 1.0
path: .spaces[2].metrics.cognitive.average
old: 1.125
new: 0.0
path: .spaces[2].metrics.cognitive.sum
old: 9.0
new: 0.0
path: .spaces[2].metrics.halstead.effort
old: 66447.57756361969
new: 1584.273331587486
path: .spaces[2].metrics.halstead.level
old: 0.03636363636363636
new: 0.1349206349206349
path: .spaces[2].metrics.halstead.bugs
old: 0.546845757473347
new: 0.04530006443394191
path: .spaces[2].metrics.halstead.n1
old: 22.0
new: 12.0
path: .spaces[2].metrics.halstead.N2
old: 160.0
new: 21.0
path: .spaces[2].metrics.halstead.purity_ratio
old: 1.2822007861968632
new: 2.5569640524979462
path: .spaces[2].metrics.halstead.N1
old: 216.0
new: 23.0
path: .spaces[2].metrics.halstead.length
old: 376.0
new: 44.0
path: .spaces[2].metrics.halstead.n2
old: 64.0
new: 17.0
path: .spaces[2].metrics.halstead.vocabulary
old: 86.0
new: 29.0
path: .spaces[2].metrics.halstead.difficulty
old: 27.5
new: 7.411764705882353
path: .spaces[2].metrics.halstead.estimated_program_length
old: 482.1074956100205
new: 112.50641830990963
path: .spaces[2].metrics.halstead.volume
old: 2416.275547767989
new: 213.75116378561316
path: .spaces[2].metrics.halstead.time
old: 3691.532086867761
new: 88.01518508819366
path: .spaces[2].metrics.mi.mi_original
old: 54.61114010520176
new: 102.61748700088626
path: .spaces[2].metrics.mi.mi_visual_studio
old: 31.93633924280805
new: 60.01022631630775
path: .spaces[2].metrics.mi.mi_sei
old: 23.165104500728535
new: 72.44670747205801
path: .spaces[2].metrics.nargs.sum
old: 8.0
new: 2.0
path: .spaces[2].metrics.nargs.average
old: 1.0
new: 2.0
path: .spaces[2].metrics.cyclomatic.average
old: 1.8888888888888888
new: 1.0
path: .spaces[2].metrics.cyclomatic.sum
old: 17.0
new: 1.0
path: .spaces[2].metrics.nexits.sum
old: 8.0
new: 1.0

### Code

    NS_IMETHODIMP nsDecodeAppleFile::Initialize(nsIOutputStream* output,
                                                nsIFile* file) {
      m_output = output;

      nsCOMPtr macFile = do_QueryInterface(file);
      macFile->GetTargetFSSpec(&m_fsFileSpec);

      m_offset = 0;
      m_dataForkOffset = 0;

      return NS_OK;
    }

## Minimal test - lines (17, 31)

path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 55.99062637262147
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 62.53032016431342
path: .spaces[0].metrics.mi.mi_original
old: null
new: 95.74397109718272
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 12.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 15.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 14.0
path: .spaces[0].metrics.nargs.average
old: null
new: 0.0
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.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.628655171042053
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 192.06349206349205
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.07621204746352953
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 400.0
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 80.0
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 32.0
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 11.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 130.29241368336423
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 33.0
path: .spaces[0].metrics.halstead.level
old: null
new: 0.11570247933884298
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 47.0
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 8.642857142857142
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 3457.142857142857
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 21.0

### Code

    nsDecodeAppleFile::nsDecodeAppleFile() {
      m_state = parseHeaders;
      m_dataBufferLength = 0;
      m_dataBuffer = (unsigned char*)malloc(MAX_BUFFERSIZE);
      m_entries = nullptr;
      m_rfRefNum = -1;
      m_totalDataForkWritten = 0;
      m_totalResourceForkWritten = 0;
      m_headerOk = false;

      m_comment[0] = 0;
      memset(&m_dates, 0, sizeof(m_dates));
      memset(&m_finderInfo, 0, sizeof(m_dates));
      memset(&m_finderExtraInfo, 0, sizeof(m_dates));
    }