dart-lang / build
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
  • 5% duplication:
    • 16,278 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 942 duplicated lines
  • 130 duplicates
system5% (942 lines)
Duplication per Extension
dart4% (635 lines)
yaml22% (291 lines)
html22% (16 lines)
Duplication per Component (primary)
build_runner10% (375 lines)
build_web_compilers6% (117 lines)
build_runner_core2% (104 lines)
_test36% (96 lines)
build_test5% (39 lines)
build_modules2% (34 lines)
_test_null_safety27% (30 lines)
build_resolvers4% (28 lines)
build_vm_compilers13% (25 lines)
build_daemon3% (24 lines)
scratch_space13% (16 lines)
build_config2% (15 lines)
_test_common2% (12 lines)
tool19% (11 lines)
example5% (8 lines)
build<1% (8 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G _test _test _test_null_safety _test_null_safety _test--_test_null_safety 60 build_vm_compilers build_vm_compilers build_web_compilers build_web_compilers build_vm_compilers--build_web_compilers 56 build_modules build_modules build_modules--build_web_compilers 56

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 130 duplicates...
Size#FoldersFilesLinesCode
29 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
137:165 (7%)
285:313 (7%)
view
23 x 2 _test
_test_null_safety
pubspec.yaml
pubspec.yaml
25:47 (52%)
16:38 (65%)
view
18 x 2 build_web_compilers/lib/src
build_web_compilers/lib/src
platforms.dart
platforms.dart
8:25 (46%)
28:45 (46%)
view
18 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
106:123 (4%)
249:266 (4%)
view
17 x 2 build_runner/lib/src/build_script_generate
build_runner/lib/src/build_script_generate
build_script_generate.dart
build_script_generate.dart
253:269 (5%)
286:302 (5%)
view
17 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
serve.dart
watch.dart
85:101 (14%)
49:65 (26%)
view
16 x 2 build_test
scratch_space
mono_pkg.yaml
mono_pkg.yaml
1:18 (100%)
1:18 (100%)
view
16 x 2 _test
_test
build.post_process.yaml
build.throws.yaml
7:22 (72%)
7:22 (72%)
view
15 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
191:205 (3%)
370:384 (3%)
view
14 x 2 build_config
build_test
mono_pkg.yaml
mono_pkg.yaml
2:17 (93%)
3:18 (87%)
view
14 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
149:162 (3%)
231:244 (3%)
view
14 x 2 build_config
scratch_space
mono_pkg.yaml
mono_pkg.yaml
2:17 (93%)
3:18 (87%)
view
14 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
231:244 (3%)
297:310 (3%)
view
13 x 2 build_runner_core/lib/src/package_graph
build_runner_core/lib/src/package_graph
apply_builders.dart
apply_builders.dart
167:182 (4%)
208:223 (4%)
view
12 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
219:230 (3%)
284:295 (3%)
view
12 x 2 build_resolvers/lib/src
build_runner_core/lib/src/logging
human_readable_duration.dart
human_readable_duration.dart
16:30 (100%)
13:27 (100%)
view
12 x 2 build_config
build_daemon
mono_pkg.yaml
mono_pkg.yaml
1:13 (80%)
1:13 (100%)
view
12 x 2 build_config
build_web_compilers
mono_pkg.yaml
mono_pkg.yaml
1:13 (80%)
1:13 (100%)
view
12 x 2 build_daemon
build_web_compilers
mono_pkg.yaml
mono_pkg.yaml
1:13 (100%)
1:13 (100%)
view
11 x 2 build_config
tool
mono_pkg.yaml
mono_repo.yaml
1:12 (73%)
1:12 (100%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 build_resolvers/lib/src
build_runner_core/lib/src/logging
human_readable_duration.dart
human_readable_duration.dart
16:31 
13:28 
view
11 x 2 build_web_compilers/lib/src
build_vm_compilers/lib/src
web_entrypoint_builder.dart
vm_entrypoint_builder.dart
170:188 
83:101 
view
9 x 2 build_web_compilers/lib/src
build_web_compilers/web
common.dart
stack_trace_mapper.dart
67:77 
42:52 
view
7 x 2 build_runner/lib/src/entrypoint
build_runner/lib/src/entrypoint
options.dart
options.dart
108:115 
251:258 
view