microsoft / msticpy
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 10% duplication:
    • 33,903 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,404 duplicated lines
  • 1,061 duplicates
system10% (3,404 lines)
Duplication per Extension
yaml39% (1,866 lines)
py5% (1,512 lines)
yml7% (26 lines)
Duplication per Component (primary)
msticpy/data21% (2,118 lines)
msticpy/analysis22% (430 lines)
msticpy/sectools4% (255 lines)
msticpy/nbtools3% (199 lines)
msticpy/config4% (101 lines)
msticpy/datamodel2% (100 lines)
msticpy/vis11% (54 lines)
msticpy/resources13% (53 lines)
msticpy/common2% (46 lines)
ROOT5% (26 lines)
tools1% (15 lines)
tools/toollib1% (7 lines)
msticpy0% (0 lines)
tools/misc0% (0 lines)

Duplication Between Components (50+ lines)

G msticpy/nbtools msticpy/nbtools msticpy/vis msticpy/vis msticpy/nbtools--msticpy/vis 108

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 1,061 duplicates...
Size#FoldersFilesLinesCode
36 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_lxsyslog_logon.yaml
kql_sent_lxsyslog_logon.yaml
75:110 (11%)
209:244 (11%)
view
23 x 2 msticpy/nbtools
msticpy/vis
nbdisplay.py
entity_graph_tools.py
231:258 (11%)
483:511 (8%)
view
21 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_az_network.yaml
kql_sent_net.yaml
34:54 (25%)
9:29 (9%)
view
20 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_winevent_proc.yaml
kql_sent_winevent_proc.yaml
117:136 (5%)
235:254 (5%)
view
19 x 2 msticpy/data/queries
msticpy/data/queries
graph_alerts.yaml
kql_sent_winevent_proc.yaml
15:33 (10%)
42:60 (5%)
view
19 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_lxsyslog_activity.yaml
kql_sent_lxsyslog_apps.yaml
13:31 (16%)
10:28 (27%)
view
19 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_winevent_logon.yaml
kql_sent_winevent_logon.yaml
155:173 (8%)
180:198 (8%)
view
18 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_az_network.yaml
kql_sent_lxsyslog_apps.yaml
15:32 (21%)
15:32 (25%)
view
18 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_lxauditd.yaml
kql_sent_lxsyslog_activity.yaml
15:32 (35%)
18:35 (15%)
view
18 x 2 msticpy/analysis/anomalous_sequence/utils
msticpy/analysis/anomalous_sequence/utils
cmds_only.py
cmds_params_values.py
125:173 (12%)
342:400 (6%)
view
17 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_lxsyslog_activity.yaml
kql_sent_lxsyslog_apps.yaml
36:52 (14%)
29:45 (24%)
view
16 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_winevent_logon.yaml
kql_sent_winevent_logon.yaml
134:149 (7%)
180:195 (7%)
view
16 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_winevent_logon.yaml
kql_sent_winevent_logon.yaml
134:149 (7%)
155:170 (7%)
view
16 x 2 msticpy/data/queries
msticpy/data/queries
kql_mdatp_file.yaml
kql_mdatp_process.yaml
10:25 (22%)
10:25 (19%)
view
16 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_winevent_logon.yaml
kql_sent_winevent_logon.yaml
88:103 (7%)
109:124 (7%)
view
15 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_azuresentinel.yaml
kql_sent_winevent.yaml
15:29 (8%)
15:29 (12%)
view
15 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_winevent_logon.yaml
kql_sent_winevent_proc.yaml
44:58 (6%)
41:55 (4%)
view
15 x 2 msticpy/analysis/anomalous_sequence/utils
msticpy/analysis/anomalous_sequence/utils
cmds_only.py
cmds_params_only.py
198:244 (10%)
321:372 (7%)
view
15 x 2 msticpy/data/azure
msticpy/data/azure
azure_data.py
azure_data.py
404:418 (2%)
421:435 (2%)
view
14 x 2 msticpy/data/queries
msticpy/data/queries
kql_sent_az_network.yaml
kql_sent_lxsyslog_activity.yaml
15:28 (16%)
18:31 (12%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 msticpy/nbtools
msticpy/vis
nbdisplay.py
entity_graph_tools.py
0:0 
0:0 
view
6 x 3 msticpy/sectools/tiproviders
msticpy/sectools/tiproviders
msticpy/sectools/tiproviders
kql_base.py
open_page_rank.py
ti_provider_base.py
0:0 
0:0 
0:0 
view
8 x 2 msticpy/data/drivers
tools
driver_base.py
mp_demo_data.py
0:0 
0:0 
view
35 x 2 msticpy/nbtools
msticpy/vis
process_tree.py
mp_pandas_plot.py
0:0 
0:0 
view
14 x 2 msticpy/sectools/tiproviders
msticpy/sectools/tiproviders
riskiq.py
tor_exit_nodes.py
0:0 
0:0 
view