facebookresearch / unbiased-teacher
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
  • 31% duplication:
    • 1,914 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 597 duplicated lines
  • 55 duplicates
system31% (597 lines)
Duplication per Extension
py20% (315 lines)
yaml78% (282 lines)
Duplication per Component (primary)
ubteacher/engine43% (240 lines)
configs/coco_supervision97% (185 lines)
configs/voc97% (86 lines)
ubteacher/data12% (61 lines)
ubteacher/checkpoint24% (14 lines)
configs/coco_additional28% (11 lines)
ubteacher0% (0 lines)
ubteacher/solver0% (0 lines)
ubteacher/modeling0% (0 lines)
configs0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G configs/coco_supervision configs/coco_supervision configs/voc configs/voc configs/coco_supervision--configs/voc 105 configs/coco_additional configs/coco_additional configs/coco_additional--configs/coco_supervision 66

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 55 duplicates...
Size#FoldersFilesLinesCode
32 x 2 configs/voc
configs/voc
voc07_voc12.yaml
voc07_voc12coco20.yaml
1:32 (72%)
1:32 (72%)
view
25 x 2 ubteacher/engine
ubteacher/engine
trainer.py
trainer.py
182:220 (5%)
663:696 (5%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup05_run1.yaml
faster_rcnn_R_50_FPN_sup1_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup05_run1.yaml
faster_rcnn_R_50_FPN_sup5_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup10_run1.yaml
faster_rcnn_R_50_FPN_sup2_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup2_run1.yaml
faster_rcnn_R_50_FPN_sup5_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup1_run1.yaml
faster_rcnn_R_50_FPN_sup5_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup1_run1.yaml
faster_rcnn_R_50_FPN_sup2_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 ubteacher/engine
ubteacher/engine
trainer.py
trainer.py
232:266 (4%)
593:629 (4%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup10_run1.yaml
faster_rcnn_R_50_FPN_sup5_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup05_run1.yaml
faster_rcnn_R_50_FPN_sup10_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup05_run1.yaml
faster_rcnn_R_50_FPN_sup2_run1.yaml
1:23 (60%)
1:23 (60%)
view
23 x 2 configs/coco_supervision
configs/coco_supervision
faster_rcnn_R_50_FPN_sup10_run1.yaml
faster_rcnn_R_50_FPN_sup1_run1.yaml
1:23 (60%)
1:23 (60%)
view
22 x 2 ubteacher/engine
ubteacher/engine
trainer.py
trainer.py
155:179 (4%)
342:366 (4%)
view
18 x 2 ubteacher/engine
ubteacher/engine
trainer.py
trainer.py
63:97 (3%)
306:340 (3%)
view
16 x 2 ubteacher/data
ubteacher/data
build.py
build.py
63:80 (7%)
171:188 (7%)
view
15 x 2 configs/coco_supervision
configs/voc
faster_rcnn_R_50_FPN_sup1_run1.yaml
voc07_voc12coco20.yaml
1:15 (39%)
1:15 (34%)
view
15 x 2 configs/coco_supervision
configs/voc
faster_rcnn_R_50_FPN_sup10_run1.yaml
voc07_voc12coco20.yaml
1:15 (39%)
1:15 (34%)
view
15 x 2 configs/coco_supervision
configs/voc
faster_rcnn_R_50_FPN_sup5_run1.yaml
voc07_voc12.yaml
1:15 (39%)
1:15 (34%)
view
15 x 2 configs/coco_supervision
configs/voc
faster_rcnn_R_50_FPN_sup2_run1.yaml
voc07_voc12.yaml
1:15 (39%)
1:15 (34%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 ubteacher/engine
ubteacher/engine
trainer.py
trainer.py
0:0 
0:0 
view
24 x 2 ubteacher/engine
ubteacher/engine
trainer.py
trainer.py
0:0 
0:0 
view