apple / ml-gsn
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
  • 15% duplication:
    • 3,142 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 484 duplicated lines
  • 17 duplicates
system15% (484 lines)
Duplication per Extension
yaml86% (244 lines)
py9% (224 lines)
cu4% (16 lines)
Duplication per Component (primary)
configs/models95% (244 lines)
datasets63% (174 lines)
models/op6% (40 lines)
models1% (26 lines)
builders0% (0 lines)
ROOT0% (0 lines)
notebooks0% (0 lines)
options0% (0 lines)
scripts0% (0 lines)
utils0% (0 lines)
Longest Duplicates
The list of 17 longest duplicates.
See data for all 17 duplicates...
Size#FoldersFilesLinesCode
82 x 2 configs/models
configs/models
gsn_base_config.yaml
gsn_replica_config.yaml
4:92 (96%)
4:92 (96%)
view
35 x 2 configs/models
configs/models
gsn_base_config.yaml
gsn_vizdoom_config.yaml
54:92 (41%)
54:92 (41%)
view
35 x 2 configs/models
configs/models
gsn_replica_config.yaml
gsn_vizdoom_config.yaml
54:92 (41%)
54:92 (41%)
view
26 x 2 datasets
datasets
replica.py
vizdoom.py
61:96 (20%)
61:96 (22%)
view
23 x 2 configs/models
configs/models
gsn_base_config.yaml
gsn_vizdoom_config.yaml
28:52 (27%)
28:52 (27%)
view
23 x 2 configs/models
configs/models
gsn_replica_config.yaml
gsn_vizdoom_config.yaml
28:52 (27%)
28:52 (27%)
view
22 x 2 configs/models
configs/models
gsn_base_config.yaml
gsn_vizdoom_config.yaml
4:26 (25%)
4:26 (25%)
view
22 x 2 configs/models
configs/models
gsn_replica_config.yaml
gsn_vizdoom_config.yaml
4:26 (25%)
4:26 (25%)
view
17 x 2 datasets
datasets
replica.py
vizdoom.py
135:155 (13%)
131:151 (14%)
view
15 x 2 datasets
datasets
replica.py
vizdoom.py
16:30 (11%)
16:30 (12%)
view
14 x 2 datasets
datasets
replica.py
vizdoom.py
42:58 (11%)
42:58 (11%)
view
12 x 2 models/op
models/op
fused_act.py
native_ops.py
80:96 (17%)
6:23 (23%)
view
8 x 2 datasets
datasets
replica.py
vizdoom.py
33:40 (6%)
33:40 (6%)
view
8 x 2 models/op
models/op
fused_bias_act_kernel.cu
upfirdn2d_kernel.cu
1:10 (10%)
1:10 (2%)
view
7 x 2 datasets
datasets
replica.py
vizdoom.py
114:121 (5%)
111:118 (5%)
view
7 x 2 models
models
generator.py
generator.py
624:630 (1%)
654:660 (1%)
view
6 x 2 models
models
generator.py
generator.py
184:190 (1%)
304:310 (1%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
13 x 2 datasets
datasets
replica.py
vizdoom.py
0:0 
0:0 
view
7 x 2 models/op
models/op
fused_act.py
native_ops.py
0:0 
0:0 
view
6 x 2 datasets
datasets
replica.py
vizdoom.py
0:0 
0:0 
view