Global Metrics
path: .metrics.cognitive.sum
old: 0.0
new: 3.0
path: .metrics.cognitive.average
old: 0.0
new: 1.5
path: .metrics.halstead.bugs
old: 0.1645670558724317
new: 0.06725899726533444
path: .metrics.halstead.estimated_program_length
old: 168.0419249893113
new: 154.1501525493784
path: .metrics.halstead.N1
old: 66.0
new: 37.0
path: .metrics.halstead.N2
old: 51.0
new: 35.0
path: .metrics.halstead.level
old: 0.05637254901960784
new: 0.12987012987012986
path: .metrics.halstead.difficulty
old: 17.73913043478261
new: 7.7
path: .metrics.halstead.purity_ratio
old: 1.4362557691394129
new: 2.140974340963589
path: .metrics.halstead.effort
old: 10969.737405200362
new: 2866.2064207996177
path: .metrics.halstead.n2
old: 23.0
new: 25.0
path: .metrics.halstead.length
old: 117.0
new: 72.0
path: .metrics.halstead.time
old: 609.4298558444646
new: 159.2336900444232
path: .metrics.halstead.n1
old: 16.0
new: 11.0
path: .metrics.halstead.vocabulary
old: 39.0
new: 36.0
path: .metrics.halstead.volume
old: 618.3920596068831
new: 372.2346001038465
path: .metrics.mi.mi_original
old: 73.48497156063762
new: 73.06693208076906
path: .metrics.mi.mi_sei
old: 61.33411954160364
new: 67.27002906782153
path: .metrics.mi.mi_visual_studio
old: 42.97366757932024
new: 42.72920004723337
path: .metrics.loc.blank
old: 12.0
new: 13.0
path: .metrics.loc.cloc
old: 8.0
new: 15.0
path: .metrics.loc.lloc
old: 4.0
new: 2.0
path: .metrics.loc.sloc
old: 46.0
new: 54.0
path: .metrics.nargs.average
old: 0.6
new: 1.5
path: .metrics.cyclomatic.sum
old: 9.0
new: 11.0
path: .metrics.cyclomatic.average
old: 1.0
new: 2.75
path: .metrics.nexits.average
old: 0.6
new: 0.0
path: .metrics.nexits.sum
old: 3.0
new: 0.0
path: .metrics.nom.total
old: 5.0
new: 2.0
path: .metrics.nom.functions
old: 5.0
new: 2.0
Spaces Data
Minimal test - lines (33, 37)
path: .spaces[0].metrics.cognitive.average
old: null
new: 2.0
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 16.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: null
new: 48.18080946738404
path: .spaces[0].metrics.halstead.difficulty
old: 0.0
new: 6.428571428571429
path: .spaces[0].metrics.halstead.n1
old: 0.0
new: 9.0
path: .spaces[0].metrics.halstead.time
old: 0.0
new: 40.0
path: .spaces[0].metrics.halstead.N2
old: 1.0
new: 10.0
path: .spaces[0].metrics.halstead.volume
old: 0.0
new: 112.0
path: .spaces[0].metrics.halstead.effort
old: 0.0
new: 720.0
path: .spaces[0].metrics.halstead.n2
old: 1.0
new: 7.0
path: .spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.026777318003286775
path: .spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.7207431952637156
path: .spaces[0].metrics.halstead.level
old: null
new: 0.15555555555555556
path: .spaces[0].metrics.halstead.N1
old: 0.0
new: 18.0
path: .spaces[0].metrics.halstead.length
old: 1.0
new: 28.0
path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 5.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 2.0
path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 5.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: null
new: 70.00053315077959
path: .spaces[0].metrics.mi.mi_sei
old: null
new: 97.2965192681252
path: .spaces[0].metrics.mi.mi_original
old: null
new: 119.7009116878331
path: .spaces[0].metrics.nargs.average
old: null
new: 3.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 3.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.cyclomatic.sum
old: 1.0
new: 3.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 3.0
path: .spaces[0].metrics.nexits.average
old: null
new: 0.0
Code
static void CheckFnPtr(void *FnPtr, const char *FnName, bool WarnIfMissing) {
if (FnPtr == nullptr && WarnIfMissing) {
Printf("WARNING: Failed to find function \"%s\".\n", FnName);
}
}
Minimal test - lines (39, 52)
path: .spaces[1].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[1].metrics.nexits.average
old: null
new: 0.0
path: .spaces[1].metrics.loc.ploc
old: 1.0
new: 8.0
path: .spaces[1].metrics.loc.blank
old: 0.0
new: 6.0
path: .spaces[1].metrics.loc.sloc
old: 1.0
new: 14.0
path: .spaces[1].metrics.halstead.n2
old: 1.0
new: 8.0
path: .spaces[1].metrics.halstead.level
old: null
new: 0.5
path: .spaces[1].metrics.halstead.time
old: 0.0
new: 6.373266667948722
path: .spaces[1].metrics.halstead.N1
old: 0.0
new: 8.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: null
new: 32.0
path: .spaces[1].metrics.halstead.vocabulary
old: 1.0
new: 12.0
path: .spaces[1].metrics.halstead.N2
old: 1.0
new: 8.0
path: .spaces[1].metrics.halstead.bugs
old: 0.0
new: 0.00786988662087777
path: .spaces[1].metrics.halstead.difficulty
old: 0.0
new: 2.0
path: .spaces[1].metrics.halstead.volume
old: 0.0
new: 57.3594000115385
path: .spaces[1].metrics.halstead.purity_ratio
old: null
new: 2.0
path: .spaces[1].metrics.halstead.effort
old: 0.0
new: 114.718800023077
path: .spaces[1].metrics.halstead.length
old: 1.0
new: 16.0
path: .spaces[1].metrics.halstead.n1
old: 0.0
new: 4.0
path: .spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[1].metrics.mi.mi_original
old: null
new: 106.7307202320616
path: .spaces[1].metrics.mi.mi_sei
old: null
new: 78.48266851609881
path: .spaces[1].metrics.mi.mi_visual_studio
old: null
new: 62.41562586670268
path: .spaces[1].metrics.nargs.average
old: null
new: 0.0
path: .spaces[1].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[1].metrics.nom.total
old: 0.0
new: 1.0
Code
namespace fuzzer {
ExternalFunctions::ExternalFunctions() {
#define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \
this->NAME = ::NAME; \
CheckFnPtr(reinterpret_cast(reinterpret_cast(::NAME)), \
#NAME, WARN);
#include "FuzzerExtFunctions.def"
#undef EXT_FUNC
}
} // namespace fuzzer