microsoft / tensorwatch
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
  • 5% duplication:
    • 6,191 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 340 duplicated lines
  • 28 duplicates
system5% (340 lines)
Duplication per Extension
py5% (340 lines)
Duplication per Component (primary)
tensorwatch/mpl19% (84 lines)
tensorwatch/model_graph/hiddenlayer4% (77 lines)
tensorwatch3% (69 lines)
tensorwatch/saliency5% (42 lines)
tensorwatch/plotly13% (36 lines)
tensorwatch/model_graph/torchstat3% (22 lines)
tensorwatch/model_graph16% (10 lines)
ROOT0% (0 lines)
tensorwatch/embeddings0% (0 lines)
tensorwatch/receptive_field0% (0 lines)
tensorwatch/saliency/lime0% (0 lines)

Duplication Between Components (50+ lines)

G tensorwatch/mpl tensorwatch/mpl tensorwatch/plotly tensorwatch/plotly tensorwatch/mpl--tensorwatch/plotly 58

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 28 duplicates...
Size#FoldersFilesLinesCode
29 x 2 tensorwatch/mpl
tensorwatch/plotly
line_plot.py
line_plot.py
133:165 (22%)
114:146 (22%)
view
18 x 2 tensorwatch/mpl
tensorwatch/mpl
bar_plot.py
histogram.py
30:50 (20%)
28:48 (39%)
view
10 x 2 tensorwatch/model_graph/torchstat
tensorwatch/model_graph
reporter.py
torchstat_utils.py
10:20 (14%)
45:55 (16%)
view
9 x 2 tensorwatch
tensorwatch
lv_types.py
visualizer.py
53:69 (7%)
15:31 (14%)
view
9 x 2 tensorwatch/saliency
tensorwatch/saliency
inverter_util.py
inverter_util.py
296:328 (3%)
454:485 (3%)
view
9 x 2 tensorwatch
tensorwatch
watcher.py
watcher_client.py
49:63 (14%)
50:64 (17%)
view
8 x 2 tensorwatch/mpl
tensorwatch/mpl
bar_plot.py
line_plot.py
31:38 (8%)
52:59 (6%)
view
8 x 2 tensorwatch/mpl
tensorwatch/mpl
histogram.py
line_plot.py
29:36 (17%)
52:59 (6%)
view
7 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
pytorch_builder.py
pytorch_builder_trace.py
97:107 (8%)
78:88 (15%)
view
7 x 2 tensorwatch/mpl
tensorwatch/mpl
histogram.py
pie_chart.py
46:56 (15%)
30:40 (19%)
view
7 x 2 tensorwatch/plotly
tensorwatch
base_plotly_plot.py
vis_base.py
94:104 (9%)
141:151 (5%)
view
7 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
pytorch_builder.py
pytorch_builder_grad.py
97:107 (8%)
101:109 (10%)
view
7 x 2 tensorwatch
tensorwatch
image_utils.py
image_utils.py
62:69 (8%)
110:117 (8%)
view
7 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
summary_graph.py
summary_graph.py
417:423 (1%)
484:490 (1%)
view
7 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
pytorch_builder_grad.py
pytorch_builder_trace.py
101:109 (10%)
78:88 (15%)
view
6 x 2 tensorwatch
tensorwatch
stream_factory.py
watcher_base.py
29:35 (9%)
51:57 (4%)
view
6 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
pytorch_builder.py
pytorch_builder_grad.py
19:29 (7%)
18:28 (9%)
view
6 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
pytorch_builder_trace.py
pytorch_draw_model.py
81:88 (13%)
26:33 (6%)
view
6 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
transforms.py
transforms.py
33:40 (4%)
98:105 (4%)
view
6 x 2 tensorwatch/model_graph/hiddenlayer
tensorwatch/model_graph/hiddenlayer
pytorch_builder_grad.py
pytorch_draw_model.py
102:109 (9%)
26:33 (6%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
10 x 2 tensorwatch/model_graph/torchstat
tensorwatch/model_graph
reporter.py
torchstat_utils.py
0:0 
0:0 
view
12 x 2 tensorwatch
tensorwatch
watcher.py
watcher_client.py
0:0 
0:0 
view
8 x 2 tensorwatch
tensorwatch
image_utils.py
image_utils.py
0:0 
0:0 
view