Global Metrics
path: .metrics.halstead.difficulty
old: 8.048780487804878
new: 52.54734848484848
path: .metrics.halstead.effort
old: 5826.961672860809
new: 924339.4162795158
path: .metrics.halstead.purity_ratio
old: 2.0292392125539505
new: 1.0621735695581274
path: .metrics.halstead.level
old: 0.12424242424242424
new: 0.019030455938006847
path: .metrics.halstead.n2
old: 41.0
new: 264.0
path: .metrics.halstead.n1
old: 11.0
new: 31.0
path: .metrics.halstead.bugs
old: 0.10793778947083964
new: 3.16300389860769
path: .metrics.halstead.length
old: 127.0
new: 2144.0
path: .metrics.halstead.time
old: 323.7200929367116
new: 51352.18979330643
path: .metrics.halstead.N1
old: 67.0
new: 1249.0
path: .metrics.halstead.vocabulary
old: 52.0
new: 295.0
path: .metrics.halstead.N2
old: 60.0
new: 895.0
path: .metrics.halstead.estimated_program_length
old: 257.7133799943517
new: 2277.300133132625
path: .metrics.halstead.volume
old: 723.9558442039187
new: 17590.600533270295
path: .metrics.mi.mi_sei
old: 64.64862792712907
new: -41.0265481812404
path: .metrics.mi.mi_original
old: 76.07955475369674
new: -3.60360044028603
path: .metrics.mi.mi_visual_studio
old: 44.49096769222032
new: 0.0
path: .metrics.nargs.average
old: 0.0
new: 1.5555555555555556
path: .metrics.nargs.sum
old: 0.0
new: 14.0
path: .metrics.nom.functions
old: 1.0
new: 9.0
path: .metrics.nom.total
old: 1.0
new: 9.0
path: .metrics.nexits.average
old: 1.0
new: 2.2222222222222223
path: .metrics.nexits.sum
old: 1.0
new: 20.0
path: .metrics.cyclomatic.sum
old: 4.0
new: 89.0
path: .metrics.cyclomatic.average
old: 1.0
new: 8.090909090909092
path: .metrics.cognitive.sum
old: 0.0
new: 133.0
path: .metrics.cognitive.average
old: 0.0
new: 14.77777777777778
path: .metrics.loc.lloc
old: 1.0
new: 190.0
path: .metrics.loc.sloc
old: 40.0
new: 588.0
path: .metrics.loc.cloc
old: 7.0
new: 108.0
path: .metrics.loc.ploc
old: 24.0
new: 404.0
path: .metrics.loc.blank
old: 9.0
new: 76.0
Spaces Data
Minimal test - lines (31, 72)
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 22.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: 22.0
path: .spaces[0].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.halstead.N1
old: 67.0
new: 95.0
path: .spaces[0].metrics.halstead.bugs
old: 0.10543685750498712
new: 0.17585037976383608
path: .spaces[0].metrics.halstead.N2
old: 57.0
new: 71.0
path: .spaces[0].metrics.halstead.length
old: 124.0
new: 166.0
path: .spaces[0].metrics.halstead.difficulty
old: 8.038461538461538
new: 12.743589743589745
path: .spaces[0].metrics.halstead.vocabulary
old: 50.0
new: 53.0
path: .spaces[0].metrics.halstead.level
old: 0.12440191387559808
new: 0.07847082494969819
path: .spaces[0].metrics.halstead.n1
old: 11.0
new: 14.0
path: .spaces[0].metrics.halstead.effort
old: 5625.6221928539135
new: 12117.048547240332
path: .spaces[0].metrics.halstead.volume
old: 699.8381675320658
new: 950.8347954574908
path: .spaces[0].metrics.halstead.estimated_program_length
old: 244.18443434063795
new: 259.4336554444341
path: .spaces[0].metrics.halstead.time
old: 312.53456626966187
new: 673.169363735574
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.9692293091986932
new: 1.562853346050808
path: .spaces[0].metrics.cyclomatic.sum
old: 3.0
new: 8.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 8.0
path: .spaces[0].metrics.mi.mi_sei
old: 43.286287066618755
new: 30.360593128561405
path: .spaces[0].metrics.mi.mi_visual_studio
old: 48.10752720232218
new: 42.661744130800955
path: .spaces[0].metrics.mi.mi_original
old: 82.26387151597093
new: 72.95158246366964
path: .spaces[0].metrics.loc.ploc
old: 20.0
new: 32.0
path: .spaces[0].metrics.loc.blank
old: 8.0
new: 10.0
path: .spaces[0].metrics.loc.lloc
old: 1.0
new: 15.0
path: .spaces[0].metrics.loc.sloc
old: 28.0
new: 42.0
Code
nsresult GetDefaultBundleURL(const nsACString& aScheme, CFURLRef* aBundleURL) {
NS_OBJC_BEGIN_TRY_BLOCK_RETURN;
nsresult rv = NS_ERROR_NOT_AVAILABLE;
CFStringRef schemeCFString = ::CFStringCreateWithBytes(
kCFAllocatorDefault, (const UInt8*)PromiseFlatCString(aScheme).get(), aScheme.Length(),
kCFStringEncodingUTF8, false);
if (schemeCFString) {
CFStringRef lookupCFString =
::CFStringCreateWithFormat(NULL, NULL, CFSTR("%@:"), schemeCFString);
if (lookupCFString) {
CFURLRef lookupCFURL = ::CFURLCreateWithString(NULL, lookupCFString, NULL);
if (lookupCFURL) {
if (@available(macOS 10.10, *)) {
*aBundleURL = ::LSCopyDefaultApplicationURLForURL(lookupCFURL, kLSRolesAll, NULL);
if (*aBundleURL) {
rv = NS_OK;
}
} else {
OSStatus theErr = ::LSGetApplicationForURL(lookupCFURL, kLSRolesAll, NULL, aBundleURL);
if (theErr == noErr && *aBundleURL) {
rv = NS_OK;
}
}
::CFRelease(lookupCFURL);
}
::CFRelease(lookupCFString);
}
::CFRelease(schemeCFString);
}
return rv;
NS_OBJC_END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE);
}