flutter / cocoon
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
  • 9% duplication:
    • 18,835 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,837 duplicated lines
  • 149 duplicates
system9% (1,837 lines)
Duplication per Extension
dart8% (1,449 lines)
yaml32% (164 lines)
cc65% (80 lines)
proto34% (74 lines)
swift54% (32 lines)
cmake66% (26 lines)
html27% (12 lines)
Duplication per Component (primary)
app_dart/lib8% (742 lines)
dashboard/lib8% (370 lines)
release_dashboard/lib13% (255 lines)
repo_dashboard/lib8% (144 lines)
app_dart31% (82 lines)
dashboard58% (82 lines)
release_dashboard/linux65% (53 lines)
dashboard/linux70% (53 lines)
device_doctor/lib1% (12 lines)
repo_dashboard/ios88% (8 lines)
dashboard/ios88% (8 lines)
release_dashboard/macos57% (8 lines)
dashboard/macos66% (8 lines)
repo_dashboard/web26% (6 lines)
dashboard/web30% (6 lines)
device_doctor/tool0% (0 lines)
device_doctor0% (0 lines)
ROOT0% (0 lines)
licenses0% (0 lines)
oneoff/cirrus_stats0% (0 lines)
release_dashboard0% (0 lines)
app_dart/integration_test0% (0 lines)
app_dart/dev0% (0 lines)
repo_dashboard0% (0 lines)
repo_dashboard/android0% (0 lines)
dashboard/windows0% (0 lines)
dashboard/android0% (0 lines)

Duplication Between Components (50+ lines)

G app_dart/lib app_dart/lib dashboard/lib dashboard/lib app_dart/lib--dashboard/lib 506 app_dart app_dart dashboard dashboard app_dart--dashboard 164 dashboard/linux dashboard/linux release_dashboard/linux release_dashboard/linux dashboard/linux--release_dashboard/linux 106

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 149 duplicates...
Size#FoldersFilesLinesCode
152 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
key.pb.dart
key.pb.dart
8:193 (100%)
8:193 (100%)
view
59 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
build_status_response.pb.dart
build_status_response.pb.dart
8:78 (100%)
8:78 (100%)
view
33 x 2 app_dart
dashboard
analysis_options.yaml
analysis_options.yaml
88:139 (30%)
76:130 (28%)
view
26 x 2 app_dart/lib/src/request_handling
app_dart/lib/src/request_handling
api_request_handler.dart
no_auth_request_handler.dart
119:151 (28%)
71:103 (41%)
view
19 x 2 app_dart/lib/src/request_handling
app_dart/lib/src/request_handling
api_request_handler.dart
subscription_handler.dart
109:129 (20%)
68:88 (17%)
view
16 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
proto
key.proto
key.proto
1:21 (100%)
1:21 (100%)
view
16 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
cherrypicks_substeps.dart
verify_release_substep.dart
168:184 (11%)
123:139 (15%)
view
15 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
merge_pr_substeps.dart
verify_release_substep.dart
223:238 (8%)
124:139 (14%)
view
15 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
publish_release_substeps.dart
verify_release_substep.dart
79:94 (21%)
124:139 (14%)
view
15 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
cherrypicks_substeps.dart
merge_pr_substeps.dart
169:184 (10%)
223:238 (8%)
view
15 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
cherrypicks_substeps.dart
publish_release_substeps.dart
169:184 (10%)
79:94 (21%)
view
15 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
merge_pr_substeps.dart
publish_release_substeps.dart
223:238 (8%)
79:94 (21%)
view
14 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
build_status_response.pbenum.dart
build_status_response.pbenum.dart
9:26 (100%)
9:26 (100%)
view
14 x 2 repo_dashboard/lib/models
repo_dashboard/lib/models
skia_autoroll.dart
status_page_status.dart
59:78 (25%)
60:79 (24%)
view
14 x 2 release_dashboard/lib/widgets
release_dashboard/lib/widgets
cherrypicks_substeps.dart
merge_pr_substeps.dart
72:93 (10%)
104:125 (8%)
view
14 x 2 app_dart
dashboard
analysis_options.yaml
analysis_options.yaml
154:173 (12%)
146:165 (12%)
view
14 x 2 app_dart
dashboard
analysis_options.yaml
analysis_options.yaml
45:69 (12%)
27:52 (12%)
view
13 x 2 repo_dashboard/lib/models
repo_dashboard/lib/models
roll_history.dart
status_page_status.dart
65:83 (10%)
60:78 (22%)
view
13 x 2 dashboard/linux/flutter
release_dashboard/linux/flutter
cmake
generated_plugins.cmake
generated_plugins.cmake
1:16 (100%)
1:16 (100%)
view
13 x 2 app_dart/lib/src/request_handlers
app_dart/lib/src/request_handlers
check_flaky_builders.dart
file_flaky_issue_and_pr.dart
5:32 (9%)
5:25 (12%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
20 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
key.pb.dart
key.pb.dart
28:48 
28:48 
view
14 x 2 app_dart/lib/src/model/appengine
app_dart/lib/src/model/appengine
github_gold_status_update.dart
github_build_status_update.dart
53:67 
48:62 
view
12 x 2 release_dashboard/linux
dashboard/linux
my_application.cc
my_application.cc
66:82 
67:83 
view
12 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
key.pb.dart
key.pb.dart
134:146 
134:146 
view
12 x 2 app_dart/lib/src/model/proto/internal
dashboard/lib/model
build_status_response.pb.dart
build_status_response.pb.dart
27:39 
27:39 
view
9 x 2 app_dart/lib/src/model/appengine
app_dart/lib/src/model/appengine
stage.dart
allowed_account.dart
94:103 
30:39 
view
9 x 3 repo_dashboard/lib/services
repo_dashboard/lib/services
repo_dashboard/lib/services
build_status_service.dart
status_page_service.dart
skia_autoroll_service.dart
93:102 
30:39 
31:40 
view
6 x 2 app_dart/lib/src/service
app_dart/lib/src/service
buildbucket.dart
buildbucket.dart
74:80 
109:115 
view
6 x 2 dashboard/lib/widgets
dashboard/lib/logic
filter_property_sheet.dart
task_grid_filter.dart
68:74 
177:183 
view