Global Metrics
path: .metrics.cyclomatic.sum
old: 4.0
new: 5.0
path: .metrics.loc.blank
old: 17.0
new: 18.0
path: .metrics.loc.cloc
old: 7.0
new: 9.0
path: .metrics.loc.sloc
old: 44.0
new: 72.0
path: .metrics.loc.lloc
old: 5.0
new: 0.0
path: .metrics.loc.ploc
old: 20.0
new: 45.0
path: .metrics.halstead.level
old: 0.13526570048309178
new: 0.0931899641577061
path: .metrics.halstead.purity_ratio
old: 1.754142611081653
new: 1.8249592223225304
path: .metrics.halstead.n2
old: 28.0
new: 52.0
path: .metrics.halstead.N1
old: 47.0
new: 93.0
path: .metrics.halstead.n1
old: 9.0
new: 12.0
path: .metrics.halstead.bugs
old: 0.07803157211663941
new: 0.17447857751676027
path: .metrics.halstead.effort
old: 3581.685240775819
new: 11975.53846153846
path: .metrics.halstead.length
old: 93.0
new: 186.0
path: .metrics.halstead.vocabulary
old: 37.0
new: 64.0
path: .metrics.halstead.estimated_program_length
old: 163.13526283059372
new: 339.44241535199063
path: .metrics.halstead.volume
old: 484.4791630034924
new: 1116.0
path: .metrics.halstead.N2
old: 46.0
new: 93.0
path: .metrics.halstead.difficulty
old: 7.392857142857143
new: 10.73076923076923
path: .metrics.halstead.time
old: 198.9825133764344
new: 665.3076923076923
path: .metrics.mi.mi_sei
old: 64.21851844848587
new: 43.28899913075879
path: .metrics.mi.mi_original
old: 76.6241409299401
new: 64.07697692864537
path: .metrics.mi.mi_visual_studio
old: 44.809439140315845
new: 37.47191633254115
path: .metrics.nom.functions
old: 1.0
new: 2.0
path: .metrics.nom.total
old: 1.0
new: 2.0
Spaces Data
Minimal test - lines (27, 27)
path: .spaces[1].spaces[0].metrics.halstead.time
old: 0.0
new: 1.289960052715201
path: .spaces[1].spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.002712967490108627
path: .spaces[1].spaces[0].metrics.halstead.length
old: 1.0
new: 5.0
path: .spaces[1].spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 5.0
path: .spaces[1].spaces[0].metrics.halstead.difficulty
old: 0.0
new: 2.0
path: .spaces[1].spaces[0].metrics.halstead.level
old: null
new: 0.5
path: .spaces[1].spaces[0].metrics.halstead.volume
old: 0.0
new: 11.60964047443681
path: .spaces[1].spaces[0].metrics.halstead.estimated_program_length
old: null
new: 8.0
path: .spaces[1].spaces[0].metrics.halstead.n1
old: 0.0
new: 4.0
path: .spaces[1].spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.6
path: .spaces[1].spaces[0].metrics.halstead.effort
old: 0.0
new: 23.21928094887362
path: .spaces[1].spaces[0].metrics.halstead.N1
old: 0.0
new: 4.0
path: .spaces[1].spaces[0].metrics.nargs.average
old: null
new: 0.0
path: .spaces[1].spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[1].spaces[0].metrics.mi.mi_sei
old: null
new: 152.37629276875444
path: .spaces[1].spaces[0].metrics.mi.mi_visual_studio
old: null
new: 92.40962204246613
path: .spaces[1].spaces[0].metrics.mi.mi_original
old: null
new: 158.02045369261705
path: .spaces[1].spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[1].spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[1].spaces[0].metrics.nom.total
old: 0.0
new: 1.0
Code
nsColorPicker() = default;
Minimal test - lines (22, 70)
path: .spaces[1].metrics.cyclomatic.sum
old: 2.0
new: 3.0
path: .spaces[1].metrics.loc.sloc
old: 22.0
new: 49.0
path: .spaces[1].metrics.loc.blank
old: 8.0
new: 12.0
path: .spaces[1].metrics.loc.lloc
old: 3.0
new: 0.0
path: .spaces[1].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[1].metrics.loc.ploc
old: 14.0
new: 36.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.7855028365104806
new: 1.7477401687824123
path: .spaces[1].metrics.halstead.vocabulary
old: 34.0
new: 60.0
path: .spaces[1].metrics.halstead.bugs
old: 0.06767490675602122
new: 0.16918072250858515
path: .spaces[1].metrics.halstead.effort
old: 2892.8331207917677
new: 11434.26347044919
path: .spaces[1].metrics.halstead.level
old: 0.14245014245014245
new: 0.09195402298850576
path: .spaces[1].metrics.halstead.volume
old: 412.08449014127746
new: 1051.4265260183165
path: .spaces[1].metrics.halstead.n2
old: 25.0
new: 48.0
path: .spaces[1].metrics.halstead.N1
old: 42.0
new: 91.0
path: .spaces[1].metrics.halstead.N2
old: 39.0
new: 87.0
path: .spaces[1].metrics.halstead.length
old: 81.0
new: 178.0
path: .spaces[1].metrics.halstead.difficulty
old: 7.02
new: 10.875
path: .spaces[1].metrics.halstead.n1
old: 9.0
new: 12.0
path: .spaces[1].metrics.halstead.time
old: 160.7129511550982
new: 635.2368594693994
path: .spaces[1].metrics.halstead.estimated_program_length
old: 144.62572975734892
new: 311.0977500432694
path: .spaces[1].metrics.nom.functions
old: 1.0
new: 2.0
path: .spaces[1].metrics.nom.total
old: 1.0
new: 2.0
path: .spaces[1].metrics.mi.mi_visual_studio
old: 52.1372658291707
new: 41.56807892434726
path: .spaces[1].metrics.mi.mi_original
old: 89.15472456788189
new: 71.08141496063382
path: .spaces[1].metrics.mi.mi_sei
old: 53.12586673270086
new: 38.12896814298812
Code
class nsColorPicker final : public nsIColorPicker {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICOLORPICKER
nsColorPicker() = default;
private:
~nsColorPicker() = default;
static nsString ToHexString(int n);
static void OnResponse(GtkWidget* dialog, gint response_id,
gpointer user_data);
static void OnDestroy(GtkWidget* dialog, gpointer user_data);
#if defined(ACTIVATE_GTK3_COLOR_PICKER)
static void OnColorChanged(GtkColorChooser* color_chooser, GdkRGBA* color,
gpointer user_data);
static int convertGdkRgbaComponent(gdouble color_component);
static gdouble convertToGdkRgbaComponent(int color_component);
static GdkRGBA convertToRgbaColor(nscolor color);
void Update(GdkRGBA* color);
void SetColor(const GdkRGBA* color);
#else
static void OnColorChanged(GtkColorSelection* colorselection,
gpointer user_data);
// Conversion functions for color
static int convertGdkColorComponent(guint16 color_component);
static guint16 convertToGdkColorComponent(int color_component);
static GdkColor convertToGdkColor(nscolor color);
static GtkColorSelection* WidgetGetColorSelection(GtkWidget* widget);
void Update(GtkColorSelection* colorselection);
void ReadValueFromColorSelection(GtkColorSelection* colorselection);
#endif
void Done(GtkWidget* dialog, gint response_id);
nsCOMPtr mParentWidget;
nsCOMPtr mCallback;
nsString mTitle;
nsString mColor;
nsString mInitialColor;
};