pytorch / kineto
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:
    • 14,893 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,518 duplicated lines
  • 335 duplicates
system10% (1,518 lines)
Duplication per Extension
yaml66% (656 lines)
tsx17% (465 lines)
cpp4% (199 lines)
py4% (178 lines)
ts4% (12 lines)
h<1% (8 lines)
Duplication per Component (primary)
tb_plugin/fe/src28% (1,133 lines)
libkineto/src3% (207 lines)
tb_plugin/torch_tb_profiler/profiler4% (106 lines)
tb_plugin/torch_tb_profiler/io7% (56 lines)
tb_plugin/torch_tb_profiler1% (16 lines)
libkineto/include0% (0 lines)
libkineto0% (0 lines)
libkineto/sample_programs0% (0 lines)
tb_plugin/packaging/torch_tb_profiler0% (0 lines)
tb_plugin/fe0% (0 lines)
tb_plugin/fe/scripts0% (0 lines)
tb_plugin0% (0 lines)
tb_plugin/torch_tb_profiler/static0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 335 duplicates...
Size#FoldersFilesLinesCode
33 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
351:383 (3%)
411:443 (3%)
view
32 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
111:142 (3%)
145:176 (3%)
view
26 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
111:136 (2%)
187:212 (2%)
view
26 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
145:170 (2%)
187:212 (2%)
view
24 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
238:261 (2%)
263:286 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
86:108 (2%)
263:285 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
86:108 (2%)
288:310 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
263:285 (2%)
514:536 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
187:209 (2%)
446:468 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
86:108 (2%)
238:260 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
326:348 (2%)
514:536 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
86:108 (2%)
386:408 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
145:167 (2%)
446:468 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
238:260 (2%)
514:536 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
288:310 (2%)
326:348 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
288:310 (2%)
386:408 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
86:108 (2%)
326:348 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
263:285 (2%)
326:348 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
263:285 (2%)
386:408 (2%)
view
23 x 2 tb_plugin/fe/src/api
tb_plugin/fe/src/api
openapi.yaml
openapi.yaml
386:408 (2%)
514:536 (2%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 tb_plugin/fe/src/components/tables
tb_plugin/fe/src/components/charts
MemoryStatsTable.tsx
AntTableChart.tsx
43:52 
49:58 
view
9 x 2 tb_plugin/torch_tb_profiler/io
tb_plugin/torch_tb_profiler/io
gs.py
azureblob.py
0:0 
0:0 
view
6 x 2 libkineto/src
libkineto/src
RoctracerActivityApi.cpp
RoctracerActivityApi.cpp
39:46 
48:55 
view