dart-lang / pub
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
  • 3% duplication:
    • 13,738 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 453 duplicated lines
  • 44 duplicates
system3% (453 lines)
Duplication per Extension
dart3% (453 lines)
Duplication per Component (primary)
lib/src/command6% (197 lines)
lib/src3% (196 lines)
lib/src/source4% (54 lines)
lib/src/solver<1% (6 lines)
lib0% (0 lines)
lib/src/validator0% (0 lines)
lib/src/authentication0% (0 lines)
lib/src/sdk0% (0 lines)
tool/test-bin0% (0 lines)
tool0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 44 duplicates...
Size#FoldersFilesLinesCode
18 x 2 lib/src
lib/src
packages_file.dart
packages_file.dart
320:347 (6%)
383:410 (6%)
view
13 x 2 lib/src/command
lib/src/command
upgrade.dart
upgrade.dart
191:209 (3%)
293:311 (3%)
view
11 x 2 lib/src
lib/src
packages_file.dart
packages_file.dart
352:365 (4%)
417:430 (4%)
view
9 x 2 lib/src/command
lib/src/command
upgrade.dart
upgrade.dart
241:253 (2%)
339:351 (2%)
view
8 x 2 lib/src/command
lib/src/command
add.dart
get.dart
83:92 (2%)
23:32 (14%)
view
8 x 2 lib/src/command
lib/src/command
downgrade.dart
remove.dart
40:50 (13%)
48:59 (7%)
view
8 x 2 lib/src
lib/src
executable.dart
executable.dart
112:119 (3%)
128:135 (3%)
view
8 x 2 lib/src/command
lib/src/command
lish.dart
uploader.dart
196:203 (3%)
44:51 (10%)
view
8 x 2 lib/src/command
lib/src/command
remove.dart
upgrade.dart
34:43 (7%)
41:50 (2%)
view
8 x 2 lib/src/source
lib/src/source
path.dart
sdk.dart
173:184 (6%)
74:83 (10%)
view
8 x 2 lib/src
lib/src
command_runner.dart
pub_embeddable_command.dart
13:20 (4%)
10:17 (9%)
view
7 x 2 lib/src/command
lib/src/command
get.dart
upgrade.dart
39:46 (12%)
69:76 (2%)
view
7 x 2 lib/src/command
lib/src/command
get.dart
remove.dart
23:31 (12%)
34:42 (6%)
view
7 x 2 lib/src/command
lib/src/command
get.dart
upgrade.dart
23:31 (12%)
41:49 (2%)
view
7 x 2 lib/src/command
lib/src/command
add.dart
remove.dart
83:91 (2%)
34:42 (6%)
view
7 x 2 lib/src
lib/src
log.dart
log.dart
165:171 (2%)
175:181 (2%)
view
7 x 2 lib/src/command
lib/src/command
downgrade.dart
get.dart
37:44 (11%)
39:46 (12%)
view
7 x 2 lib/src/command
lib/src/command
add.dart
upgrade.dart
83:91 (2%)
41:49 (2%)
view
7 x 2 lib/src/command
lib/src/command
downgrade.dart
remove.dart
61:67 (11%)
87:94 (6%)
view
7 x 2 lib/src
lib/src
command_runner.dart
pub_embeddable_command.dart
124:130 (4%)
68:74 (8%)
view