# Global Metrics

path: .metrics.mi.mi_original
old: 53.569941679171976
new: 34.27927619169509
path: .metrics.mi.mi_sei
old: 28.948290165229434
new: -15.361725723164785
path: .metrics.mi.mi_visual_studio
old: 31.32745127436958
new: 20.04636034602052
path: .metrics.nexits.average
old: 0.8
new: 1.353846153846154
path: .metrics.nexits.sum
old: 4.0
new: 88.0
path: .metrics.nargs.average
old: 0.4
new: 1.0
path: .metrics.nargs.sum
old: 2.0
new: 65.0
path: .metrics.halstead.vocabulary
old: 90.0
new: 906.0
path: .metrics.halstead.N1
old: 139.0
new: 3129.0
path: .metrics.halstead.N2
old: 108.0
new: 2381.0
path: .metrics.halstead.difficulty
old: 10.8
new: 60.76798143851508
path: .metrics.halstead.bugs
old: 0.22311991726093625
new: 7.372304616683085
path: .metrics.halstead.purity_ratio
old: 2.128602270126797
new: 1.5691553484854528
path: .metrics.halstead.effort
old: 17317.66731976904
new: 3289173.551568725
path: .metrics.halstead.level
old: 0.0925925925925926
new: 0.016456034515673325
path: .metrics.halstead.n2
old: 75.0
new: 862.0
path: .metrics.halstead.n1
old: 15.0
new: 44.0
path: .metrics.halstead.estimated_program_length
old: 525.7647607213188
new: 8646.045970154844
path: .metrics.halstead.time
old: 962.0926288760578
new: 182731.86397604027
path: .metrics.halstead.volume
old: 1603.4877147934296
new: 54126.75349265475
path: .metrics.halstead.length
old: 247.0
new: 5510.0
path: .metrics.nom.functions
old: 5.0
new: 47.0
path: .metrics.nom.total
old: 5.0
new: 65.0
path: .metrics.nom.closures
old: 0.0
new: 18.0
path: .metrics.loc.cloc
old: 14.0
new: 189.0
path: .metrics.loc.lloc
old: 4.0
new: 381.0
path: .metrics.loc.ploc
old: 71.0
new: 1026.0
path: .metrics.loc.blank
old: 26.0
new: 0.0
path: .metrics.loc.sloc
old: 111.0
new: 12.0
path: .metrics.cognitive.average
old: 0.0
new: 2.4307692307692306
path: .metrics.cognitive.sum
old: 0.0
new: 158.0
path: .metrics.cyclomatic.average
old: 1.0
new: 3.6041666666666665
path: .metrics.cyclomatic.sum
old: 12.0
new: 173.0

# Spaces Data

## Minimal test - lines (87, 87)

path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.mi.mi_original
old: null
new: 151.189427438886
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 142.52120506831432
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 88.41486984730174
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 9.0
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.01145791648872146
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 11.196128023509258
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 4.0
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 7.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 24.406371956566694
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 10.0
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 43.18506523353571
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 3.0
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.8774132274282072
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 4.666666666666667
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 201.53030442316663
path: .spaces[0].metrics.halstead.level
old: null
new: 0.21428571428571427
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 13.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.nexits.average
old: null
new: 1.0

### Code

    float nsCocoaUtils::FlippedScreenY(float y) { return MenuBarScreenHeight() - y; }

## Minimal test - lines (96, 101)

