facebookincubator / flowtorch
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
  • 14% duplication:
    • 3,540 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 526 duplicated lines
  • 130 duplicates
system14% (526 lines)
Duplication per Extension
py12% (271 lines)
css30% (210 lines)
js10% (45 lines)
Duplication per Component (primary)
website/src/theme33% (153 lines)
flowtorch/bijectors17% (146 lines)
website/src/css18% (96 lines)
flowtorch18% (50 lines)
flowtorch/bijectors/ops38% (49 lines)
scripts3% (14 lines)
flowtorch/distributions10% (12 lines)
website/src/pages21% (6 lines)
flowtorch/nn0% (0 lines)
flowtorch/parameters0% (0 lines)
flowtorch/ops0% (0 lines)
ROOT0% (0 lines)
website0% (0 lines)
website/static/assets0% (0 lines)

Duplication Between Components (50+ lines)

G flowtorch/bijectors flowtorch/bijectors flowtorch/bijectors/ops flowtorch/bijectors/ops flowtorch/bijectors--flowtorch/bijectors/ops 137

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 130 duplicates...
Size#FoldersFilesLinesCode
18 x 2 website/src/theme/Hero
website/src/theme/PythonMethod
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/Hero
website/src/theme/PythonFunction
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonClass
website/src/theme/PythonNavbar
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonFunction
website/src/theme/PythonNavbar
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonModule
website/src/theme/PythonNavbar
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonMethod
website/src/theme/PythonNavbar
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonClass
website/src/theme/PythonModule
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonClass
website/src/theme/PythonFunction
1:27 (100%)
1:27 (100%)
view
18 x 2 flowtorch/bijectors
flowtorch/bijectors
12:29 (94%)
13:30 (94%)
view
18 x 2 website/src/theme/PythonFunction
website/src/theme/PythonModule
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/Hero
website/src/theme/PythonClass
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonMethod
website/src/theme/PythonModule
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/Hero
website/src/theme/PythonModule
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonClass
website/src/theme/PythonMethod
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/Hero
website/src/theme/PythonNavbar
1:27 (100%)
1:27 (100%)
view
18 x 2 website/src/theme/PythonFunction
website/src/theme/PythonMethod
1:27 (100%)
1:27 (100%)
view
15 x 2 flowtorch/bijectors
flowtorch/bijectors/ops
12:30 (93%)
13:32 (28%)
view
14 x 2 flowtorch
flowtorch
258:275 (9%)
70:87 (28%)
view
11 x 2 website/src/theme/PythonFunction
website/src/theme/PythonModule
21:34 (55%)
21:34 (55%)
view
11 x 2 website/src/theme/PythonClass
website/src/theme/PythonFunction
21:34 (55%)
21:34 (55%)
view
11 x 2 website/src/theme/PythonClass
website/src/theme/PythonModule
21:34 (55%)
21:34 (55%)
view
10 x 2 flowtorch/bijectors
flowtorch/bijectors/ops
13:22 (52%)
19:28 (19%)
view
10 x 2 website/src/css
website/src/css
415:424 (1%)
450:459 (1%)
view
10 x 2 flowtorch/bijectors
flowtorch/bijectors
17:26 (62%)
13:22 (52%)
view
10 x 2 website/src/css
website/src/css
450:459 (1%)
467:476 (1%)
view
10 x 2 website/src/css
website/src/css
415:424 (1%)
467:476 (1%)
view
10 x 2 flowtorch/bijectors/ops
flowtorch/bijectors
22:31 (13%)
13:22 (52%)
view
10 x 2 flowtorch/bijectors/ops
flowtorch/bijectors
22:31 (13%)
12:21 (52%)
view
9 x 2 website/src/css
website/src/css
501:509 (1%)
594:603 (1%)
view
9 x 2 website/src/css
website/src/css
501:509 (1%)
568:577 (1%)
view
9 x 2 website/src/css
website/src/css
501:509 (1%)
551:560 (1%)
view
9 x 2 website/src/css
website/src/css
568:577 (1%)
594:603 (1%)
view
9 x 2 website/src/css
website/src/css
611:619 (1%)
627:635 (1%)
view
9 x 2 website/src/css
website/src/css
551:560 (1%)
594:603 (1%)
view
9 x 2 website/src/css
website/src/css
551:560 (1%)
568:577 (1%)
view
8 x 2 flowtorch
flowtorch
61:72 (5%)
202:215 (5%)
view
8 x 2 flowtorch/bijectors
flowtorch/bijectors
17:25 (15%)
14:23 (21%)
view
8 x 2 flowtorch/bijectors
flowtorch/bijectors
20:27 (15%)
12:19 (61%)
view
7 x 2 flowtorch/bijectors
flowtorch/bijectors
25:31 (4%)
11:17 (58%)
view
7 x 2 flowtorch/bijectors
flowtorch/bijectors
12:22 (43%)
13:25 (19%)
view
7 x 2 flowtorch/bijectors
flowtorch/bijectors/ops
13:25 (19%)
13:24 (13%)
view
7 x 2 scripts
scripts
98:105 (7%)
171:178 (7%)
view
7 x 2 flowtorch/bijectors
flowtorch/bijectors
42:49 (13%)
109:116 (4%)
view
6 x 2 website/src/pages
website/src/theme/PythonNavbar
17:23 (37%)
15:21 (33%)
view
6 x 2 flowtorch/bijectors
flowtorch/bijectors
17:22 (37%)
19:24 (17%)
view
6 x 2 flowtorch/bijectors
flowtorch/bijectors
42:47 (11%)
72:77 (5%)
view
6 x 2 flowtorch/bijectors
flowtorch/bijectors
11:16 (50%)
19:24 (17%)
view
6 x 2 flowtorch/bijectors
flowtorch/bijectors
20:25 (11%)
25:30 (4%)
view
6 x 2 flowtorch/bijectors
flowtorch/bijectors
13:18 (31%)
19:24 (17%)
view
6 x 2 flowtorch/bijectors
flowtorch/bijectors/ops
25:30 (4%)
19:24 (11%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
15 x 3 website/src/theme/PythonModule
website/src/theme/PythonFunction
website/src/theme/PythonClass
12:35 
12:35 
12:35 
view
7 x 3 flowtorch/bijectors
flowtorch/bijectors
flowtorch/bijectors/ops
0:0 
0:0 
0:0 
view
7 x 3 flowtorch/bijectors
flowtorch/bijectors
flowtorch/bijectors/ops
0:0 
0:0 
0:0 
view