dart-lang / webdev
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
  • 7% duplication:
    • 11,788 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 855 duplicated lines
  • 61 duplicates
system7% (855 lines)
Duplication per Extension
dart6% (720 lines)
yaml22% (114 lines)
html42% (21 lines)
Duplication per Component (primary)
dwds/lib2% (138 lines)
fixtures/_webdevSmoke71% (98 lines)
example/web68% (88 lines)
fixtures/_test70% (83 lines)
fixtures/_testSound70% (83 lines)
fixtures/_testPackageSound74% (65 lines)
fixtures/_testPackage81% (65 lines)
frontend_server_common/lib5% (65 lines)
frontend_server_client/lib13% (61 lines)
dwds27% (29 lines)
webdev27% (22 lines)
fixtures/_webdevSoundSmoke58% (17 lines)
webdev/lib<1% (12 lines)
example52% (10 lines)
dwds/debug_extension1% (7 lines)
frontend_server_client17% (6 lines)
frontend_server_common26% (6 lines)
dwds/tool0% (0 lines)
dwds/web0% (0 lines)
ROOT0% (0 lines)
frontend_server_client/example0% (0 lines)

Duplication Between Components (50+ lines)

G example/web example/web fixtures/_webdevSmoke fixtures/_webdevSmoke example/web--fixtures/_webdevSmoke 176 fixtures/_test fixtures/_test fixtures/_testSound fixtures/_testSound fixtures/_test--fixtures/_testSound 166 fixtures/_testPackage fixtures/_testPackage fixtures/_testPackageSound fixtures/_testPackageSound fixtures/_testPackage--fixtures/_testPackageSound 130

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 61 duplicates...
Size#FoldersFilesLinesCode
34 x 2 fixtures/_testPackage/web
fixtures/_testPackageSound/web
main.dart
main.dart
47:102 (53%)
56:111 (48%)
view
26 x 2 fixtures/_test/example/hello_world
fixtures/_testSound/example/hello_world
main.dart
main.dart
5:41 (34%)
5:41 (34%)
view
24 x 2 example/web
fixtures/_webdevSmoke/web
scopes_main.dart
scopes_main.dart
32:61 (23%)
34:63 (25%)
view
23 x 2 fixtures/_test/example/hello_world
fixtures/_testSound/example/hello_world
main.dart
main.dart
74:118 (30%)
75:119 (30%)
view
15 x 2 frontend_server_client/lib/src
frontend_server_common/lib/src
dartdevc_bootstrap_amd.dart
bootstrap.dart
17:34 (46%)
24:40 (39%)
view
14 x 2 dwds
webdev
mono_pkg.yaml
mono_pkg.yaml
21:34 (42%)
21:34 (42%)
view
14 x 2 fixtures/_test/example/hello_world
fixtures/_testSound/example/hello_world
main.dart
main.dart
51:68 (18%)
51:68 (18%)
view
13 x 2 example/web
fixtures/_webdevSmoke/web
scopes_main.dart
scopes_main.dart
88:107 (12%)
84:103 (13%)
view
12 x 2 example/web
fixtures/_webdevSmoke/web
scopes_main.dart
scopes_main.dart
111:132 (11%)
107:128 (12%)
view
12 x 2 example/web
fixtures/_webdevSmoke/web
scopes_main.dart
scopes_main.dart
13:30 (11%)
15:32 (12%)
view
10 x 2 fixtures/_testPackage/web
fixtures/_testPackageSound/web
main.dart
main.dart
32:41 (15%)
31:40 (14%)
view
10 x 2 example/web
fixtures/_webdevSoundSmoke/web
main.dart
main.dart
5:16 (66%)
5:16 (66%)
view
10 x 2 example/web
fixtures/_webdevSmoke/web
main.dart
main.dart
5:16 (66%)
7:18 (66%)
view
10 x 2 example
fixtures/_webdevSmoke
mono_pkg.yaml
mono_pkg.yaml
2:12 (100%)
2:12 (100%)
view
10 x 2 example/web
fixtures/_webdevSmoke/web
scopes_main.dart
scopes_main.dart
64:76 (9%)
64:76 (10%)
view
10 x 2 fixtures/_webdevSmoke/web
fixtures/_webdevSoundSmoke/web
main.dart
main.dart
7:18 (66%)
5:16 (66%)
view
9 x 2 dwds/lib/src/services
frontend_server_common/lib/src
expression_compiler_service.dart
frontend_server_client.dart
261:269 (3%)
761:769 (1%)
view
9 x 2 fixtures/_testPackage/web
fixtures/_testPackageSound/web
main.dart
main.dart
7:17 (14%)
5:15 (12%)
view
9 x 2 frontend_server_client/lib/src
frontend_server_client/lib/src
dartdevc_frontend_server_client.dart
frontend_server_client.dart
150:158 (6%)
220:228 (3%)
view
8 x 2 dwds/lib/src/handlers
dwds/lib/src/handlers
injector.dart
injector.dart
138:145 (4%)
192:199 (4%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 example/web
fixtures/_webdevSmoke/web
scopes_main.dart
scopes_main.dart
95:104 
91:100 
view
8 x 2 frontend_server_client/lib/src
frontend_server_client/lib/src
dartdevc_frontend_server_client.dart
frontend_server_client.dart
150:158 
220:228 
view
7 x 2 frontend_server_client/lib/src
frontend_server_client/lib/src
dartdevc_frontend_server_client.dart
frontend_server_client.dart
138:145 
209:216 
view