flutter / packages
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
  • 22% duplication:
    • 22,933 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,251 duplicated lines
  • 950 duplicates
system22% (5,251 lines)
Duplication per Extension
dart13% (2,513 lines)
cpp93% (1,337 lines)
html90% (389 lines)
h72% (300 lines)
cc79% (272 lines)
cmake96% (128 lines)
yaml18% (126 lines)
swift82% (112 lines)
m13% (74 lines)
Duplication per Component (primary)
packages/rfw43% (2,843 lines)
packages/pigeon19% (948 lines)
packages/flutter_markdown26% (665 lines)
packages/animations19% (490 lines)
packages/extension_google_sign_in_as_googleapis_auth29% (80 lines)
packages/pointer_interceptor16% (50 lines)
packages/palette_generator4% (49 lines)
packages/cross_file15% (44 lines)
packages/web_benchmarks2% (36 lines)
packages/multicast_dns3% (26 lines)
packages/imitation_game4% (14 lines)
packages/flutter_image2% (6 lines)
ROOT0% (0 lines)
packages/flutter_lints0% (0 lines)
packages/flutter_template_images0% (0 lines)
packages/css_colors0% (0 lines)
packages/metrics_center0% (0 lines)
packages/fuchsia_ctl0% (0 lines)
packages/xdg_directories0% (0 lines)

Duplication Between Components (50+ lines)

