facebookresearch / tbsm
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
  • 10% duplication:
    • 1,322 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 144 duplicated lines
  • 10 duplicates
system10% (144 lines)
Duplication per Extension
py10% (144 lines)
Duplication per Component (primary)
ROOT8% (96 lines)
tools29% (48 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
14 x 2 tools
tools
taobao_prepare.py
taobao_prepare.py
180:193 (8%)
197:210 (8%)
view
12 x 2 ROOT
ROOT
tbsm_pytorch.py
tbsm_synthetic.py
76:87 (1%)
151:162 (5%)
view
8 x 2 ROOT
ROOT
tbsm_data_pytorch.py
tbsm_data_pytorch.py
118:125 (2%)
342:349 (2%)
view
8 x 2 tools
tools
taobao_prepare.py
taobao_prepare.py
154:161 (4%)
164:171 (4%)
view
8 x 2 ROOT
ROOT
tbsm_data_pytorch.py
tbsm_data_pytorch.py
190:197 (2%)
299:306 (2%)
view
7 x 2 ROOT
ROOT
tbsm_pytorch.py
tbsm_pytorch.py
561:568 (1%)
788:795 (1%)
view
7 x 2 ROOT
ROOT
tbsm_data_pytorch.py
tbsm_synthetic.py
351:358 (2%)
81:88 (3%)
view
6 x 2 ROOT
ROOT
tbsm_data_pytorch.py
tbsm_data_pytorch.py
149:156 (1%)
274:280 (1%)
view
6 x 2 tools
tools
taobao_prepare.py
taobao_prepare.py
163:168 (3%)
196:201 (3%)
view
6 x 2 tools
tools
taobao_prepare.py
taobao_prepare.py
153:158 (3%)
179:184 (3%)
view