Global Metrics
path: .metrics.nargs.sum
old: 20.0
new: 7.0
path: .metrics.nargs.average
old: 2.857142857142857
new: 1.0
path: .metrics.loc.blank
old: 19.0
new: 17.0
path: .metrics.loc.cloc
old: 30.0
new: 7.0
path: .metrics.loc.ploc
old: 110.0
new: 45.0
path: .metrics.loc.sloc
old: 159.0
new: 69.0
path: .metrics.loc.lloc
old: 47.0
new: 10.0
path: .metrics.cyclomatic.average
old: 2.25
new: 1.0
path: .metrics.cyclomatic.sum
old: 18.0
new: 8.0
path: .metrics.mi.mi_visual_studio
old: 24.24401952595179
new: 37.91817084968691
path: .metrics.mi.mi_original
old: 41.45727338937756
new: 64.84007215296461
path: .metrics.mi.mi_sei
old: 17.105970459029336
new: 42.34086059562988
path: .metrics.cognitive.average
old: 1.7142857142857142
new: 0.0
path: .metrics.cognitive.sum
old: 12.0
new: 0.0
path: .metrics.halstead.vocabulary
old: 138.0
new: 65.0
path: .metrics.halstead.bugs
old: 0.6770642842220659
new: 0.14836372418778682
path: .metrics.halstead.estimated_program_length
old: 898.5904417224446
new: 342.5966613493527
path: .metrics.halstead.n2
old: 118.0
new: 51.0
path: .metrics.halstead.N1
old: 318.0
new: 89.0
path: .metrics.halstead.length
old: 580.0
new: 160.0
path: .metrics.halstead.effort
old: 91543.33698745852
new: 9390.170362588678
path: .metrics.halstead.purity_ratio
old: 1.5492938650386976
new: 2.1412291334334546
path: .metrics.halstead.volume
old: 4122.944184931338
new: 963.5788500845526
path: .metrics.halstead.level
old: 0.0450381679389313
new: 0.10261569416498996
path: .metrics.halstead.time
old: 5085.740943747695
new: 521.6761312549265
path: .metrics.halstead.difficulty
old: 22.20338983050847
new: 9.745098039215684
path: .metrics.halstead.n1
old: 20.0
new: 14.0
path: .metrics.halstead.N2
old: 262.0
new: 71.0
path: .metrics.nexits.average
old: 1.0
new: 0.7142857142857143
path: .metrics.nexits.sum
old: 7.0
new: 5.0
Spaces Data
Minimal test - lines (52, 60)
path: .spaces[4].metrics.loc.sloc
old: 24.0
new: 9.0
path: .spaces[4].metrics.loc.cloc
old: 3.0
new: 1.0
path: .spaces[4].metrics.loc.ploc
old: 21.0
new: 9.0
path: .spaces[4].metrics.loc.lloc
old: 3.0
new: 1.0
path: .spaces[4].metrics.mi.mi_sei
old: 72.14418085472036
new: 105.02981561609138
path: .spaces[4].metrics.mi.mi_visual_studio
old: 49.2921597839578
new: 63.210687863125784
path: .spaces[4].metrics.mi.mi_original
old: 84.28959323056785
new: 108.0902762459451
path: .spaces[4].metrics.nexits.average
old: 2.0
new: 1.0
path: .spaces[4].metrics.nexits.sum
old: 2.0
new: 1.0
path: .spaces[4].metrics.nargs.sum
old: 8.0
new: 1.0
path: .spaces[4].metrics.nargs.average
old: 8.0
new: 1.0
path: .spaces[4].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[4].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[4].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[4].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[4].metrics.halstead.n1
old: 14.0
new: 9.0
path: .spaces[4].metrics.halstead.volume
old: 800.9164836282669
new: 182.8366963641292
path: .spaces[4].metrics.halstead.effort
old: 12439.23413635152
new: 1075.9236362966064
path: .spaces[4].metrics.halstead.bugs
old: 0.17895390246196477
new: 0.034999865669846864
path: .spaces[4].metrics.halstead.difficulty
old: 15.53125
new: 5.884615384615385
path: .spaces[4].metrics.halstead.length
old: 145.0
new: 41.0
path: .spaces[4].metrics.halstead.estimated_program_length
old: 213.3029689088065
new: 76.63504134881501
path: .spaces[4].metrics.halstead.N1
old: 74.0
new: 24.0
path: .spaces[4].metrics.halstead.time
old: 691.06856313064
new: 59.77353534981147
path: .spaces[4].metrics.halstead.vocabulary
old: 46.0
new: 22.0
path: .spaces[4].metrics.halstead.N2
old: 71.0
new: 17.0
path: .spaces[4].metrics.halstead.purity_ratio
old: 1.4710549579917689
new: 1.8691473499710975
path: .spaces[4].metrics.halstead.level
old: 0.06438631790744467
new: 0.1699346405228758
path: .spaces[4].metrics.halstead.n2
old: 32.0
new: 13.0
Code
nsSound::Play(nsIURL* aURL) {
nsCOMPtr uri(aURL);
nsCOMPtr loader;
return NS_NewStreamLoader(getter_AddRefs(loader), uri,
this, // aObserver
nsContentUtils::GetSystemPrincipal(),
nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_SEC_CONTEXT_IS_NULL,
nsIContentPolicy::TYPE_OTHER);
}
Minimal test - lines (34, 49)
path: .spaces[3].metrics.cognitive.average
old: 3.0
new: 0.0
path: .spaces[3].metrics.cognitive.sum
old: 3.0
new: 0.0
path: .spaces[3].metrics.loc.blank
old: 3.0
new: 6.0
path: .spaces[3].metrics.loc.sloc
old: 25.0
new: 16.0
path: .spaces[3].metrics.loc.lloc
old: 7.0
new: 2.0
path: .spaces[3].metrics.loc.ploc
old: 16.0
new: 10.0
path: .spaces[3].metrics.loc.cloc
old: 6.0
new: 0.0
path: .spaces[3].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[3].metrics.cyclomatic.sum
old: 4.0
new: 1.0
path: .spaces[3].metrics.mi.mi_original
old: 86.73262986995302
new: 95.85051003906288
path: .spaces[3].metrics.mi.mi_sei
old: 84.24303987512326
new: 62.68402336742554
path: .spaces[3].metrics.mi.mi_visual_studio
old: 50.720836181259074
new: 56.0529298474052
path: .spaces[3].metrics.nargs.sum
old: 2.0
new: 5.0
path: .spaces[3].metrics.nargs.average
old: 2.0
new: 5.0
path: .spaces[3].metrics.halstead.purity_ratio
old: 1.681803477919768
new: 2.255486869751136
path: .spaces[3].metrics.halstead.estimated_program_length
old: 134.54427823358145
new: 142.09567279432156
path: .spaces[3].metrics.halstead.level
old: 0.09049773755656108
new: 0.1393939393939394
path: .spaces[3].metrics.halstead.length
old: 80.0
new: 63.0
path: .spaces[3].metrics.halstead.N2
old: 34.0
new: 30.0
path: .spaces[3].metrics.halstead.bugs
old: 0.09030662166025996
new: 0.058068955875781
path: .spaces[3].metrics.halstead.effort
old: 4459.244401512873
new: 2299.3120102085772
path: .spaces[3].metrics.halstead.vocabulary
old: 33.0
new: 34.0
path: .spaces[3].metrics.halstead.difficulty
old: 11.05
new: 7.173913043478261
path: .spaces[3].metrics.halstead.volume
old: 403.5515295486763
new: 320.5101589987714
path: .spaces[3].metrics.halstead.n1
old: 13.0
new: 11.0
path: .spaces[3].metrics.halstead.time
old: 247.7358000840485
new: 127.73955612269872
path: .spaces[3].metrics.halstead.N1
old: 46.0
new: 33.0
path: .spaces[3].metrics.halstead.n2
old: 20.0
new: 23.0
Code
nsSound::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* context, nsresult aStatus,
uint32_t dataLen, const uint8_t* data) {
NS_OBJC_BEGIN_TRY_BLOCK_RETURN;
NSData* value = [NSData dataWithBytes:data length:dataLen];
NSSound* sound = [[NSSound alloc] initWithData:value];
[sound play];
[sound autorelease];
return NS_OK;
NS_OBJC_END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE);
}
Minimal test - lines (63, 63)
path: .spaces[5].metrics.nargs.average
old: 4.0
new: 0.0
path: .spaces[5].metrics.nargs.sum
old: 4.0
new: 0.0
path: .spaces[5].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[5].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[5].metrics.loc.ploc
old: 26.0
new: 1.0
path: .spaces[5].metrics.loc.blank
old: 1.0
new: 0.0
path: .spaces[5].metrics.loc.sloc
old: 27.0
new: 1.0
path: .spaces[5].metrics.loc.lloc
old: 13.0
new: 1.0
path: .spaces[5].metrics.mi.mi_original
old: 82.05108875912771
new: 155.2836050228807
path: .spaces[5].metrics.mi.mi_sei
old: 42.87748657912992
new: 148.4278547652622
path: .spaces[5].metrics.mi.mi_visual_studio
old: 47.98309284159515
new: 90.80912574437468
path: .spaces[5].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[5].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[5].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[5].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[5].metrics.halstead.estimated_program_length
old: 259.4336554444341
new: 13.60964047443681
path: .spaces[5].metrics.halstead.bugs
old: 0.16208962779551225
new: 0.004471319041702271
path: .spaces[5].metrics.halstead.n2
old: 39.0
new: 2.0
path: .spaces[5].metrics.halstead.effort
old: 10722.960830452796
new: 49.12871113600807
path: .spaces[5].metrics.halstead.n1
old: 14.0
new: 5.0
path: .spaces[5].metrics.halstead.vocabulary
old: 53.0
new: 7.0
path: .spaces[5].metrics.halstead.difficulty
old: 12.564102564102564
new: 2.5
path: .spaces[5].metrics.halstead.N2
old: 70.0
new: 2.0
path: .spaces[5].metrics.halstead.level
old: 0.07959183673469387
new: 0.4
path: .spaces[5].metrics.halstead.purity_ratio
old: 1.741165472781437
new: 1.944234353490973
path: .spaces[5].metrics.halstead.N1
old: 79.0
new: 5.0
path: .spaces[5].metrics.halstead.time
old: 595.7200461362665
new: 2.7293728408893374
path: .spaces[5].metrics.halstead.volume
old: 853.4601477299166
new: 19.651484454403228
path: .spaces[5].metrics.halstead.length
old: 149.0
new: 7.0
Code
nsSound::Init() { return NS_OK; }
Minimal test - lines (66, 69)
path: .spaces[6].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[6].metrics.cyclomatic.sum
old: 4.0
new: 1.0
path: .spaces[6].metrics.nargs.average
old: 3.0
new: 1.0
path: .spaces[6].metrics.nargs.sum
old: 3.0
new: 1.0
path: .spaces[6].metrics.loc.sloc
old: 24.0
new: 4.0
path: .spaces[6].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[6].metrics.loc.ploc
old: 22.0
new: 3.0
path: .spaces[6].metrics.loc.blank
old: 2.0
new: 0.0
path: .spaces[6].metrics.loc.lloc
old: 13.0
new: 1.0
path: .spaces[6].metrics.cognitive.average
old: 4.0
new: 0.0
path: .spaces[6].metrics.cognitive.sum
old: 4.0
new: 0.0
path: .spaces[6].metrics.nexits.average
old: 2.0
new: 1.0
path: .spaces[6].metrics.nexits.sum
old: 2.0
new: 1.0
path: .spaces[6].metrics.mi.mi_original
old: 85.63908465387067
new: 130.88718231816625
path: .spaces[6].metrics.mi.mi_sei
old: 48.25751018201443
new: 148.20265023691223
path: .spaces[6].metrics.mi.mi_visual_studio
old: 50.081336054895125
new: 76.54221188196857
path: .spaces[6].metrics.halstead.level
old: 0.09782608695652174
new: 0.3333333333333333
path: .spaces[6].metrics.halstead.n2
old: 27.0
new: 3.0
path: .spaces[6].metrics.halstead.vocabulary
old: 39.0
new: 9.0
path: .spaces[6].metrics.halstead.time
old: 321.16974964493807
new: 4.754887502163468
path: .spaces[6].metrics.halstead.effort
old: 5781.055493608886
new: 85.58797503894243
path: .spaces[6].metrics.halstead.N1
old: 61.0
new: 6.0
path: .spaces[6].metrics.halstead.n1
old: 12.0
new: 6.0
path: .spaces[6].metrics.halstead.N2
old: 46.0
new: 3.0
path: .spaces[6].metrics.halstead.bugs
old: 0.10737013622933768
new: 0.006473720020679235
path: .spaces[6].metrics.halstead.purity_ratio
old: 1.6018832950193227
new: 2.2516291673878226
path: .spaces[6].metrics.halstead.estimated_program_length
old: 171.40151256706753
new: 20.264662506490403
path: .spaces[6].metrics.halstead.length
old: 107.0
new: 9.0
path: .spaces[6].metrics.halstead.volume
old: 565.5380374182606
new: 28.52932501298081
path: .spaces[6].metrics.halstead.difficulty
old: 10.22222222222222
new: 3.0
Code
nsSound::PlayEventSound(uint32_t aEventId) {
// Mac doesn't have system sound settings for each user actions.
return NS_OK;
}
Minimal test - lines (24, 31)
path: .spaces[2].metrics.mi.mi_original
old: 116.6107903014273
new: 116.211843290912
path: .spaces[2].metrics.mi.mi_sei
old: 129.4664443315432
new: 92.05921787575576
path: .spaces[2].metrics.mi.mi_visual_studio
old: 68.19344462071771
new: 67.96014227538713
path: .spaces[2].metrics.loc.ploc
old: 5.0
new: 6.0
path: .spaces[2].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[2].metrics.loc.sloc
old: 7.0
new: 8.0
path: .spaces[2].metrics.loc.blank
old: 0.0
new: 2.0
path: .spaces[2].metrics.loc.lloc
old: 2.0
new: 4.0
path: .spaces[2].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[2].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[2].metrics.halstead.n1
old: 7.0
new: 5.0
path: .spaces[2].metrics.halstead.difficulty
old: 5.25
new: 2.5
path: .spaces[2].metrics.halstead.time
old: 22.665193273614182
new: 7.687625819193993
path: .spaces[2].metrics.halstead.level
old: 0.1904761904761905
new: 0.4
path: .spaces[2].metrics.halstead.volume
old: 77.70923408096293
new: 55.35090589819676
path: .spaces[2].metrics.halstead.estimated_program_length
old: 35.161259458730164
new: 27.11941547876375
path: .spaces[2].metrics.halstead.bugs
old: 0.018335807177878496
new: 0.008917748904219949
path: .spaces[2].metrics.halstead.length
old: 21.0
new: 16.0
path: .spaces[2].metrics.halstead.N2
old: 9.0
new: 6.0
path: .spaces[2].metrics.halstead.purity_ratio
old: 1.6743456885109602
new: 1.6949634674227343
path: .spaces[2].metrics.halstead.N1
old: 12.0
new: 10.0
path: .spaces[2].metrics.halstead.effort
old: 407.97347892505536
new: 138.37726474549189
path: .spaces[2].metrics.halstead.vocabulary
old: 13.0
new: 11.0
path: .spaces[2].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[2].metrics.nargs.average
old: 2.0
new: 0.0
Code
nsSound::Beep() {
NS_OBJC_BEGIN_TRY_BLOCK_RETURN;
NSBeep();
return NS_OK;
NS_OBJC_END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE);
}
Minimal test - lines (19, 19)
path: .spaces[0].metrics.cyclomatic.sum
old: 3.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.average
old: 3.0
new: 1.0
path: .spaces[0].metrics.halstead.vocabulary
old: 29.0
new: 4.0
path: .spaces[0].metrics.halstead.length
old: 51.0
new: 4.0
path: .spaces[0].metrics.halstead.n1
old: 16.0
new: 3.0
path: .spaces[0].metrics.halstead.N2
old: 21.0
new: 1.0
path: .spaces[0].metrics.halstead.volume
old: 247.75703075150616
new: 8.0
path: .spaces[0].metrics.halstead.difficulty
old: 12.923076923076923
new: 1.5
path: .spaces[0].metrics.halstead.N1
old: 30.0
new: 3.0
path: .spaces[0].metrics.halstead.bugs
old: 0.07241135760646203
new: 0.0017471609294725976
path: .spaces[0].metrics.halstead.estimated_program_length
old: 112.1057163358342
new: 4.754887502163468
path: .spaces[0].metrics.halstead.level
old: 0.07738095238095238
new: 0.6666666666666666
path: .spaces[0].metrics.halstead.n2
old: 13.0
new: 1.0
path: .spaces[0].metrics.halstead.effort
old: 3201.783166634849
new: 12.0
path: .spaces[0].metrics.halstead.time
old: 177.87684259082494
new: 0.6666666666666666
path: .spaces[0].metrics.halstead.purity_ratio
old: 2.198151300702631
new: 1.188721875540867
path: .spaces[0].metrics.cognitive.average
old: 3.0
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 3.0
new: 0.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 53.12880774012171
new: 93.54204911302038
path: .spaces[0].metrics.mi.mi_sei
old: 96.8923034831614
new: 155.17000000000002
path: .spaces[0].metrics.mi.mi_original
old: 90.85026123560812
new: 159.95690398326485
path: .spaces[0].metrics.loc.blank
old: 3.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 23.0
new: 1.0
path: .spaces[0].metrics.loc.ploc
old: 11.0
new: 1.0
path: .spaces[0].metrics.loc.lloc
old: 6.0
new: 0.0
path: .spaces[0].metrics.loc.cloc
old: 9.0
new: 0.0
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.0
Code
nsSound::nsSound() {}
Minimal test - lines (21, 21)
path: .spaces[1].metrics.nexits.average
old: 1.0
new: 0.0
path: .spaces[1].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[1].metrics.mi.mi_original
old: 127.65173409189693
new: 158.02045369261705
path: .spaces[1].metrics.mi.mi_visual_studio
old: 74.65013689584615
new: 92.40962204246613
path: .spaces[1].metrics.mi.mi_sei
old: 108.563491602648
new: 152.37629276875444
path: .spaces[1].metrics.nargs.sum
old: 1.0
new: 0.0
path: .spaces[1].metrics.nargs.average
old: 1.0
new: 0.0
path: .spaces[1].metrics.loc.sloc
old: 4.0
new: 1.0
path: .spaces[1].metrics.loc.lloc
old: 2.0
new: 0.0
path: .spaces[1].metrics.loc.ploc
old: 4.0
new: 1.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: 23.509775004326936
new: 8.0
path: .spaces[1].metrics.halstead.length
old: 16.0
new: 5.0
path: .spaces[1].metrics.halstead.n1
old: 6.0
new: 4.0
path: .spaces[1].metrics.halstead.volume
old: 53.150849518197795
new: 11.60964047443681
path: .spaces[1].metrics.halstead.N2
old: 6.0
new: 1.0
path: .spaces[1].metrics.halstead.difficulty
old: 4.5
new: 2.0
path: .spaces[1].metrics.halstead.n2
old: 4.0
new: 1.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.4693609377704335
new: 1.6
path: .spaces[1].metrics.halstead.N1
old: 10.0
new: 4.0
path: .spaces[1].metrics.halstead.level
old: 0.2222222222222222
new: 0.5
path: .spaces[1].metrics.halstead.bugs
old: 0.012843810659451275
new: 0.002712967490108627
path: .spaces[1].metrics.halstead.time
old: 13.287712379549449
new: 1.289960052715201
path: .spaces[1].metrics.halstead.vocabulary
old: 10.0
new: 5.0
path: .spaces[1].metrics.halstead.effort
old: 239.17882283189007
new: 23.21928094887362
Code
nsSound::~nsSound() {}