amazon-research / crossnorm-selfnorm
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
  • 51% duplication:
    • 4,680 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,427 duplicated lines
  • 172 duplicates
system51% (2,427 lines)
Duplication per Extension
py51% (2,331 lines)
yaml75% (96 lines)
Duplication per Component (primary)
segmentation/tool97% (728 lines)
segmentation/model56% (621 lines)
ROOT41% (410 lines)
models/imagenet51% (240 lines)
models/cifar34% (209 lines)
models100% (110 lines)
segmentation/config/gtav75% (96 lines)
segmentation/util2% (13 lines)

Duplication Between Components (50+ lines)

G models/imagenet models/imagenet segmentation/model segmentation/model models/imagenet--segmentation/model 427 models models models--segmentation/model 220 models/cifar models/cifar models/cifar--models/imagenet 150 models/cifar--segmentation/model 60

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 172 duplicates...
Size#FoldersFilesLinesCode
133 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
149:297 (36%)
155:303 (35%)
view
126 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
298:439 (34%)
314:455 (33%)
view
110 x 2 models
segmentation/model
cnsn.py
cnsn.py
8:164 (100%)
8:164 (100%)
view
71 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
63:141 (19%)
63:141 (18%)
view
51 x 2 segmentation/model
segmentation/model
cnsn_resnet.py
resnet.py
8:81 (13%)
3:74 (24%)
view
46 x 2 ROOT
ROOT
cifar.py
imagenet.py
25:70 (11%)
20:65 (9%)
view
33 x 2 segmentation/model
segmentation/model
cnsn_resnet.py
resnet.py
160:213 (8%)
74:123 (15%)
view
30 x 2 models/imagenet
segmentation/model
resnet_cnsn.py
resnet.py
326:411 (12%)
267:344 (14%)
view
28 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
24:61 (7%)
24:61 (7%)
view
21 x 2 models/imagenet
models/imagenet
resnet_cnsn.py
resnet_ibn_cnsn.py
65:91 (8%)
71:96 (9%)
view
19 x 2 models/imagenet
segmentation/model
resnet_cnsn.py
resnet.py
8:34 (8%)
8:34 (9%)
view
19 x 2 models/imagenet
segmentation/model
resnet_cnsn.py
cnsn_resnet.py
8:34 (8%)
15:41 (4%)
view
19 x 2 models/cifar
models/cifar
allconv_cnsn.py
densenet_cnsn.py
126:145 (16%)
184:203 (11%)
view
18 x 2 segmentation/config/gtav
segmentation/config/gtav
gtav_fcn50.yaml
gtav_fcn50_cnsn.yaml
39:57 (30%)
49:67 (26%)
view
18 x 2 segmentation/model
segmentation/model
psanet.py
pspnet.py
137:155 (9%)
65:83 (18%)
view
18 x 2 models/cifar
models/cifar
allconv_cnsn.py
wideresnet_cnsn.py
135:158 (15%)
187:208 (11%)
view
18 x 2 models/imagenet
models/imagenet
resnet_cnsn.py
resnet_ibn_cnsn.py
240:266 (7%)
220:245 (7%)
view
16 x 2 models/imagenet
segmentation/model
resnet_cnsn.py
resnet.py
134:152 (6%)
133:151 (7%)
view
15 x 2 ROOT
ROOT
cifar.py
imagenet.py
227:246 (3%)
361:381 (3%)
view
14 x 2 models/imagenet
models/imagenet
resnet_cnsn.py
resnet_ibn_cnsn.py
99:117 (5%)
102:120 (6%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 23 unit duplicates...
Size#FoldersFilesLinesCode
58 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
0:0 
0:0 
view
28 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
0:0 
0:0 
view
26 x 2 segmentation/model
models
cnsn.py
cnsn.py
0:0 
0:0 
view
19 x 2 segmentation/model
models
cnsn.py
cnsn.py
0:0 
0:0 
view
16 x 2 segmentation/model
segmentation/model
resnet.py
cnsn_resnet.py
0:0 
0:0 
view
15 x 2 segmentation/model
models
cnsn.py
cnsn.py
0:0 
0:0 
view
15 x 2 segmentation/model
segmentation/model
resnet.py
cnsn_resnet.py
0:0 
0:0 
view
14 x 2 segmentation/model
segmentation/model
resnet.py
cnsn_resnet.py
0:0 
0:0 
view
13 x 2 ROOT
ROOT
imagenet.py
cifar.py
0:0 
0:0 
view
11 x 2 segmentation/model
segmentation/model
resnet.py
cnsn_resnet.py
0:0 
0:0 
view
11 x 2 segmentation/model
models
cnsn.py
cnsn.py
0:0 
0:0 
view
9 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
0:0 
0:0 
view
8 x 2 segmentation/tool
segmentation/tool
train.py
train_cnsn.py
0:0 
0:0 
view
9 x 2 segmentation/model
models
cnsn.py
cnsn.py
0:0 
0:0 
view
8 x 2 segmentation/model
models
cnsn.py
cnsn.py
0:0 
0:0 
view
10 x 2 segmentation/model
models/imagenet
resnet.py
resnet_cnsn.py
0:0 
0:0 
view
10 x 2 segmentation/model
models/imagenet
resnet.py
resnet_cnsn.py
0:0 
0:0 
view
13 x 2 segmentation/model
models/imagenet
resnet.py
resnet_cnsn.py
0:0 
0:0 
view
13 x 2 segmentation/model
models/imagenet
resnet.py
resnet_cnsn.py
0:0 
0:0 
view
8 x 2 segmentation/model
models/imagenet
resnet.py
resnet_cnsn.py
0:0 
0:0 
view