G packages/flutter_markdown packages/flutter_markdown packages/rfw packages/rfw packages/flutter_markdown--packages/rfw 1695 packages/pigeon packages/pigeon packages/flutter_markdown--packages/pigeon 510 packages/pigeon--packages/rfw 1430 packages/extension_google_sign_in_as_googleapis_auth packages/extension_google_sign_in_as_googleapis_auth packages/extension_google_sign_in_as_googleapis_auth--packages/rfw 340 packages/palette_generator packages/palette_generator packages/palette_generator--packages/rfw 80

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 950 duplicates...
Size#FoldersFilesLinesCode
140 x 2 packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/pigeon/platform.../example/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
10:238 (100%)
11:239 (100%)
view
140 x 2 packages/flutter_markdown/example/windows/runner
packages/rfw/example/local/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/rfw/example/hello/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/pigeon/platform.../example/windows/runner
packages/rfw/example/local/windows/runner
win32_window.cpp
win32_window.cpp
10:238 (100%)
11:239 (100%)
view
140 x 2 packages/rfw/example/hello/windows/runner
packages/rfw/example/wasm/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/flutter_markdown/example/windows/runner
packages/pigeon/platform.../example/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
10:238 (100%)
view
140 x 2 packages/pigeon/platform.../example/windows/runner
packages/rfw/example/wasm/windows/runner
win32_window.cpp
win32_window.cpp
10:238 (100%)
11:239 (100%)
view
140 x 2 packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/flutter_markdown/example/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/rfw/example/local/windows/runner
packages/rfw/example/wasm/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/rfw/example/remote/windows/runner
packages/rfw/example/wasm/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/pigeon/platform.../example/windows/runner
packages/rfw/example/hello/windows/runner
win32_window.cpp
win32_window.cpp
10:238 (100%)
11:239 (100%)
view
140 x 2 packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
140 x 2 packages/flutter_markdown/example/windows/runner
packages/rfw/example/hello/windows/runner
win32_window.cpp
win32_window.cpp
11:239 (100%)
11:239 (100%)
view
63 x 2 packages/rfw/example/hello/web
packages/rfw/example/wasm/web
index.html
index.html
36:104 (82%)
36:104 (82%)
view
63 x 2 packages/rfw/example/hello/web
packages/rfw/example/local/web
index.html
index.html
36:104 (82%)
36:104 (82%)
view
63 x 2 packages/rfw/example/local/web
packages/rfw/example/remote/web
index.html
index.html
36:104 (82%)
36:104 (82%)
view
63 x 2 packages/rfw/example/remote/web
packages/rfw/example/wasm/web
index.html
index.html
36:104 (82%)
36:104 (82%)
view
63 x 2 packages/rfw/example/local/web
packages/rfw/example/wasm/web
index.html
index.html
36:104 (82%)
36:104 (82%)
view
Duplicated Units
The list of top 19 duplicated units.
See data for all 19 unit duplicates...
Size#FoldersFilesLinesCode
33 x 5 packages/flutter_markdown/example/linux
packages/rfw/example/wasm/linux
packages/rfw/example/hello/linux
packages/rfw/example/local/linux
packages/rfw/example/remote/linux
my_application.cc
my_application.cc
my_application.cc
my_application.cc
my_application.cc
22:68 
22:68 
22:68 
22:68 
22:68 
view
23 x 2 packages/pigeon/platform...ull_safe_unit_tests/lib
packages/pigeon/platform...ull_safe_unit_tests/lib
null_safe_pigeon.dart
primitive.dart
230:253 
30:53 
view
23 x 5 packages/pigeon/platform.../example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
main.cpp
main.cpp
main.cpp
main.cpp
main.cpp
11:45 
12:46 
12:46 
12:46 
12:46 
view
19 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
utils.cpp
utils.cpp
utils.cpp
utils.cpp
utils.cpp
utils.cpp
47:66 
48:67 
48:67 
48:67 
48:67 
48:67 
view
19 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
106:130 
107:131 
107:131 
107:131 
107:131 
107:131 
view
14 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
133:149 
134:150 
134:150 
134:150 
134:150 
134:150 
view
14 x 5 packages/flutter_markdown/example/linux
packages/rfw/example/wasm/linux
packages/rfw/example/hello/linux
packages/rfw/example/local/linux
packages/rfw/example/remote/linux
my_application.cc
my_application.cc
my_application.cc
my_application.cc
my_application.cc
71:89 
71:89 
71:89 
71:89 
71:89 
view
13 x 5 packages/pigeon/platform.../example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
flutter_window.cpp
flutter_window.cpp
flutter_window.cpp
flutter_window.cpp
flutter_window.cpp
15:33 
16:34 
16:34 
16:34 
16:34 
view
13 x 2 packages/flutter_markdown/lib/src
packages/flutter_markdown/lib/src
_functions_web.dart
_functions_io.dart
75:88 
72:85 
view
12 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
utils.cpp
utils.cpp
utils.cpp
utils.cpp
utils.cpp
utils.cpp
13:25 
14:26 
14:26 
14:26 
14:26 
14:26 
view
12 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
utils.cpp
utils.cpp
utils.cpp
utils.cpp
utils.cpp
utils.cpp
27:45 
28:46 
28:46 
28:46 
28:46 
28:46 
view
12 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
27:39 
28:40 
28:40 
28:40 
28:40 
28:40 
view
10 x 2 packages/pigeon/platform...ull_safe_unit_tests/lib
packages/pigeon/platform...ull_safe_unit_tests/lib
non_null_fields.gen.dart
non_null_fields.gen.dart
68:78 
135:145 
view
9 x 2 packages/pigeon/platform...ull_safe_unit_tests/lib
packages/pigeon/platform...ull_safe_unit_tests/lib
non_null_fields.gen.dart
non_null_fields.gen.dart
81:92 
148:159 
view
9 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
193:203 
194:204 
194:204 
194:204 
194:204 
194:204 
view
7 x 2 packages/pigeon/platform...ull_safe_unit_tests/lib
packages/pigeon/platform...ull_safe_unit_tests/lib
all_datatypes.dart
all_datatypes.dart
91:98 
177:184 
view
7 x 2 packages/pigeon/platform...ull_safe_unit_tests/lib
packages/pigeon/platform...ull_safe_unit_tests/lib
all_datatypes.dart
all_datatypes.dart
101:109 
187:195 
view
7 x 6 packages/pigeon/platform.../example/windows/runner
packages/flutter_markdown/example/windows/runner
packages/rfw/example/wasm/windows/runner
packages/rfw/example/hello/windows/runner
packages/rfw/example/local/windows/runner
packages/rfw/example/remote/windows/runner
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
win32_window.cpp
210:219 
211:220 
211:220 
211:220 
211:220 
211:220 
view
7 x 2 packages/web_benchmarks/lib
packages/web_benchmarks/lib
client.dart
client.dart
301:308 
311:318 
view