amazon-research / generalized-fairness-metrics
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
  • 7% duplication:
    • 5,664 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 448 duplicated lines
  • 31 duplicates
system7% (448 lines)
Duplication per Extension
py5% (222 lines)
jsonnet49% (130 lines)
tsx7% (44 lines)
ts5% (38 lines)
js25% (14 lines)
Duplication per Component (primary)
experiments49% (130 lines)
src/models/readers31% (130 lines)
expanded_checklist/visual_interface/src5% (82 lines)
expanded_checklist/checklist/viewer21% (52 lines)
expanded_checklist/visual_interface/lib28% (14 lines)
expanded_checklist/checklist<1% (14 lines)
expanded_checklist/checklist/graphs3% (14 lines)
ROOT7% (12 lines)
src0% (0 lines)
src/models0% (0 lines)
expanded_checklist0% (0 lines)
expanded_checklist/visual_interface0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 31 duplicates...
Size#FoldersFilesLinesCode
31 x 2 experiments
experiments
electra.jsonnet
roberta.jsonnet
45:75 (42%)
45:75 (42%)
view
19 x 2 experiments
experiments
electra.jsonnet
roberta.jsonnet
7:25 (26%)
7:25 (26%)
view
16 x 2 src/models/readers
src/models/readers
semeval_reader.py
simple_reader.py
55:77 (23%)
65:84 (28%)
view
15 x 2 experiments
experiments
electra.jsonnet
roberta.jsonnet
27:41 (20%)
27:41 (20%)
view
14 x 2 src/models/readers
src/models/readers
semeval_reader.py
sst_reader.py
31:47 (20%)
70:85 (16%)
view
12 x 2 src/models/readers
src/models/readers
huggingface_reader.py
simple_reader.py
23:35 (21%)
22:34 (21%)
view
11 x 2 src/models/readers
src/models/readers
flexible_reader.py
huggingface_reader.py
122:133 (11%)
68:79 (20%)
view
11 x 2 expanded_checklist/checklist/viewer
expanded_checklist/checklist/viewer
fake_data.py
fake_data.py
22:32 (9%)
38:48 (9%)
view
9 x 2 expanded_checklist/visua...onents/suite_summarizer
expanded_checklist/visua...ponents/template_editor
SuiteSummarizer.tsx
TemplateEditor.tsx
57:69 (5%)
27:41 (13%)
view
9 x 2 expanded_checklist/visual_interface/src/stores
expanded_checklist/visual_interface/src/stores
FakeData.ts
FakeData.ts
7:15 (2%)
47:55 (2%)
view
9 x 2 expanded_checklist/checklist/viewer
expanded_checklist/checklist/viewer
fake_data.py
fake_data.py
50:58 (7%)
85:93 (7%)
view
8 x 2 src/models/readers
src/models/readers
huggingface_reader.py
simple_reader.py
75:84 (14%)
73:82 (14%)
view
8 x 2 src/models/readers
src/models/readers
huggingface_reader.py
semeval_reader.py
75:84 (14%)
63:72 (11%)
view
7 x 2 expanded_checklist/checklist/viewer
expanded_checklist/checklist/viewer
fake_data.py
fake_data.py
43:49 (5%)
55:61 (5%)
view
7 x 2 expanded_checklist/visual_interface/lib
expanded_checklist/visual_interface/lib
embed.js
index.js
8:20 (100%)
6:18 (100%)
view
7 x 2 expanded_checklist/checklist/graphs
expanded_checklist/checklist/graphs
graphs.py
graphs.py
294:301 (1%)
461:468 (1%)
view
7 x 2 expanded_checklist/visua...onents/suite_summarizer
expanded_checklist/visua...ponents/template_editor
viewer.tsx
viewer.tsx
37:45 (7%)
35:43 (14%)
view
7 x 2 expanded_checklist/visual_interface/src/stores
expanded_checklist/visual_interface/src/stores
FakeData.ts
FakeData.ts
103:109 (1%)
131:137 (1%)
view
7 x 2 expanded_checklist/checklist/viewer
expanded_checklist/checklist/viewer
fake_data.py
fake_data.py
37:43 (5%)
65:71 (5%)
view
7 x 2 src/models/readers
src/models/readers
flexible_reader.py
sst_reader.py
38:44 (7%)
53:59 (8%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 src/models/readers
src/models/readers
semeval_reader.py
sst_reader.py
0:0 
0:0 
view
7 x 2 expanded_checklist/visua...ponents/template_editor
expanded_checklist/visua...ponents/template_editor
TokenSpan.tsx
TokenSpan.tsx
33:40 
41:48 
view