Global Metrics
path: .metrics.loc.blank
old: 286.0
new: 14.0
path: .metrics.loc.cloc
old: 101.0
new: 17.0
path: .metrics.loc.ploc
old: 1150.0
new: 54.0
path: .metrics.loc.sloc
old: 1537.0
new: 85.0
path: .metrics.loc.lloc
old: 521.0
new: 0.0
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 35.97275894959248
path: .metrics.mi.mi_original
old: -73.81997901786673
new: 61.51341780380314
path: .metrics.mi.mi_sei
old: -132.31608702003112
new: 45.48884065153754
path: .metrics.halstead.vocabulary
old: 487.0
new: 73.0
path: .metrics.halstead.purity_ratio
old: 0.6457231060330814
new: 2.313715449142026
path: .metrics.halstead.volume
old: 57075.284511592414
new: 1089.4091223628832
path: .metrics.halstead.time
old: 393753.31389623776
new: 418.7782378975599
path: .metrics.halstead.difficulty
old: 124.17913832199548
new: 6.919354838709677
path: .metrics.halstead.n2
old: 441.0
new: 62.0
path: .metrics.halstead.bugs
old: 12.2991914916843
new: 0.12814937294904488
path: .metrics.halstead.level
old: 0.008052882420612457
new: 0.14452214452214454
path: .metrics.halstead.estimated_program_length
old: 4128.107816869489
new: 407.21391904899656
path: .metrics.halstead.length
old: 6393.0
new: 176.0
path: .metrics.halstead.effort
old: 7087559.65013228
new: 7538.008282156078
path: .metrics.halstead.n1
old: 46.0
new: 11.0
path: .metrics.halstead.N2
old: 2381.0
new: 78.0
path: .metrics.halstead.N1
old: 4012.0
new: 98.0
path: .metrics.nargs.sum
old: 70.0
new: 0.0
path: .metrics.nargs.average
old: 0.5982905982905983
new: null
path: .metrics.cognitive.average
old: 1.4871794871794872
new: null
path: .metrics.cognitive.sum
old: 174.0
new: 0.0
path: .metrics.nexits.sum
old: 141.0
new: 0.0
path: .metrics.nexits.average
old: 1.205128205128205
new: null
path: .metrics.cyclomatic.sum
old: 300.0
new: 5.0
path: .metrics.cyclomatic.average
old: 2.1739130434782608
new: 1.0
path: .metrics.nom.functions
old: 117.0
new: 0.0
path: .metrics.nom.total
old: 117.0
new: 0.0
Spaces Data
Minimal test - lines (21, 80)
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_original
old: 155.2836050228807
new: 68.6496185154497
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: 90.80912574437468
new: 40.145975740029066
path: .spaces[0].spaces[0].spaces[1].metrics.mi.mi_sei
old: 148.4278547652622
new: 50.24116167321442
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.effort
old: 49.12871113600807
new: 6757.096686217926
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.purity_ratio
old: 1.944234353490973
new: 2.153195511863195
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N1
old: 5.0
new: 94.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n2
old: 2.0
new: 54.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.n1
old: 5.0
new: 11.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.volume
old: 19.651484454403228
new: 975.6235857106096
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.bugs
old: 0.004471319041702271
new: 0.11913851085397932
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.length
old: 7.0
new: 162.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.difficulty
old: 2.5
new: 6.925925925925926
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.time
old: 2.7293728408893374
new: 375.39426034544033
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: 13.60964047443681
new: 348.8176729218376
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.level
old: 0.4
new: 0.1443850267379679
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.vocabulary
old: 7.0
new: 65.0
path: .spaces[0].spaces[0].spaces[1].metrics.halstead.N2
old: 2.0
new: 68.0
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.average
old: 1.0
new: null
path: .spaces[0].spaces[0].spaces[1].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.nargs.average
old: 0.0
new: null
path: .spaces[0].spaces[0].spaces[1].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[0].spaces[0].spaces[1].metrics.loc.sloc
old: 1.0
new: 60.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.blank
old: 0.0
new: 11.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.cloc
old: 0.0
new: 8.0
path: .spaces[0].spaces[0].spaces[1].metrics.loc.ploc
old: 1.0
new: 41.0
Code
class TaskbarWindowPreview : public TaskbarPreview,
public nsITaskbarWindowPreview,
public nsITaskbarProgress,
public nsITaskbarOverlayIconController,
public nsSupportsWeakReference {
virtual ~TaskbarWindowPreview();
public:
TaskbarWindowPreview(ITaskbarList4* aTaskbar,
nsITaskbarPreviewController* aController, HWND aHWND,
nsIDocShell* aShell);
virtual nsresult Init() override;
NS_DECL_ISUPPORTS
NS_DECL_NSITASKBARWINDOWPREVIEW
NS_DECL_NSITASKBARPROGRESS
NS_DECL_NSITASKBAROVERLAYICONCONTROLLER
NS_FORWARD_NSITASKBARPREVIEW(TaskbarPreview::)
virtual LRESULT WndProc(UINT nMsg, WPARAM wParam, LPARAM lParam) override;
private:
virtual nsresult ShowActive(bool active) override;
virtual HWND& PreviewWindow() override;
virtual nsresult UpdateTaskbarProperties() override;
virtual nsresult Enable() override;
virtual nsresult Disable() override;
virtual void DetachFromNSWindow() override;
nsresult UpdateButton(uint32_t index);
nsresult UpdateButtons();
// Is custom drawing enabled?
bool mCustomDrawing;
// Have we made any buttons?
bool mHaveButtons;
// Windows button format
THUMBBUTTON mThumbButtons[nsITaskbarWindowPreview::NUM_TOOLBAR_BUTTONS];
// Pointers to our button class (cached instances)
nsWeakPtr mWeakButtons[nsITaskbarWindowPreview::NUM_TOOLBAR_BUTTONS];
// Called to update ITaskbarList4 dependent properties
nsresult UpdateTaskbarProgress();
nsresult UpdateOverlayIcon();
// The taskbar progress
TBPFLAG mState;
ULONGLONG mCurrentValue;
ULONGLONG mMaxValue;
// Taskbar overlay icon
HICON mOverlayIcon;
nsString mIconDescription;
// WindowHook procedure for hooking mWnd for taskbar progress and icon stuff
static bool TaskbarWindowHook(void* aContext, HWND hWnd, UINT nMsg,
WPARAM wParam, LPARAM lParam, LRESULT* aResult);
friend class TaskbarPreviewButton;
};
Minimal test - lines (17, 83)
path: .spaces[0].metrics.nexits.average
old: 1.205128205128205
new: null
path: .spaces[0].metrics.nexits.sum
old: 141.0
new: 0.0
path: .spaces[0].metrics.halstead.bugs
old: 12.366870502435685
new: 0.12369849531127576
path: .spaces[0].metrics.halstead.estimated_program_length
old: 4066.802991948822
new: 363.2656234402361
path: .spaces[0].metrics.halstead.vocabulary
old: 481.0
new: 67.0
path: .spaces[0].metrics.halstead.effort
old: 7146141.343126194
new: 7148.723626422597
path: .spaces[0].metrics.halstead.level
old: 0.007963386727688787
new: 0.14340588988476313
path: .spaces[0].metrics.halstead.n2
old: 435.0
new: 56.0
path: .spaces[0].metrics.halstead.length
old: 6387.0
new: 169.0
path: .spaces[0].metrics.halstead.time
old: 397007.85239589965
new: 397.1513125790332
path: .spaces[0].metrics.halstead.purity_ratio
old: 0.6367313280020075
new: 2.149500730415598
path: .spaces[0].metrics.halstead.difficulty
old: 125.57471264367815
new: 6.973214285714286
path: .spaces[0].metrics.halstead.volume
old: 56907.487126039254
new: 1025.1690731873634
path: .spaces[0].metrics.halstead.n1
old: 46.0
new: 11.0
path: .spaces[0].metrics.halstead.N2
old: 2375.0
new: 71.0
path: .spaces[0].metrics.halstead.N1
old: 4012.0
new: 98.0
path: .spaces[0].metrics.cyclomatic.average
old: 2.1824817518248176
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 299.0
new: 4.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 0.0
new: 38.546428575016094
path: .spaces[0].metrics.mi.mi_sei
old: -133.9238779250068
new: 46.68939732719147
path: .spaces[0].metrics.mi.mi_original
old: -73.15830327410633
new: 65.91439286327753
path: .spaces[0].metrics.cognitive.sum
old: 174.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 1.4871794871794872
new: null
path: .spaces[0].metrics.nargs.average
old: 0.5982905982905983
new: null
path: .spaces[0].metrics.nargs.sum
old: 70.0
new: 0.0
path: .spaces[0].metrics.loc.cloc
old: 74.0
new: 9.0
path: .spaces[0].metrics.loc.ploc
old: 1143.0
new: 46.0
path: .spaces[0].metrics.loc.sloc
old: 1498.0
new: 67.0
path: .spaces[0].metrics.loc.lloc
old: 521.0
new: 0.0
path: .spaces[0].metrics.loc.blank
old: 281.0
new: 12.0
path: .spaces[0].metrics.nom.functions
old: 117.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 117.0
new: 0.0
Code
namespace mozilla {
namespace widget {
class TaskbarPreviewButton;
class TaskbarWindowPreview : public TaskbarPreview,
public nsITaskbarWindowPreview,
public nsITaskbarProgress,
public nsITaskbarOverlayIconController,
public nsSupportsWeakReference {
virtual ~TaskbarWindowPreview();
public:
TaskbarWindowPreview(ITaskbarList4* aTaskbar,
nsITaskbarPreviewController* aController, HWND aHWND,
nsIDocShell* aShell);
virtual nsresult Init() override;
NS_DECL_ISUPPORTS
NS_DECL_NSITASKBARWINDOWPREVIEW
NS_DECL_NSITASKBARPROGRESS
NS_DECL_NSITASKBAROVERLAYICONCONTROLLER
NS_FORWARD_NSITASKBARPREVIEW(TaskbarPreview::)
virtual LRESULT WndProc(UINT nMsg, WPARAM wParam, LPARAM lParam) override;
private:
virtual nsresult ShowActive(bool active) override;
virtual HWND& PreviewWindow() override;
virtual nsresult UpdateTaskbarProperties() override;
virtual nsresult Enable() override;
virtual nsresult Disable() override;
virtual void DetachFromNSWindow() override;
nsresult UpdateButton(uint32_t index);
nsresult UpdateButtons();
// Is custom drawing enabled?
bool mCustomDrawing;
// Have we made any buttons?
bool mHaveButtons;
// Windows button format
THUMBBUTTON mThumbButtons[nsITaskbarWindowPreview::NUM_TOOLBAR_BUTTONS];
// Pointers to our button class (cached instances)
nsWeakPtr mWeakButtons[nsITaskbarWindowPreview::NUM_TOOLBAR_BUTTONS];
// Called to update ITaskbarList4 dependent properties
nsresult UpdateTaskbarProgress();
nsresult UpdateOverlayIcon();
// The taskbar progress
TBPFLAG mState;
ULONGLONG mCurrentValue;
ULONGLONG mMaxValue;
// Taskbar overlay icon
HICON mOverlayIcon;
nsString mIconDescription;
// WindowHook procedure for hooking mWnd for taskbar progress and icon stuff
static bool TaskbarWindowHook(void* aContext, HWND hWnd, UINT nMsg,
WPARAM wParam, LPARAM lParam, LRESULT* aResult);
friend class TaskbarPreviewButton;
};
} // namespace widget
} // namespace mozilla
Minimal test - lines (20, 20)
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 3.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.6666666666666666
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 8.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 0.6666666666666666
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 3.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 12.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 4.754887502163468
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.0017471609294725976
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 1.5
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.188721875540867
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 4.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.average
old: 0.0
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 159.95690398326485
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 155.17000000000002
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 93.54204911302038
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.nexits.average
old: 0.0
new: null
Code
class TaskbarPreviewButton;
Minimal test - lines (18, 82)
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[0].spaces[0].metrics.loc.blank
old: 2.0
new: 13.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 2.0
new: 8.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 15.0
new: 44.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 8.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 19.0
new: 65.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 9.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 9.0
new: 0.0
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 52.2032448892839
new: 39.01513210511447
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 78.18955984689097
new: 46.71171115934066
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 89.26754876067547
new: 66.71587589974574
path: .spaces[0].spaces[0].metrics.halstead.time
old: 167.60034433190123
new: 392.54981808500173
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 62.0
new: 97.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 9.0
new: 11.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 20.0
new: 55.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 92.0
new: 167.0
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 29.0
new: 66.0
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.2496509446818267
new: 2.131907377538123
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 114.96788691072804
new: 356.02853204886657
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 30.0
new: 70.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 446.9342515517366
new: 1009.4138179328615
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 3016.8061979742224
new: 7065.896725530031
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 6.75
new: 7.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.06959483663321864
new: 0.12274117288270078
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.14814814814814814
new: 0.14285714285714285
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 10.0
new: 3.0
path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.8888888888888888
new: null
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 8.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.0
new: null
Code
namespace widget {
class TaskbarPreviewButton;
class TaskbarWindowPreview : public TaskbarPreview,
public nsITaskbarWindowPreview,
public nsITaskbarProgress,
public nsITaskbarOverlayIconController,
public nsSupportsWeakReference {
virtual ~TaskbarWindowPreview();
public:
TaskbarWindowPreview(ITaskbarList4* aTaskbar,
nsITaskbarPreviewController* aController, HWND aHWND,
nsIDocShell* aShell);
virtual nsresult Init() override;
NS_DECL_ISUPPORTS
NS_DECL_NSITASKBARWINDOWPREVIEW
NS_DECL_NSITASKBARPROGRESS
NS_DECL_NSITASKBAROVERLAYICONCONTROLLER
NS_FORWARD_NSITASKBARPREVIEW(TaskbarPreview::)
virtual LRESULT WndProc(UINT nMsg, WPARAM wParam, LPARAM lParam) override;
private:
virtual nsresult ShowActive(bool active) override;
virtual HWND& PreviewWindow() override;
virtual nsresult UpdateTaskbarProperties() override;
virtual nsresult Enable() override;
virtual nsresult Disable() override;
virtual void DetachFromNSWindow() override;
nsresult UpdateButton(uint32_t index);
nsresult UpdateButtons();
// Is custom drawing enabled?
bool mCustomDrawing;
// Have we made any buttons?
bool mHaveButtons;
// Windows button format
THUMBBUTTON mThumbButtons[nsITaskbarWindowPreview::NUM_TOOLBAR_BUTTONS];
// Pointers to our button class (cached instances)
nsWeakPtr mWeakButtons[nsITaskbarWindowPreview::NUM_TOOLBAR_BUTTONS];
// Called to update ITaskbarList4 dependent properties
nsresult UpdateTaskbarProgress();
nsresult UpdateOverlayIcon();
// The taskbar progress
TBPFLAG mState;
ULONGLONG mCurrentValue;
ULONGLONG mMaxValue;
// Taskbar overlay icon
HICON mOverlayIcon;
nsString mIconDescription;
// WindowHook procedure for hooking mWnd for taskbar progress and icon stuff
static bool TaskbarWindowHook(void* aContext, HWND hWnd, UINT nMsg,
WPARAM wParam, LPARAM lParam, LRESULT* aResult);
friend class TaskbarPreviewButton;
};
} // namespace widget