dart-lang / dart-pad
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
  • 19% duplication:
    • 13,333 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,545 duplicated lines
  • 338 duplicates
system19% (2,545 lines)
Duplication per Extension
dart11% (1,001 lines)
html65% (940 lines)
scss26% (538 lines)
css18% (52 lines)
yaml8% (14 lines)
Duplication per Component (primary)
web66% (700 lines)
lib/src22% (651 lines)
web/styles35% (499 lines)
web/example46% (303 lines)
lib5% (153 lines)
lib/elements6% (66 lines)
lib/sharing5% (44 lines)
lib/scss5% (39 lines)
web/scripts26% (37 lines)
lib/editing4% (18 lines)
lib/services5% (16 lines)
lib/workshops7% (12 lines)
lib/util6% (7 lines)
lib/core0% (0 lines)
lib/inject0% (0 lines)
lib/modules0% (0 lines)
protos0% (0 lines)
tool0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G lib/scss lib/scss web/styles web/styles lib/scss--web/styles 50

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 338 duplicates...
Size#FoldersFilesLinesCode
58 x 2 web
web
embed-dart.html
embed-flutter.html
39:128 (43%)
39:128 (41%)
view
57 x 2 web
web
embed-flutter.html
embed-inline.html
39:121 (40%)
39:121 (42%)
view
57 x 2 web
web
embed-dart.html
embed-inline.html
39:121 (42%)
39:121 (42%)
view
51 x 2 web
web
embed-dart.html
embed-inline.html
129:206 (38%)
129:206 (38%)
view
44 x 2 web
web
embed-flutter.html
embed-html.html
147:217 (31%)
171:241 (28%)
view
39 x 2 web
web
embed-flutter.html
embed-html.html
71:132 (27%)
89:151 (25%)
view
35 x 2 web
web
embed-dart.html
embed-flutter.html
153:206 (26%)
163:217 (25%)
view
35 x 2 web
web
embed-flutter.html
embed-inline.html
163:217 (25%)
153:206 (26%)
view
35 x 2 web
web
embed-html.html
embed-inline.html
187:241 (22%)
153:206 (26%)
view
35 x 2 web
web
embed-dart.html
embed-html.html
71:128 (26%)
89:147 (22%)
view
35 x 2 web
web
embed-dart.html
embed-html.html
153:206 (26%)
187:241 (22%)
view
34 x 2 web
web
embed-html.html
embed-inline.html
89:139 (21%)
71:121 (25%)
view
34 x 2 web/example/workshops/flutter/step_01
web/example/workshops/flutter/step_01
snippet.dart
solution.dart
5:50 (79%)
5:50 (68%)
view
26 x 2 web/example
web/example
embed.html
embed.html
142:169 (8%)
187:214 (8%)
view
25 x 2 web
web
embed-flutter.html
embed-html.html
39:73 (17%)
39:73 (16%)
view
25 x 2 web
web
embed-html.html
embed-inline.html
39:73 (16%)
39:73 (18%)
view
25 x 2 web
web
embed-dart.html
embed-html.html
39:73 (18%)
39:73 (16%)
view
24 x 2 web
web
embed-flutter.html
embed-inline.html
1:36 (17%)
1:36 (17%)
view
24 x 2 web
web
embed-html.html
embed-inline.html
1:36 (15%)
1:36 (17%)
view
24 x 2 web
web
embed-dart.html
embed-html.html
1:36 (17%)
1:36 (15%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 web/example/workshops/flutter/step_01
web/example/workshops/flutter/step_01
solution.dart
snippet.dart
11:20 
11:20 
view
7 x 2 lib
lib
workshops.dart
playground_context.dart
449:456 
138:145 
view
6 x 2 lib
lib
workshops.dart
playground.dart
110:118 
485:493 
view