path: .spaces[2].metrics.nom.total
old: 5.0
new: 1.0
path: .spaces[2].metrics.nom.functions
old: 5.0
new: 1.0
path: .spaces[2].metrics.loc.sloc
old: 81.0
new: 6.0
path: .spaces[2].metrics.loc.blank
old: 20.0
new: 0.0
path: .spaces[2].metrics.loc.cloc
old: 3.0
new: 0.0
path: .spaces[2].metrics.loc.lloc
old: 4.0
new: 1.0
path: .spaces[2].metrics.loc.ploc
old: 58.0
new: 6.0
path: .spaces[2].metrics.mi.mi_visual_studio
old: 34.914371528866674
new: 66.97865715151242
path: .spaces[2].metrics.mi.mi_original
old: 59.70357531436201
new: 114.53350372908623
path: .spaces[2].metrics.mi.mi_sei
old: 26.03683186598422
new: 89.63788571298204
path: .spaces[2].metrics.nexits.sum
old: 4.0
new: 1.0
path: .spaces[2].metrics.nexits.average
old: 0.8
new: 1.0
path: .spaces[2].metrics.nargs.average
old: 0.4
new: 2.0
path: .spaces[2].metrics.halstead.volume
old: 1502.1945943530088
new: 187.29612798276648
path: .spaces[2].metrics.halstead.vocabulary
old: 84.0
new: 22.0
path: .spaces[2].metrics.halstead.difficulty
old: 10.652173913043478
new: 8.333333333333334
path: .spaces[2].metrics.halstead.level
old: 0.09387755102040816
new: 0.12
path: .spaces[2].metrics.halstead.effort
old: 16001.638070282052
new: 1560.801066523054
path: .spaces[2].metrics.halstead.estimated_program_length
old: 480.0915464518215
new: 76.2388309575275
path: .spaces[2].metrics.halstead.N1
old: 137.0
new: 22.0
path: .spaces[2].metrics.halstead.N2
old: 98.0
new: 20.0
path: .spaces[2].metrics.halstead.purity_ratio
old: 2.0429427508588147
new: 1.815210260893512
path: .spaces[2].metrics.halstead.bugs
old: 0.21166791931865908
new: 0.04485151466591419
path: .spaces[2].metrics.halstead.time
old: 888.9798927934473
new: 86.7111703623919
path: .spaces[2].metrics.halstead.n1
old: 15.0
new: 10.0
path: .spaces[2].metrics.halstead.n2
old: 69.0
new: 12.0
path: .spaces[2].metrics.halstead.length
old: 235.0
new: 42.0
path: .spaces[2].metrics.cyclomatic.sum
old: 9.0
new: 1.0

### Code

    NSRect nsCocoaUtils::GeckoRectToCocoaRectDevPix(const LayoutDeviceIntRect& aGeckoRect,
                                                    CGFloat aBackingScale) {
      return NSMakeRect(aGeckoRect.x / aBackingScale,
                        MenuBarScreenHeight() - aGeckoRect.YMost() / aBackingScale,
                        aGeckoRect.width / aBackingScale, aGeckoRect.height / aBackingScale);
    }

## Minimal test - lines (89, 94)

path: .spaces[1].metrics.halstead.N1
old: 0.0
new: 17.0
path: .spaces[1].metrics.halstead.time
old: 0.0
new: 46.0900135208629
path: .spaces[1].metrics.halstead.level
old: null
new: 0.15873015873015872
path: .spaces[1].metrics.halstead.volume
old: 0.0
new: 131.68575291675114
path: .spaces[1].metrics.halstead.purity_ratio
old: null
new: 1.9918905148985304
path: .spaces[1].metrics.halstead.N2
old: 1.0
new: 14.0
path: .spaces[1].metrics.halstead.difficulty
old: 0.0
new: 6.3
path: .spaces[1].metrics.halstead.bugs
old: 0.0
new: 0.029430545080356443
path: .spaces[1].metrics.halstead.n1
old: 0.0
new: 9.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: null
new: 61.74860596185444
path: .spaces[1].metrics.halstead.n2
old: 1.0
new: 10.0
path: .spaces[1].metrics.halstead.vocabulary
old: 1.0
new: 19.0
path: .spaces[1].metrics.halstead.effort
old: 0.0
new: 829.6202433755321
path: .spaces[1].metrics.halstead.length
old: 1.0
new: 31.0
path: .spaces[1].metrics.nexits.average
old: null
new: 1.0
path: .spaces[1].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.loc.cloc
old: 0.0
new: 2.0
path: .spaces[1].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 1.0
new: 4.0
path: .spaces[1].metrics.loc.sloc
old: 1.0
new: 6.0
path: .spaces[1].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.nargs.average
old: null
new: 1.0
path: .spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[1].metrics.mi.mi_original
old: null
new: 116.36532079064328
path: .spaces[1].metrics.mi.mi_sei
old: null
new: 131.273171622753
path: .spaces[1].metrics.mi.mi_visual_studio
old: null
new: 68.04989519920659
path: .spaces[1].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.functions
old: 0.0
new: 1.0

### Code

    NSRect nsCocoaUtils::GeckoRectToCocoaRect(const DesktopIntRect& geckoRect) {
      // We only need to change the Y coordinate by starting with the primary screen
      // height and subtracting the gecko Y coordinate of the bottom of the rect.
      return NSMakeRect(geckoRect.x, MenuBarScreenHeight() - geckoRect.YMost(), geckoRect.width,
                        geckoRect.height);
    }