facebookresearch / diplomacy_searchbot
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
  • 63% duplication:
    • 65,559 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 41,683 duplicated lines
  • 1,804,056 duplicates
system63% (41,683 lines)
Duplication per Extension
py77% (40,904 lines)
html5% (360 lines)
h13% (246 lines)
cc3% (127 lines)
proto4% (46 lines)
Duplication per Component (primary)
fairdiplomacy/models95% (40,497 lines)
dipcc/dipcc7% (373 lines)
dipcc/python5% (360 lines)
fairdiplomacy/selfplay3% (136 lines)
fairdiplomacy/agents6% (115 lines)
fairdiplomacy/data5% (66 lines)
fairdiplomacy4% (54 lines)
conf4% (46 lines)
heyhi3% (36 lines)
ROOT0% (0 lines)
fairdiplomacy/utils0% (0 lines)
integration_tests0% (0 lines)
slurm0% (0 lines)
dipcc0% (0 lines)
conf/c02_sup_train0% (0 lines)
conf/exps0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 1,804,056 duplicates...
Size#FoldersFilesLinesCode
469 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
9270:9738 (1%)
22554:23022 (1%)
view
447 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
10246:10692 (1%)
23334:23780 (1%)
view
432 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
7276:7707 (1%)
21264:21695 (1%)
view
334 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
12278:12611 (1%)
23783:24116 (1%)
view
331 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
8158:8488 (1%)
16555:16885 (1%)
view
322 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
12751:13072 (1%)
19408:19729 (1%)
view
303 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
10693:10995 (1%)
14678:14980 (1%)
view
284 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
9881:10164 (1%)
26506:26789 (1%)
view
258 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
9012:9269 (<1%)
20847:21104 (<1%)
view
213 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
8489:8701 (<1%)
26046:26258 (<1%)
view
190 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
5546:5735 (<1%)
26261:26450 (<1%)
view
175 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
4839:5013 (<1%)
20595:20769 (<1%)
view
174 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
5967:6140 (<1%)
17654:17827 (<1%)
view
170 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
13143:13312 (<1%)
13437:13606 (<1%)
view
156 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
845:1000 (<1%)
18976:19131 (<1%)
view
152 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
5394:5545 (<1%)
16336:16487 (<1%)
view
152 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
1535:1686 (<1%)
16951:17102 (<1%)
view
148 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
2273:2420 (<1%)
18365:18512 (<1%)
view
144 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
3342:3485 (<1%)
19134:19277 (<1%)
view
141 x 2 fairdiplomacy/models/diplomacy_model
fairdiplomacy/models/diplomacy_model
order_vocabulary_consts.py
order_vocabulary_consts.py
2132:2272 (<1%)
18672:18812 (<1%)
view