aws-samples / amazon-ivs-basic-web-sample
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
  • 28% duplication:
    • 1,021 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 293 duplicated lines
  • 39 duplicates
system28% (293 lines)
Duplication per Extension
css36% (193 lines)
html34% (54 lines)
js13% (46 lines)
Duplication per Component (primary)
custom-player-controls30% (117 lines)
simple-quiz30% (85 lines)
minimal-player-setup69% (27 lines)
videojs-integration29% (26 lines)
multiple-players15% (20 lines)
ambiance-canvas19% (18 lines)

Duplication Between Components (50+ lines)

G custom-player-controls custom-player-controls simple-quiz simple-quiz custom-player-controls--simple-quiz 163 minimal-player-setup minimal-player-setup videojs-integration videojs-integration minimal-player-setup--videojs-integration 52

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 39 duplicates...
Size#FoldersFilesLinesCode
23 x 2 custom-player-controls
simple-quiz
script.js
script.js
53:80 (17%)
31:58 (32%)
view
22 x 2 custom-player-controls
simple-quiz
style.css
style.css
197:222 (11%)
164:189 (11%)
view
14 x 2 minimal-player-setup
videojs-integration
style.css
style.css
4:18 (66%)
4:18 (66%)
view
13 x 2 custom-player-controls
simple-quiz
style.css
style.css
11:26 (7%)
10:25 (6%)
view
13 x 2 multiple-players
simple-quiz
style.css
style.css
5:22 (20%)
5:22 (6%)
view
11 x 2 custom-player-controls
simple-quiz
style.css
style.css
34:45 (5%)
45:56 (5%)
view
10 x 2 multiple-players
videojs-integration
style.css
style.css
13:23 (15%)
4:14 (47%)
view
10 x 2 ambiance-canvas
multiple-players
style.css
style.css
1:11 (20%)
13:23 (15%)
view
10 x 2 minimal-player-setup
multiple-players
style.css
style.css
4:14 (47%)
13:23 (15%)
view
10 x 2 ambiance-canvas
videojs-integration
style.css
style.css
1:11 (20%)
4:14 (47%)
view
10 x 2 custom-player-controls
multiple-players
style.css
style.css
11:23 (5%)
10:22 (15%)
view
10 x 2 ambiance-canvas
minimal-player-setup
style.css
style.css
1:11 (20%)
4:14 (47%)
view
9 x 2 custom-player-controls
videojs-integration
style.css
style.css
14:23 (4%)
4:13 (42%)
view
9 x 2 simple-quiz
videojs-integration
style.css
style.css
13:22 (4%)
4:13 (42%)
view
9 x 2 ambiance-canvas
custom-player-controls
style.css
style.css
1:10 (18%)
14:23 (4%)
view
9 x 2 minimal-player-setup
simple-quiz
style.css
style.css
4:13 (42%)
13:22 (4%)
view
9 x 2 ambiance-canvas
simple-quiz
style.css
style.css
1:10 (18%)
13:22 (4%)
view
9 x 2 custom-player-controls
minimal-player-setup
style.css
style.css
14:23 (4%)
4:13 (42%)
view
8 x 2 ambiance-canvas
minimal-player-setup
style.css
style.css
16:24 (16%)
18:26 (38%)
view
7 x 2 custom-player-controls
simple-quiz
style.css
style.css
191:197 (3%)
59:65 (3%)
view