Public report of join-the-flock/flock, published 17 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 17 November 2026, 08:34 UTC · Survey ID cd_ac8abae64c30488bba93c9931232c12e

join-the-flock/flock

Measured 17 November 2026, 08:25 UTC, at code version 7208e38

First survey, so nothing to compare with yet
CAI score 33.3out of 100 At risk

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A very large codebase: 1,136,604 lines of product code in 63 projects, tests not counted · Estimated rebuild effort: about 16.2 person-years · Weakest lens: Security and Compliance, 26.7

Findings by how serious they are

133 critical 5656 serious 729 minor

8 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 08:25 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

82of 82 dimensions measured by tools.
6484of 6518 findings point to an exact file and line, so you can open each one in the code. The other 34 concern the repository as a whole, such as missing documentation.
82dimensions across 8 lenses, read from 1,136,604 lines of product code in 63 projects.
Chapters

Executive summary

join-the-flock/flock is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back in part because we found no access checks on the code's endpoints or handlers. It scores 33.3 out of 100, which the At risk rating leaves unchanged.

Security and Compliance, at 26.7, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 5.0 points. Replacing the weak hashes comes next, worth about 3.7 points. Raising Security and Compliance to 70 would lift the score to about 38.9.

Twenty-four known security holes in the packages the code depends on can be used by attackers. Four passwords or keys are open to anyone who can read the repository, and eighty-seven parts of the code are no longer understood by anyone working on it. Updating the vulnerable packages, replacing each exposed password or key and having someone learn the forgotten files would close these risks. Pinning each tool to an exact version would fix the four pipeline tools referenced by a changeable name, and setting a waiting period for automatic updates would deal with the two automatic dependency updates that take new releases at once. The four pieces of product code that depend on test code need their reference to the test project removed.

The product code is 1,136,604 lines, about €2,400,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 26.7 · counts for 45%Accessibility 29.0 · counts for 25%Code Health 37.0 · counts for 14%Production Readiness 41.1 · counts for 8%Maturity 63.1 · counts for 4%Architecture 69.0 · counts for 2%Performance 70.7 · counts for 1%Domain Modelling 100.0 · counts for 1%

If Security and Compliance rose from 26.7 to 70, the lowest score rated Strong, the score would rise from 33.3 to about 38.9.

Code composition: what the lines of code are
Product code 49%Tests 51%
Rebuild cost: about €2,400,000 · Estimate
Cost to rebuild€780,000 to €3,900,000, for 13,079 to 41,491 hours of work, about 16.2 person-years for 9 to 31 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 33. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeVery large: 1,136,604 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 5.0 points · Medium effort · Access Controls
2
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
This repository constructs a collision-broken hash (MD5/SHA1) at 11 sites, not one: `engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:716` (md5.convert(…)), `packages/flutter_goldens/lib/skia_client.dart:586` (md5.convert(…)), `packages/flutter_tools/lib/src/android/gradle.dart:1177` (sha1.startChunkedConversion(…)), `packages/flutter_tools/lib/src/base/fingerprint.dart:90` (md5.convert(…)), `packages/flutter_tools/lib/src/build_system/build_system.dart:379` (md5.convert(…)), `packages/flutter_tools/lib/src/bundle.dart:38` (md5.convert(…)), `packages/flutter_tools/lib/src/cache.dart:1415` (md5.startChunkedConversion(…)), `packages/flutter_tools/lib/src/commands/build_ios.dart:288` (md5.convert(…)), and 3 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Raises the score by about 3.7 points · Medium effort · Web-Security Posture
3
Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED (4).
Raises the score by about 1.8 points · Low effort · Secrets (history)

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €2,400,000 to build again, about 16.2 person-years of work. Its weakest lens is Security and Compliance, at 26.7 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 5.0 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 441,131 lines over the last 90 days, which is about 1,789,031 lines a year. At that pace, the extra work comes to an estimated 118.7 to 712.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch android_driver_extensions android_driver_extensions flutter flutter android_driver_extensions->flutter flutter_driver flutter_driver android_driver_extensions->flutter_driver flutter_goldens flutter_goldens android_driver_extensions->flutter_goldens build_bucket_golden_scraper build_bucket_golden_scraper engine_repo_tools engine_repo_tools build_bucket_golden_scraper->engine_repo_tools clang_tidy clang_tidy clang_tidy->engine_repo_tools git_repo_tools git_repo_tools clang_tidy->git_repo_tools clangd_check clangd_check clangd_check->engine_repo_tools engine_build_configs engine_build_configs engine_build_configs->engine_repo_tools engine_tool engine_tool engine_tool->engine_build_configs engine_tool->engine_repo_tools flutter_driver->flutter flutter_goldens->flutter flutter_localizations flutter_localizations flutter_localizations->flutter flutter_tools flutter_tools flutter_tools_core flutter_tools_core flutter_tools->flutter_tools_core flutter_tools_extension flutter_tools_extension flutter_tools->flutter_tools_extension flutter_tools_extension_linux_prototype flutter_tools_extension_linux_prototype flutter_tools->flutter_tools_extension_linux_prototype flutter_tools_extension->flutter_tools_core flutter_tools_extension_linux_prototype->flutter_tools_core flutter_tools_extension_linux_prototype->flutter_tools_extension header_guard_check header_guard_check header_guard_check->engine_repo_tools header_guard_check->git_repo_tools ios_scenario_app ios_scenario_app ios_scenario_app->engine_repo_tools skia_gold_client skia_gold_client ios_scenario_app->skia_gold_client skia_gold_client->engine_repo_tools skia_gold_client->git_repo_tools ui ui __more__ +42 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

84 modules, with 96 dependencies between them. 2 loops run through 18 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 44 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 com.flutter.gradle.FlutterPluginUtils2 com.flutter.gradle.plugins3 engine.src.flutter.testing.run_tests4 io.flutter.embedding.engine.plugins.broadcastreceiver5 io.flutter.embedding.engine.plugins.contentprovider6 io.flutter.embedding.engine.plugins.lifecycle7 io.flutter.embedding.engine.plugins.service8 io.flutter.plugin.common9 io.flutter.util10 repository.web_ui11 com.flutter.gradle12 engine.src.flutter.testing13 io.flutter.embedding.engine.dart14 io.flutter.embedding.engine.loader15 io.flutter.embedding.engine.mutatorsstack16 repository.src17 com.flutter.gradle.DslVersionCodes18 com.flutter.gradle.FlutterCompileOptions19 com.flutter.gradle.Version20 com.flutter.gradle.tasks21 io.flutter.embedding.engine.deferredcomponents22 io.flutter.plugin.platform23 repository24 repository.framework25 com.flutter.gradle.FlutterPlugin26 com.flutter.gradle.tasks.ValidateCompileSdkVersionTask27 io.flutter.plugin.editing28 io.flutter.embedding.engine.systemchannels29 io.flutter.plugin.localization30 io.flutter.plugin.mouse31 io.flutter.plugin.view32 io.flutter.view33 io.flutter.embedding.engine.plugins34 io.flutter.embedding.engine.renderer35 io.flutter.embedding.android36 io.flutter.embedding.engine.plugins.activity37 io.flutter.embedding.engine38 io.flutter.plugin.text39 io.flutter40 io.flutter.embedding.engine.plugins.util
1 com.flutter.gradle.FlutterPluginUtils
2 com.flutter.gradle.plugins
3 engine.src.flutter.testing.run_tests
4 io.flutter.embedding.engine.plugins.broadcastreceiver
5 io.flutter.embedding.engine.plugins.contentprovider
6 io.flutter.embedding.engine.plugins.lifecycle
7 io.flutter.embedding.engine.plugins.service
8 io.flutter.plugin.common
9 io.flutter.util
10 repository.web_ui
11 com.flutter.gradle22
12 engine.src.flutter.testing2
13 io.flutter.embedding.engine.dart2213
14 io.flutter.embedding.engine.loader1
15 io.flutter.embedding.engine.mutatorsstack11
16 repository.src1323
17 com.flutter.gradle.DslVersionCodes1
18 com.flutter.gradle.FlutterCompileOptions1
19 com.flutter.gradle.Version1
20 com.flutter.gradle.tasks1
21 io.flutter.embedding.engine.deferredcomponents122
22 io.flutter.plugin.platform13422211284
23 repository1225
24 repository.framework22
25 com.flutter.gradle.FlutterPlugin21
26 com.flutter.gradle.tasks.ValidateCompileSdkVersionTask1
27 io.flutter.plugin.editing121612
28 io.flutter.embedding.engine.systemchannels53181112
29 io.flutter.plugin.localization3
30 io.flutter.plugin.mouse2
31 io.flutter.plugin.view2
32 io.flutter.view132
33 io.flutter.embedding.engine.plugins1112
34 io.flutter.embedding.engine.renderer203
35 io.flutter.embedding.android344212322113
36 io.flutter.embedding.engine.plugins.activity51
37 io.flutter.embedding.engine4425515311717235415
38 io.flutter.plugin.text2222
39 io.flutter222
40 io.flutter.embedding.engine.plugins.util1
Uses a module listed above itPart of a loopThe module itself
1 com.flutter.gradle.FlutterPluginUtils2 com.flutter.gradle.plugins3 engine.src.flutter.testing.run_tests4 io.flutter.embedding.engine.plugins.broadcastreceiver5 io.flutter.embedding.engine.plugins.contentprovider6 io.flutter.embedding.engine.plugins.lifecycle7 io.flutter.embedding.engine.plugins.service8 io.flutter.plugin.common9 io.flutter.util10 repository.web_ui11 com.flutter.gradle12 engine.src.flutter.testing13 io.flutter.embedding.engine.dart14 io.flutter.embedding.engine.loader15 io.flutter.embedding.engine.mutatorsstack16 repository.src17 com.flutter.gradle.DslVersionCodes18 com.flutter.gradle.FlutterCompileOptions19 com.flutter.gradle.Version20 com.flutter.gradle.tasks21 io.flutter.embedding.engine.deferredcomponents22 io.flutter.plugin.platform23 repository24 repository.framework25 com.flutter.gradle.FlutterPlugin26 com.flutter.gradle.tasks.ValidateCompileSdkVersionTask27 io.flutter.plugin.editing28 io.flutter.embedding.engine.systemchannels29 io.flutter.plugin.localization30 io.flutter.plugin.mouse31 io.flutter.plugin.view32 io.flutter.view33 io.flutter.embedding.engine.plugins34 io.flutter.embedding.engine.renderer35 io.flutter.embedding.android36 io.flutter.embedding.engine.plugins.activity37 io.flutter.embedding.engine38 io.flutter.plugin.text39 io.flutter40 io.flutter.embedding.engine.plugins.utilcom.flutter.gradle.FlutterPluginUtils1com.flutter.gradle.plugins2engine.src.flutter.testing.run_tests3io.flutter.embedding.engine.plugins.broadcastreceiver4io.flutter.embedding.engine.plugins.contentprovider5io.flutter.embedding.engine.plugins.lifecycle6io.flutter.embedding.engine.plugins.service7io.flutter.plugin.common8io.flutter.util9repository.web_ui10com.flutter.gradle11engine.src.flutter.testing12io.flutter.embedding.engine.dart13io.flutter.embedding.engine.loader14io.flutter.embedding.engine.mutatorsstack15repository.src16com.flutter.gradle.DslVersionCodes17com.flutter.gradle.FlutterCompileOptions18com.flutter.gradle.Version19com.flutter.gradle.tasks20io.flutter.embedding.engine.deferredcomponents21io.flutter.plugin.platform22repository23repository.framework24com.flutter.gradle.FlutterPlugin25com.flutter.gradle.tasks.ValidateCompileSdkVersionTask26io.flutter.plugin.editing27io.flutter.embedding.engine.systemchannels28io.flutter.plugin.localization29io.flutter.plugin.mouse30io.flutter.plugin.view31io.flutter.view32io.flutter.embedding.engine.plugins33io.flutter.embedding.engine.renderer34io.flutter.embedding.android35io.flutter.embedding.engine.plugins.activity36io.flutter.embedding.engine37io.flutter.plugin.text38io.flutter39io.flutter.embedding.engine.plugins.util402222213111132311111221342221128412252221112161253181112322132111220334421232211351442551531171723541522222221+44 more modules (most-connected shown)

At a glance — Code Health · 37.0 · Weak · gated by R1, R7 ·

At a glance — Architecture · 69.0 · Adequate · gated by AX8 ·

At a glance — Maturity · 63.1 · Adequate · gated by M1 ·

At a glance — Readiness · 41.1 · Weak · gated by R6, P3, P4, P7 ·

At a glance — Security · 26.7 · Weak · gated by D36, C2 ·

At a glance — Domain Modelling · 100.0 · Exemplary ·

At a glance — Accessibility · 29.0 · Weak · gated by AC3, AC4, AC6 ·

At a glance — Performance · 70.7 · Strong ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures41High / Critical
A05:2025 — Injection11High / Critical
A07:2025 — Authentication Failures5High / Critical

Roadmap

Top priorities: Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do; Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 11 sites, not one: `engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:716` (md5.convert(…)), `packages/flutter_goldens/lib/skia_client.dart:586` (md5.convert(…)), `packages/flutter_tools/lib/src/android/gradle.dart:1177` (sha1.startChunkedConversion(…)), `packages/flutter_tools/lib/src/base/fingerprint.dart:90` (md5.convert(…)), `packages/flutter_tools/lib/src/build_system/build_system.dart:379` (md5.convert(…)), `packages/flutter_tools/lib/src/bundle.dart:38` (md5.convert(…)), `packages/flutter_tools/lib/src/cache.dart:1415` (md5.startChunkedConversion(…)), `packages/flutter_tools/lib/src/commands/build_ios.dart:288` (md5.convert(…)), and 3 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.+5.0 ptsMediumAccess Controls
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 11 sites, not one: `engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:716` (md5.convert(…)), `packages/flutter_goldens/lib/skia_client.dart:586` (md5.convert(…)), `packages/flutter_tools/lib/src/android/gradle.dart:1177` (sha1.startChunkedConversion(…)), `packages/flutter_tools/lib/src/base/fingerprint.dart:90` (md5.convert(…)), `packages/flutter_tools/lib/src/build_system/build_system.dart:379` (md5.convert(…)), `packages/flutter_tools/lib/src/bundle.dart:38` (md5.convert(…)), `packages/flutter_tools/lib/src/cache.dart:1415` (md5.startChunkedConversion(…)), `packages/flutter_tools/lib/src/commands/build_ios.dart:288` (md5.convert(…)), and 3 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.+3.7 ptsMediumWeb-Security Posture
Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED (4).+1.8 ptsLowSecrets (history)
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.2 ptsMediumKeyboard semantics
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+3.2 ptsMediumVisual & motion safety
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+2.7 ptsMediumPage structure
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED.+1.3 ptsLowStatic Analysis (SAST)
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+1.3 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 1458 files carrying findings, judged against the Production bar: 0% slop · 56% mixed · 44% near-clean.

FileScoreBandWorst signal
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
packages/flutter_tools/lib/src/build_system/targets/web.dart4.0MixedCognitive Complexity: WebReleaseBundle.build (cognitive 20)
packages/flutter/lib/src/material/switch.dart4.0MixedCyclomatic Complexity: _SwitchPainter.paint (cyclomatic 29)
packages/flutter/lib/src/widgets/_window_macos.dart4.1MixedGod Classes: FileTooLong: widgets/_window_macos.dart
packages/flutter/lib/src/material/checkbox.dart4.2MixedCyclomatic Complexity: _CheckboxState.build (cyclomatic 20)
packages/flutter/lib/src/material/icon_button.dart4.2MixedCognitive Complexity: IconButton.build (cognitive 19)
packages/flutter/lib/src/material/progress_indicator.dart4.2MixedCyclomatic Complexity: _LinearProgressIndicatorPainter.paint (cyclomatic 23)
packages/flutter/lib/src/material/range_slider.dart4.4MixedCyclomatic Complexity: _RenderRangeSlider.paint (cyclomatic 54)
packages/flutter/lib/src/cupertino/switch.dart4.4MixedCyclomatic Complexity: _SwitchPainter.paint (cyclomatic 18)
packages/flutter_tools/lib/src/build_system/targets/android.dart4.4MixedCode Duplication: Edited copy of a member (50 corresponding lines)
packages/flutter/lib/src/material/search_anchor.dart4.5MixedGod Classes: FileTooLong: material/search_anchor.dart
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
packages/flutter/lib/src/painting/box_border.dart4.8MixedCyclomatic Complexity: Border.paint (cyclomatic 28)
packages/flutter/lib/src/cupertino/text_field.dart4.8MixedCyclomatic Complexity: _CupertinoTextFieldState.build (cyclomatic 27)
engine/src/flutter/lib/ui/text.dart4.8MixedCyclomatic Complexity: TextStyle.toString (cyclomatic 25)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 133

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 5656

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 729

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 8

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 82 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 82 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D16D17D19D20D21D24D26D28D29D30D34D35D36D43D44AC2AC3AC4AC6AX1AX10AX3AX5AX6AX8AX9C2DM2DM5GD1IC1M1M2M3M4P1P10P2P3P4P6P7PF1PF3R1R10R2R3R6R7R9S1X1X12X13X14X15X16X17X18X19X2X20X21X23X25X27X28X29X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 6484 of 6518 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1e89c-71bc-73e1-a8a6-0d2a9057f774.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D4 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1131 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .cc (190,036 lines, 13% of production source), .c (122,056 lines, 8% of production source), .cpp (8,628 lines, 1% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .py, .dart, and our analyzer cannot run the .dart test suite(s) — so no coverage was collected for the repository as a whole. The Python half did build and run, and its own line coverage came back at 20.0% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.dart, .java, .kt, .swift) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 80 Maven/Gradle manifest(s) were read, stating a version for 52 dependency(ies) and leaving 13 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D26 Project Cohesion — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Project size and spread are measured over build units whose source a code model reads. This repository's .cc, .c, .cpp source is a material share of its production lines and was read by none, so the score is a verdict about the units that were read. Not a finding that the unread source is cohesive — it is unmeasured.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dev/benchmarks/imitation_game_swiftui/hello_world_swiftui/ContentView.swift`, `engine/src/flutter/skwasm/library_skwasm_support.js` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository also uses an unrecognised JSR-330 (javax.inject / jakarta.inject) container, whose singleton and shorter-lived bindings can capture one another the same way, but this check does not read them yet. That is a gap in this analyzer's language reach — not a finding that those bindings are free of it.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 5 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • IC1 Incompleteness & stubs — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 118 further occurrence(s) are not listed individually; the score already reflects all 158.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 252 further occurrence(s) are not listed individually; the score already reflects all 292.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.1 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 100% · ceiling Prevented

411 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CreateCommand.runCommand at 89. A further 30 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SemanticsObject._createSemanticRole at 43 — they are counted neither in the figure above nor in this dimension's score. 9 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/flutter_driver/lib/src/common/deserialization_factory.dart (DeserializeCommandFactory.deserializeCommand at 28), packages/flutter/lib/src/services/text_layout_metrics.dart (TextLayoutMetrics.isWhitespace at 27), packages/flutter_driver/lib/src/common/handler_factory.dart (CommandHandlerFactory.handleCommand at 26), engine/src/flutter/skwasm/library_skwasm_support.js ($skwasm_support_setup::_skwasm_connectThread::eventListener at 20), packages/flutter/lib/src/gestures/converter.dart (PointerEventConverter.expand at 20), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

SemanticsFlags.hasConflictingFlags (cyclomatic 41) · ×2engine/src/flutter/lib/ui/semantics.dart:1650
SemanticsFlags.hasRepeatedFlags (cyclomatic 40) · ×2engine/src/flutter/lib/ui/semantics.dart:1617
SemanticsFlags.toStrings (cyclomatic 33) · ×2engine/src/flutter/lib/ui/semantics.dart:1579
SemanticsFlags.== (cyclomatic 27) · ×2engine/src/flutter/lib/ui/semantics.dart:1521
LocaleInfo.fromString (cyclomatic 19) · ×2dev/tools/localization/localizations_utils.dart:31

+ 398 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 8 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with CreateCommand.runCommand (cyclomatic 89), TextStyle.lerp (cyclomatic 86), ThemeData.== (cyclomatic 85). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 8 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.7 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.7 / 10 · rule-coverage 100% · ceiling Prevented

597 method(s) exceeded the cognitive complexity threshold of 15; the worst was _MergeableMaterialState.didUpdateWidget at 139.

SemanticsFlags.hasConflictingFlags (cognitive 40) · ×2engine/src/flutter/lib/ui/semantics.dart:1650
SemanticsFlags.hasRepeatedFlags (cognitive 39) · ×2engine/src/flutter/lib/ui/semantics.dart:1617
SemanticsFlags.toStrings (cognitive 32) · ×2engine/src/flutter/lib/ui/semantics.dart:1579
SemanticsFlags.== (cognitive 26) · ×2engine/src/flutter/lib/ui/semantics.dart:1521
LocaleInfo.fromString (cognitive 23) · ×2dev/tools/localization/localizations_utils.dart:31

+ 585 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 6 bodies over 120 down to 120 or less in Cognitive Complexity — start with _MergeableMaterialState.didUpdateWidget (cognitive 139), SemanticsOwner.sendSemanticsUpdate (cognitive 139), TextTreeRenderer._debugRender (cognitive 129). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cognitive Complexity from 5.7 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.7 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Prevented

606 god class(es) detected.

FileTooLong: material/icons.dart · ×216packages/flutter/lib/src/material/icons.dart
TooManyMethods: SemanticsConfiguration · ×152packages/flutter/lib/src/semantics/semantics.dart:5458
MethodTooLong: PointerDataConverter.convert · ×148engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:235
ClassTooLong: Icons · ×90packages/flutter/lib/src/material/icons.dart:110

What to do

  1. Resolve the 216 FileTooLong finding(s) in God Classes — start with semantics.dart (4), paragraph.dart (3), text.dart (3). — One of this dimension's main actionable groups (216 warning-level).
  2. Resolve the 152 TooManyMethods finding(s) in God Classes — start with geometry.dart (6), painting.dart (5), canvas.dart (5). — One of this dimension's main actionable groups (152 warning-level).
  3. Resolve the 148 MethodTooLong finding(s) in God Classes — start with input_decorator.dart (5), text_field.dart (4), date_picker.dart (4). — One of this dimension's main actionable groups (148 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication7.8 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 100% · ceiling Verified

1131 duplicated block group(s) detected. 5.6 % of the production lines (63,325 of 1,136,604) are in a reported copy. A further 1028 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 643 of the 2159 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .cc, .c, .cpp (22% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.

Duplicated block (9 lines × 2) · ×86engine/src/flutter/lib/ui/key.dart:217
Duplicated block (7 lines × 2) · ×67dev/bots/analyze_snippet_code.dart:496
Duplicated block (10 lines × 2) · ×58dev/devicelab/lib/framework/fs_safety.dart:410
Duplicated block (8 lines × 2) · ×58engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:313
Duplicated block (13 lines × 2) · ×57engine/src/flutter/lib/ui/compositing.dart:64

+ 345 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 86 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with common.dart (3), key.dart (2), date_picker.dart (2). — One of this dimension's main actionable groups (86 warning-level).
  2. Resolve the 67 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with text.dart (6), basic.dart (2), geometry.dart (2). — One of this dimension's main actionable groups (67 warning-level).
  3. Resolve the 58 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with PlatformViewsController.java (6), expanding_bottom_sheet.dart (3), painting.dart (2). — One of this dimension's main actionable groups (58 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling9.4 / 10Stronggated by 5 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

62 production modules (Gradle+pub), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 5 module(s) off the main sequence, with abstractness counted on 44 of the 62 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: git_repo_tools · ×5

What to do

  1. Resolve the 5 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)8.2 / 10Strong✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Verified

556 of 3690 classes have LCOM4 above 3.

Low cohesion: EngineFlutterWindow (LCOM4 48) · ×556engine/src/flutter/lib/web_ui/lib/src/engine/window.dart:437

What to do

  1. Resolve the 556 Low cohesion finding(s) in Cohesion (LCOM4) — start with proxy_box.dart (18), switch.dart (10), layer.dart (10). — One of this dimension's main actionable groups (556 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 171 resolved pub package(s) use a banned license. Licences were read from pub.dev's analysis of each package's licence file, over every package this repository's pubspec.lock resolves from pub.dev, direct and transitive, at the locked version; the 1 package(s) the lock marks direct dev are excluded, and SDK, path and git packages have no registry release to read. pub.dev analyses only recent releases, so for 12 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one. 1 of them carry no licence pub.dev recognises; that is missing data, not a violation, and none of them is charged.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 46 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: packages/flutter_tools/lib/src/commands/test.dart (22×49=1078); packages/flutter_tools/lib/src/context/tool_dependencies.dart (34×26=884); packages/flutter_tools/lib/src/isolated/resident_web_runner.dart (23×33=759) Repeated repair below the complexity floor: engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java (3 of 5 changes were fixes); packages/flutter/lib/src/widgets/raw_tooltip.dart (3 of 5 changes were fixes); engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java (3 of 3 changes were fixes)

Hotspot: packages/flutter_tools/lib/src/commands/test.dart · ×42packages/flutter_tools/lib/src/commands/test.dart:489
Repeated repair: engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java · ×4engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:623

What to do

  1. Resolve the 42 Hotspot finding(s) in Churn × Complexity Hotspots — start with test.dart, tool_dependencies.dart, resident_web_runner.dart. — One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 4 Repeated repair finding(s) in Churn × Complexity Hotspots — start with PlatformViewsController2.java, raw_tooltip.dart, FlutterJNI.java. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

137 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/flutter/lib/src/cupertino/menu_anchor.dart. Counted over 1903 of the 2840 production source files in this repository: 929 are under the ~2,400-byte size floor this dimension measures over, and the remaining 8 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 · ×9
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.8 / 10Stronggated by 1112 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

1112 deducted task-comment markers across 1136604 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×1108packages/integration_test/lib/integration_test.dart:57
HackComment · ×2packages/flutter_tools/lib/src/web/web_runner.dart:18
FixmeCommentengine/src/flutter/tools/engine_tool/test/commands/run_command_test.dart:405
XxxCommentengine/src/flutter/shell/platform/android/test/io/flutter/plugin/common/StandardMessageCodecTest.java:18

What to do

  1. Resolve the 1108 TodoComment finding(s) in Explicit Debt — start with binding.dart (14), platform_view.dart (14), platform_dispatcher.dart (14). — One of this dimension's main actionable groups (1108 warning-level).
  2. Resolve the 2 HackComment finding(s) in Explicit Debt — start with web_runner.dart, binding.dart. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with run_command_test.dart. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality6.3 / 10Adequate✓ Tool-verified

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 6.3 / 10 · rule-coverage 100% · ceiling Documented

0 of 1 documentation facets pass in full; short on: F2 example. 374 document(s) read across 164 unit(s).

Documentation: no build, run or usage example · ×25dev/benchmarks/imitation_game_flutter/README.md:1

What to do

  1. Resolve the 25 Documentation finding(s) in Documentation Quality — start with README.md (25). — One of this dimension's main actionable groups (25 recommendation-level).

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundpackages/flutter_tools/templates/xcode/ios/custom_application_bundle/Runner.xcodeproj.tmpl/project.pbxproj:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency9.1 / 10Exemplary✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Verified

9 naming inconsistencies among 987 declarations measured against a convention their peers follow.

`_deviceID` spells `ID` where 700 names in the project spell it `Id` · ×2packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:15
`_readMacOsKeyCodes` spells `Os` where 18 names in the project spell it `OS`dev/tools/gen_keycodes/lib/logical_key_data.dart:186
`_suiteID` spells `ID` where 126 names in the project spell it `Id`engine/src/flutter/lib/web_ui/dev/test_platform.dart:860
`detailPageFABGutterWidth` spells `FAB` where 23 names in the project spell it `Fab`packages/flutter/lib/src/material/about.dart:1533
`toJSON` spells `JSON` where 141 names in the project spell it `Json`packages/flutter/lib/src/services/text_input.dart:1160

+ 3 more group(s) — more in Appendix A; the complete list is findings.md.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D24 · Comment Value7.3 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 7.3 / 10 · rule-coverage 100% · ceiling Documented

1 of 37 judged comments only repeat the code they sit on (2.7 %).

redundant commentdev/docs/assets/snippets.js:40

What to do

  1. Resolve the 1 redundant comment finding(s) in Comment Value — start with snippets.js. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.4 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Documented

5 of 63 build units (Gradle, Python, pub) flagged as possibly oversized/incoherent. This repository's .cc, .c, .cpp source was read by no build unit, so this covers part of the tree, not all of it.

Projects may be oversized for their cohesion · ×5packages/flutter/pubspec.yaml:1

What to do

  1. Resolve the 5 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with pubspec.yaml (4), build.gradle. — One of this dimension's main actionable groups (5 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)6.0 / 10Adequate✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)4.1 / 10Weak✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 4.1 / 10 · rule-coverage 100% · ceiling Documented

11 finding(s): 0 critical, 9 high, 0 medium, 2 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 47 file(s) — `bin/internal/last_engine_commit.sh` (line 35, line 36, line 37), `dev/snippets/config/skeletons/dartpad-sample.html` (line 1, line 19), `dev/snippets/config/skeletons/sample.html` (line 1, line 23), `dev/snippets/config/skeletons/snippet.html` (line 1, line 18), `dev/tools/gen_defaults/test.json`, … (+42 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 6 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Adequategated by 24 critical findings○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

36 finding(s): 6 critical, 18 high, 12 medium, 0 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 18 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (18). — One of this dimension's main actionable groups (18 issue-level).
  2. Resolve the 6 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
  3. Resolve the 12 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (12). — One of this dimension's main actionable groups (12 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness6.7 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 6.7 / 10 · rule-coverage 100% · ceiling Documented

631 of 1911 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is packages/flutter/lib/src/material/icons.dart. Counted over 1911 of the 2840 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×87packages/flutter/lib/src/material/icons.dart:1
Orphaned file · ×544dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_container_transition.dart:1
Further orphaned files (smaller)

What to do

  1. Resolve the 544 Orphaned file finding(s) in Knowledge Freshness — start with main.dart (9), debug.dart (5), app.dart (5). — One of this dimension's main actionable groups (544 recommendation-level).
  2. Resolve the 87 Orphaned knowledge finding(s) in Knowledge Freshness — start with icons.dart (2), colors.dart (2), demos.dart (2). — One of this dimension's main actionable groups (87 issue-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.9 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: painting.dart↔shaders.dart 92%; renderer.dart↔renderer.dart 87%; analyze.dart↔main.dart 80%

Boundary-crossing change coupling: dtd_services.dart ↔ dtd_services.dart · ×2dev/integration_tests/widget_preview_scaffold/lib/src/dtd/dtd_services.dart:1
Change coupling: painting.dart ↔ shaders.dart · ×9engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/painting.dart:1

What to do

  1. Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with dtd_services.dart, android_java17_dependency_smoke_tests.dart. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 9 Change coupling finding(s) in Change Coupling — start with renderer.dart (2), painting.dart, analyze.dart. — One of this dimension's main actionable groups (9 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 41 platform declaration(s) and 53 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC3 · Page structure3.5 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. — dev/snippets/config/skeletons/dartpad-sample.html:15
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — packages/flutter_tools/static/index.html:5

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. (×3) — dev/snippets/config/skeletons/dartpad-sample.html:5, dev/snippets/config/skeletons/sample.html:5, dev/snippets/config/skeletons/snippet.html:5

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC6 · Visual & motion safety1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.dark-theme .snippet-buttons button` sets color: rgb(149, 149, 149) on background-color: #133e59 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — dev/docs/assets/snippets.css:145
  • `.snippet-buttons button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — dev/docs/assets/snippets.css:45
  • `.anchor-button :focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — dev/docs/assets/snippets.css:98
  • `.copy-button :focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — dev/docs/assets/snippets.css:128

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX6 · Interface segregation9.8 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `GalleryLocalizations` declares 802 abstract methods: `githubRepo`, `aboutDialogDescription`, `deselect`, `notSelected`, `select`, `selectable`, `selected`, `signIn`, `bannerDemoText`, `bannerDemoResetText`, `bannerDemoMultipleText`, `bannerDemoLeadingText`, `dismiss`, `backToGallery`, `cardsDemoExplore`, `cardsDemoExploreSemantics`, `cardsDemoShareSemantics`, `cardsDemoTappable`, `cardsDemoTravelDestinationTitle1`, `cardsDemoTravelDestinationDescription1`, `cardsDemoTravelDestinationCity1`, `cardsDemoTravelDestinationLocation1`, `cardsDemoTravelDestinationTitle2`, `cardsDemoTravelDestinationDescription2`, `cardsDemoTravelDestinationCity2`, `cardsDemoTravelDestinationLocation2`, `cardsDemoTravelDestinationTitle3`, `cardsDemoTravelDestinationDescription3`, `homeHeaderGallery`, `homeHeaderCategories`, `shrineDescription`, `fortnightlyDescription`, `rallyDescription`, `replyDescription`, `rallyAccountDataChecking`, `rallyAccountDataHomeSavings`, `rallyAccountDataCarSavings`, `rallyAccountDataVacation`, `rallyAccountDetailDataAnnualPercentageYield`, `rallyAccountDetailDataInterestRate`, and 762 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — dev/integration_tests/new_gallery/lib/gallery_localizations.dart:14
  • `CupertinoLocalizations` declares 39 abstract methods: `datePickerYear`, `datePickerMonth`, `datePickerStandaloneMonth`, `datePickerDayOfMonth`, `datePickerMediumDate`, `datePickerHour`, `datePickerHourSemanticsLabel`, `datePickerMinute`, `datePickerMinuteSemanticsLabel`, `datePickerDateOrder`, `datePickerDateTimeOrder`, `anteMeridiemAbbreviation`, `postMeridiemAbbreviation`, `todayLabel`, `alertDialogLabel`, `tabSemanticsLabel`, `timerPickerHour`, `timerPickerMinute`, `timerPickerSecond`, `timerPickerHourLabel`, `timerPickerHourLabels`, `timerPickerMinuteLabel`, `timerPickerMinuteLabels`, `timerPickerSecondLabel`, `timerPickerSecondLabels`, `cutButtonLabel`, `copyButtonLabel`, `pasteButtonLabel`, `clearButtonLabel`, `noSpellCheckReplacementsLabel`, `selectAllButtonLabel`, `lookUpButtonLabel`, `searchWebButtonLabel`, `shareButtonLabel`, `searchTextFieldPlaceholderLabel`, `modalBarrierDismissLabel`, `menuDismissLabel`, `cancelButtonLabel`, `backButtonLabel`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter/lib/src/cupertino/localizations.dart:67
  • `ChipAttributes` declares 21 abstract methods: `label`, `avatar`, `labelStyle`, `side`, `shape`, `clipBehavior`, `focusNode`, `autofocus`, `color`, `backgroundColor`, `padding`, `visualDensity`, `labelPadding`, `materialTapTargetSize`, `elevation`, `shadowColor`, `surfaceTintColor`, `iconTheme`, `avatarBoxConstraints`, `chipAnimationStyle`, `mouseCursor`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter/lib/src/material/chip.dart:52
  • `CalendarDelegate` declares 17 abstract methods: `now`, `dateOnly`, `monthDelta`, `addMonthsToMonthDate`, `addDaysToDate`, `firstDayOffset`, `getDaysInMonth`, `getMonth`, `getDay`, `formatMonthYear`, `formatMediumDate`, `formatShortMonthDay`, `formatShortDate`, `formatFullDate`, `formatCompactDate`, `parseCompactDate`, `dateHelpText`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter/lib/src/material/date.dart:16
  • `MaterialLocalizations` declares 149 abstract methods: `openAppDrawerTooltip`, `backButtonTooltip`, `clearButtonTooltip`, `closeButtonTooltip`, `deleteButtonTooltip`, `moreButtonTooltip`, `nextMonthTooltip`, `previousMonthTooltip`, `firstPageTooltip`, `lastPageTooltip`, `nextPageTooltip`, `previousPageTooltip`, `showMenuTooltip`, `aboutListTileTitle`, `licensesPageTitle`, `licensesPackageDetailText`, `pageRowsInfoTitle`, `rowsPerPageTitle`, `tabLabel`, `selectedRowCountTitle`, `cancelButtonLabel`, `closeButtonLabel`, `continueButtonLabel`, `copyButtonLabel`, `cutButtonLabel`, `scanTextButtonLabel`, `okButtonLabel`, `pasteButtonLabel`, `selectAllButtonLabel`, `lookUpButtonLabel`, `searchWebButtonLabel`, `shareButtonLabel`, `viewLicensesButtonLabel`, `anteMeridiemAbbreviation`, `postMeridiemAbbreviation`, `timePickerHourModeAnnouncement`, `timePickerMinuteModeAnnouncement`, `modalBarrierDismissLabel`, `menuDismissLabel`, `drawerLabel`, and 109 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter/lib/src/material/material_localizations.dart:47
  • `BuildContext` declares 21 abstract methods: `widget`, `owner`, `mounted`, `debugDoingBuild`, `findRenderObject`, `size`, `dependOnInheritedElement`, `dependOnInheritedWidgetOfExactType`, `getInheritedWidgetOfExactType`, `getElementForInheritedWidgetOfExactType`, `findAncestorWidgetOfExactType`, `findAncestorStateOfType`, `findRootAncestorStateOfType`, `findAncestorRenderObjectOfType`, `visitAncestorElements`, `visitChildElements`, `dispatchNotification`, `describeElement`, `describeWidget`, `describeMissingAncestor`, `describeOwnershipChain`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter/lib/src/widgets/framework.dart:2223
  • `PaintPattern` declares 25 abstract methods: `transform`, `translate`, `scale`, `rotate`, `save`, `restore`, `saveRestore`, `clipRect`, `clipPath`, `rect`, `clipRRect`, `rrect`, `drrect`, `rsuperellipse`, `clipRSuperellipse`, `circle`, `path`, `line`, `arc`, `paragraph`, `shadow`, `image`, `drawImageRect`, `something`, `everything`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter_test/lib/src/mock_canvas.dart:102
  • `Terminal` declares 16 abstract methods: `supportsColor`, `isCliAnimationEnabled`, `applyFeatureFlags`, `supportsEmoji`, `preferredStyle`, `usesTerminalUi`, `stdinHasTerminal`, `warningMark`, `successMark`, `bolden`, `color`, `clearScreen`, `singleCharMode`, `keystrokes`, `readLine`, `promptForCharInput`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter_tools/lib/src/base/terminal.dart:69
  • `Device` declares 18 abstract methods: `name`, `isLocalEmulator`, `emulatorId`, `isSupportedForProject`, `isAppInstalled`, `isLatestBuildInstalled`, `installApp`, `uninstallApp`, `isSupported`, `targetPlatform`, `cpuArch`, `sdkNameAndVersion`, `getLogReader`, `portForwarder`, `clearLogs`, `startApp`, `stopApp`, `dispose`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter_tools/lib/src/device.dart:600
  • `FeatureFlags` declares 21 abstract methods: `isLinuxEnabled`, `isMacOSEnabled`, `isWebEnabled`, `isWindowsEnabled`, `isAndroidEnabled`, `isIOSEnabled`, `isFuchsiaEnabled`, `areCustomDevicesEnabled`, `isCliAnimationEnabled`, `isNativeAssetsEnabled`, `isRecordUseEnabled`, `isSwiftPackageManagerEnabled`, `isOmitLegacyVersionFileEnabled`, `isWindowingEnabled`, `isLLDBDebuggingEnabled`, `isUISceneMigrationEnabled`, `isRiscv64SupportEnabled`, `isMacOSArm64OnlyEnabled`, `isHcppEnabled`, `isToolExtensionsEnabled`, `isEnabled`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter_tools/lib/src/features.dart:15
  • `ResidentHandlers` declares 18 abstract methods: `flutterDevices`, `hotMode`, `supportsServiceProtocol`, `isRunningDebug`, `isRunningProfile`, `isRunningRelease`, `stayResident`, `supportsRestart`, `canHotReload`, `supportsDetach`, `reloadIsRestart`, `logger`, `fileSystem`, `printHelp`, `cleanupAfterSignal`, `detach`, `exit`, `runSourceGenerators`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/flutter_tools/lib/src/resident_runner.dart:554
  • `SceneBuilder` declares 18 abstract methods: `pushTransform`, `pushOffset`, `pushClipRect`, `pushClipRRect`, `pushClipRSuperellipse`, `pushClipPath`, `pushOpacity`, `pushColorFilter`, `pushImageFilter`, `pushBackdropFilter`, `pushShaderMask`, `pop`, `addRetained`, `addPerformanceOverlay`, `addPicture`, `addTexture`, `addPlatformView`, `build`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/ui/compositing.dart:240
  • `Path` declares 29 abstract methods: `fillType`, `moveTo`, `relativeMoveTo`, `lineTo`, `relativeLineTo`, `quadraticBezierTo`, `relativeQuadraticBezierTo`, `cubicTo`, `relativeCubicTo`, `conicTo`, `relativeConicTo`, `arcTo`, `arcToPoint`, `relativeArcToPoint`, `addRect`, `addOval`, `addArc`, `addPolygon`, `addRRect`, `addRSuperellipse`, `addPath`, `extendWithPath`, `close`, `reset`, `contains`, `shift`, `transform`, `getBounds`, `computeMetrics`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. (×2) — engine/src/flutter/lib/ui/painting.dart:2886, engine/src/flutter/lib/web_ui/lib/path.dart:9
  • `Canvas` declares 39 abstract methods: `save`, `saveLayer`, `restore`, `restoreToCount`, `getSaveCount`, `translate`, `scale`, `rotate`, `skew`, `transform`, `getTransform`, `clipRect`, `clipRRect`, `clipRSuperellipse`, `clipPath`, `getLocalClipBounds`, `getDestinationClipBounds`, `drawColor`, `drawLine`, `drawPaint`, `drawRect`, `drawRRect`, `drawDRRect`, `drawRSuperellipse`, `drawOval`, `drawCircle`, `drawArc`, `drawPath`, `drawImage`, `drawImageRect`, `drawImageNine`, `drawPicture`, `drawParagraph`, `drawPoints`, `drawRawPoints`, `drawVertices`, `drawAtlas`, `drawRawAtlas`, `drawShadow`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/ui/painting.dart:6865
  • `Paragraph` declares 22 abstract methods: `width`, `height`, `longestLine`, `minIntrinsicWidth`, `maxIntrinsicWidth`, `alphabeticBaseline`, `ideographicBaseline`, `didExceedMaxLines`, `layout`, `getBoxesForRange`, `getBoxesForPlaceholders`, `getPositionForOffset`, `getClosestGlyphInfoForOffset`, `getGlyphInfoAt`, `getWordBoundary`, `getLineBoundary`, `computeLineMetrics`, `getLineMetricsAt`, `numberOfLines`, `getLineNumberAt`, `dispose`, `debugDisposed`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/ui/text.dart:3049
  • `Canvas` declares 39 abstract methods: `save`, `saveLayer`, `restore`, `getSaveCount`, `restoreToCount`, `translate`, `scale`, `rotate`, `skew`, `transform`, `getTransform`, `clipRect`, `clipRRect`, `clipRSuperellipse`, `clipPath`, `getLocalClipBounds`, `getDestinationClipBounds`, `drawColor`, `drawLine`, `drawPaint`, `drawRect`, `drawRRect`, `drawRSuperellipse`, `drawDRRect`, `drawOval`, `drawCircle`, `drawArc`, `drawPath`, `drawImage`, `drawImageRect`, `drawImageNine`, `drawPicture`, `drawParagraph`, `drawPoints`, `drawRawPoints`, `drawVertices`, `drawAtlas`, `drawRawAtlas`, `drawShadow`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/canvas.dart:55
  • `SceneBuilder` declares 19 abstract methods: `pushOffset`, `pushTransform`, `pushClipRect`, `pushClipRRect`, `pushClipRSuperellipse`, `pushClipPath`, `pushOpacity`, `pushColorFilter`, `pushImageFilter`, `pushBackdropFilter`, `pushShaderMask`, `addRetained`, `pop`, `addPerformanceOverlay`, `addPicture`, `addTexture`, `addPlatformView`, `build`, `setProperties`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/compositing.dart:35
  • `FragmentShader` declares 19 abstract methods: `setFloat`, `setImageSampler`, `dispose`, `debugDisposed`, `getUniformFloat`, `getUniformVec2`, `getUniformVec3`, `getUniformVec4`, `getUniformMat2`, `getUniformMat3`, `getUniformMat4`, `getUniformFloatArray`, `getUniformVec2Array`, `getUniformVec3Array`, `getUniformVec4Array`, `getUniformMat2Array`, `getUniformMat3Array`, `getUniformMat4Array`, `getImageSampler`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/painting.dart:1183
  • `PlatformDispatcher` declares 47 abstract methods: `onPlatformConfigurationChanged`, `displays`, `views`, `view`, `implicitView`, `engineId`, `onMetricsChanged`, `onViewFocusChange`, `requestViewFocusChange`, `onBeginFrame`, `onDrawFrame`, `onPointerDataPacket`, `onKeyData`, `onReportTimings`, `sendPlatformMessage`, `sendPortPlatformMessage`, `registerBackgroundIsolate`, `onPlatformMessage`, `scheduleFrame`, `scheduleWarmUpFrame`, `lineHeightScaleFactorOverride`, `letterSpacingOverride`, `wordSpacingOverride`, `paragraphSpacingOverride`, `accessibilityFeatures`, `onAccessibilityFeaturesChanged`, `updateSemantics`, `locale`, `locales`, `computePlatformResolvedLocale`, `onLocaleChanged`, `alwaysUse24HourFormat`, `textScaleFactor`, `onTextScaleFactorChanged`, `platformBrightness`, `onPlatformBrightnessChanged`, `systemFontFamily`, `onSystemFontFamilyChanged`, `onAlwaysUse24HourFormatChanged`, `semanticsEnabled`, and 7 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:30
  • `BackendCanvas` declares 37 abstract methods: `save`, `saveLayer`, `saveLayerWithFilter`, `restore`, `restoreToCount`, `getSaveCount`, `translate`, `scale`, `rotate`, `skew`, `transform`, `getTransform`, `clipRect`, `clipRRect`, `clipPath`, `getDestinationClipBounds`, `clear`, `quickReject`, `drawColor`, `drawLine`, `drawPaint`, `drawRect`, `drawRRect`, `drawDRRect`, `drawOval`, `drawCircle`, `drawArc`, `drawPath`, `drawImage`, `drawImageRect`, `drawImageNine`, `drawPicture`, `drawParagraph`, `drawPoints`, `drawVertices`, `drawAtlas`, `drawShadow`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/src/engine/backend/canvas.dart:16
  • `BackendParagraph` declares 21 abstract methods: `dispose`, `width`, `height`, `longestLine`, `minIntrinsicWidth`, `maxIntrinsicWidth`, `alphabeticBaseline`, `ideographicBaseline`, `didExceedMaxLines`, `numberOfLines`, `layout`, `getUnresolvedCodePoints`, `getBoxesForPlaceholders`, `getBoxesForRange`, `getPositionForOffset`, `getClosestGlyphInfoForOffset`, `getGlyphInfoAt`, `getWordBoundary`, `computeLineMetrics`, `getLineMetricsAt`, `getLineNumberAt`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/src/engine/backend/paragraph.dart:9
  • `BackendPathBuilder` declares 30 abstract methods: `fillType`, `moveTo`, `relativeMoveTo`, `lineTo`, `relativeLineTo`, `quadraticBezierTo`, `relativeQuadraticBezierTo`, `cubicTo`, `relativeCubicTo`, `conicTo`, `relativeConicTo`, `arcTo`, `arcToPoint`, `relativeArcToPoint`, `addRect`, `addOval`, `addArc`, `addPolygon`, `addRRect`, `addRSuperellipse`, `shiftInPlace`, `transformInPlace`, `addPath`, `extendWithPath`, `close`, `reset`, `contains`, `getBounds`, `build`, `dispose`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/src/engine/backend/path.dart:26
  • `BackendFragmentShader` declares 16 abstract methods: `setFloat`, `setImageSampler`, `getUniformFloat`, `getUniformVec2`, `getUniformVec3`, `getUniformVec4`, `getUniformMat2`, `getUniformMat3`, `getUniformMat4`, `getUniformFloatArray`, `getUniformVec2Array`, `getUniformVec3Array`, `getUniformVec4Array`, `getUniformMat2Array`, `getUniformMat3Array`, `getUniformMat4Array`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/src/engine/backend/shader.dart:26
  • `Renderer` declares 34 abstract methods: `rendererTag`, `fontCollection`, `pictureToImageSurface`, `debugResetRasterizer`, `createPaint`, `createVertices`, `createPictureRecorder`, `createCanvas`, `createSceneBuilder`, `createGradientLinear`, `createGradientRadial`, `createGradientConical`, `createGradientSweep`, `createBlurImageFilter`, `createDilateImageFilter`, `createErodeImageFilter`, `createMatrixImageFilter`, `createComposeImageFilter`, `createColorFilterImageFilter`, `createColorFilter`, `createMaskFilter`, `isMultiThreaded`, `supportsResizingAnimatedImages`, `supportsAnimatedImages`, `createAnimatedImage`, `createImageFromImageSource`, `decodeBackendImageFromPixels`, `createImageShader`, `clearFragmentProgramCache`, `createFragmentProgram`, `pathConstructors`, `createParagraphBuilder`, `createWebParagraphPainter`, `dumpDebugInfo`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/src/engine/renderer.dart:20
  • `Paragraph` declares 22 abstract methods: `width`, `height`, `longestLine`, `minIntrinsicWidth`, `maxIntrinsicWidth`, `alphabeticBaseline`, `ideographicBaseline`, `didExceedMaxLines`, `layout`, `getBoxesForRange`, `getPositionForOffset`, `getGlyphInfoAt`, `getClosestGlyphInfoForOffset`, `getWordBoundary`, `getLineBoundary`, `getBoxesForPlaceholders`, `computeLineMetrics`, `getLineMetricsAt`, `numberOfLines`, `getLineNumberAt`, `dispose`, `debugDisposed`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/text.dart:687
  • `SingletonFlutterWindow` declares 32 abstract methods: `onMetricsChanged`, `locale`, `locales`, `computePlatformResolvedLocale`, `onLocaleChanged`, `initialLifecycleState`, `textScaleFactor`, `nativeSpellCheckServiceDefined`, `supportsShowingSystemContextMenu`, `brieflyShowPassword`, `alwaysUse24HourFormat`, `onTextScaleFactorChanged`, `platformBrightness`, `onPlatformBrightnessChanged`, `systemFontFamily`, `onSystemFontFamilyChanged`, `onBeginFrame`, `onDrawFrame`, `onReportTimings`, `onPointerDataPacket`, `onKeyData`, `defaultRouteName`, `scheduleFrame`, `semanticsEnabled`, `onSemanticsEnabledChanged`, `frameData`, `onFrameDataChanged`, `accessibilityFeatures`, `onAccessibilityFeaturesChanged`, `sendPlatformMessage`, `onPlatformMessage`, `setIsolateDebugName`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — engine/src/flutter/lib/web_ui/lib/window.dart:32

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 · Test isolation0.0 / 10Critical✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

  • `android_driver_extensions` (production) references the test project `flutter_test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `flutter_driver` (production) references the test project `flutter_test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `flutter_goldens` (production) references the test project `flutter_test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `ui` (production) references the test project `web_test_fonts`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.

What to do

  • Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

  • `Shader.getStorageBufferSlot` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — engine/src/flutter/lib/gpu/lib/src/shader.dart:220

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
C2 · Access Controls0.0 / 10Critical✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • This repository serves requests — an HTTP server (HttpServer.bindSecure) (packages/flutter_tools/lib/src/isolated/web_asset_server.dart:249) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — packages/flutter_tools/lib/src/isolated/web_asset_server.dart:249

What to do

  • Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
DM2 · Strongly-typed ids10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain identifiers are strongly typed (an extension-type / value-class wrapper) rather than raw primitives — consistency once an idiom exists.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether an entity protects its own invariants — a class whose identity is derived from its fields (value equality) but whose fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's Dart: methods whose whole body still throws UnimplementedError or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs8.2 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Dart: methods that only throw UnimplementedError or a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `validateTokenFile` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — dev/packages_autoroller/bin/packages_autoroller.dart:137
  • `_defaultApplicationVersion` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — packages/flutter/lib/src/material/about.dart:1200
  • `_defaultApplicationIcon` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — packages/flutter/lib/src/material/about.dart:1205
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×30) — dev/benchmarks/test_apps/stocks/test_driver/stock_view_test.dart:44, dev/bots/test/analyze_snippet_code_test.dart:84, dev/bots/test/analyze_snippet_code_test.dart:114, …
  • `tap`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — dev/devicelab/lib/framework/devices.dart:1160
  • `getMemoryStats`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. (×2) — dev/devicelab/lib/framework/devices.dart:1165, dev/devicelab/lib/framework/devices.dart:1445
  • `decodeImageFromPixelsSync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — engine/src/flutter/lib/web_ui/lib/painting.dart:902
  • `setProperties`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_scene_builder.dart:232
  • `onPopInvoked`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — packages/flutter/lib/src/widgets/pop_scope.dart:175
  • `createElement`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — packages/flutter/lib/src/widgets/widget_inspector.dart:2816

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • Clear the softer debt: re-enable or delete tests marked `skip:`, decide whether each empty method or UnsupportedError is deliberate (and say so in a comment), and replace `// ignore_for_file: type=lint` with targeted, justified ignores.
M1 · Documentation (README)3.5 / 10Weak✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

  • The root README is 18 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers. — README.md:1

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy9.4 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

  • engine/src/README.md links to `flutter/docs/testing/Testing-the-engine.md`, but `engine/src/flutter/docs/testing/Testing-the-engine.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — engine/src/README.md:18
  • dev/integration_tests/android_hardware_smoke_test/README.md links to `../../../bots/suite_runners/run_android_hardware_smoke_tests.dart`, but `bots/suite_runners/run_android_hardware_smoke_tests.dart` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev/integration_tests/android_hardware_smoke_test/README.md:504

What to do

  • Reconcile the README with reality: engine/src/README.md links to `flutter/docs/testing/Testing-the-engine.md`, but `engine/src/flutter/docs/testing/Testing-the-engine.md` does not exist; dev/integration_tests/android_hardware_smoke_test/README.md links to `../../../bots/suite_runners/run_android_hardware_smoke_tests.dart`, but `bots/suite_runners/run_android_hardware_smoke_tests.dart` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 2 public types in `repository.web_ui` are marked as implementation by their own namespace, folder or name: `HttpFetchResponseImpl` (engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart:1405, name ends in `Impl`), `HttpFetchPayloadImpl` (engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart:1504, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart:1405
  • 1 public type in `io.flutter.embedding.engine.flags` is marked as implementation by its own namespace, folder or name: `FlutterEngineFlagsProviderImpl` (engine/src/flutter/shell/platform/android/debug/io/flutter/embedding/engine/flags/FlutterEngineFlagsProviderImpl.java:15, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — engine/src/flutter/shell/platform/android/debug/io/flutter/embedding/engine/flags/FlutterEngineFlagsProviderImpl.java:15
  • 1 public type in `io.flutter.plugin.platform` is marked as implementation by its own namespace, folder or name: `PlatformViewRegistryImpl` (engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewRegistryImpl.java:10, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewRegistryImpl.java:10
  • 2 public types in `repository.src` are marked as implementation by their own namespace, folder or name: `BuildTargetsImpl` (packages/flutter_tools/lib/src/isolated/build_targets.dart:17, name ends in `Impl`), `FlutterNativeAssetsBuildRunnerImpl` (packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:594, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — packages/flutter_tools/lib/src/isolated/build_targets.dart:17

What to do

  • Hide `repository.web_ui` (`HttpFetchResponseImpl`, `HttpFetchPayloadImpl`) (Dart: a `_` name, or keep it under `lib/src/` unexported; Java: package-private (no modifier), or leave its package out of `module-info` exports; Kotlin: `internal`; Swift: leave it `internal` (the default) instead of `public`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `io.flutter.embedding.engine.flags` (`FlutterEngineFlagsProviderImpl`) (Dart: a `_` name, or keep it under `lib/src/` unexported; Java: package-private (no modifier), or leave its package out of `module-info` exports; Kotlin: `internal`; Swift: leave it `internal` (the default) instead of `public`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `io.flutter.plugin.platform` (`PlatformViewRegistryImpl`) (Dart: a `_` name, or keep it under `lib/src/` unexported; Java: package-private (no modifier), or leave its package out of `module-info` exports; Kotlin: `internal`; Swift: leave it `internal` (the default) instead of `public`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `repository.src` (`BuildTargetsImpl`, `FlutterNativeAssetsBuildRunnerImpl`) (Dart: a `_` name, or keep it under `lib/src/` unexported; Java: package-private (no modifier), or leave its package out of `module-info` exports; Kotlin: `internal`; Swift: leave it `internal` (the default) instead of `public`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability4.3 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 9/86 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `dev/bots`, `dev/customer_testing`, `dev/forbidden_from_release_tests`, `dev/integration_tests/android_engine_test` and 72 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • `engine/src/flutter/analysis_options.yaml` excludes `prebuilts` from analysis, and no such path is in the repository. These entries are dead configuration: they silence nothing today, and each one is a name the analyzer will silently start honouring the moment a directory of that name appears — so the file's exclusion list is wider than anything anybody decided. Delete the entries that no longer name anything, and keep the ones that do. — engine/src/flutter/analysis_options.yaml:1
  • No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 27 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/cp-trigger.yml:17
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `pip`, `gradle`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:5

What to do

  • Prune the dead entries from your analyzer's `exclude:` list — each one names a path that is not in the repository, so the list no longer describes what is actually being skipped.
  • Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `npm`, `pip`, `gradle` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback2.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

  • No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.

What to do

  • Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `HttpClient()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — dev/bots/luci_resultdb.dart:54, packages/flutter_tools/lib/src/cache.dart:249, packages/flutter_tools/lib/src/doctor.dart:192
  • `http.Client(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — dev/bots/prepare_package/archive_creator.dart:337, packages/flutter_tools/lib/src/reporting/crash_reporting.dart:121
  • `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — engine/src/build/linux/sysroot_scripts/install-sysroot.py:135

What to do

  • Bound every outbound call: `.timeout(const Duration(seconds: 10))` on the request future for `package:http` and `dart:io`'s `HttpClient` (neither has a default), `receiveTimeout` on dio's `BaseOptions`, and a `RetryClient` (package:http/retry.dart) or `package:retry` around dependencies that fail.
  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
PF1 · Benchmark discipline8.5 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `_extractSnippets` is async and calls readAsLinesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/analyze_snippet_code.dart:615
  • `_downloadPubPackageArchives` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/prepare_package/archive_creator.dart:326
  • `_populateCaches` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/prepare_package/archive_creator.dart:427
  • `_updateMetadata` is async and calls readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/prepare_package/archive_publisher.dart:150
  • `webLongRunningTestsRunner` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/suite_runners/run_web_tests.dart:67
  • `_runFlutterDriverWebTest` is async and calls deleteSync, readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/suite_runners/run_web_tests.dart:260
  • `_runWebTreeshakeTest` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/suite_runners/run_web_tests.dart:326
  • `_runWebUnitTests` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/suite_runners/run_web_tests.dart:523
  • `_runFlutterWebTest` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/suite_runners/run_web_tests.dart:585
  • `_loadMetadata` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/bots/unpublish_package.dart:317
  • `_createDocset` is async and calls createSync, copySync, readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/tools/create_api_docs.dart:390
  • `generateDartdoc` is async and calls runSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/tools/create_api_docs.dart:549
  • `_fetchArchive` is async and calls sleep — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/tools/create_api_docs.dart:932
  • `_extractDocs` is async and calls createSync, writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/tools/create_api_docs.dart:955
  • `create` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — engine/src/flutter/testing/dart/goldens.dart:26
  • `addGoldenImage` is async and calls writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — engine/src/flutter/testing/dart/goldens.dart:50
  • `_imgtestInit` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:260
  • `run` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. (×2) — engine/src/flutter/tools/build_bucket_golden_scraper/lib/build_bucket_golden_scraper.dart:88, engine/src/flutter/tools/clang_tidy/lib/clang_tidy.dart:119
  • `computeFilesOfInterest` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — engine/src/flutter/tools/clang_tidy/lib/clang_tidy.dart:206
  • `fromLocalFileComparator` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. (×3) — packages/flutter_goldens/lib/flutter_goldens.dart:280, packages/flutter_goldens/lib/flutter_goldens.dart:385, packages/flutter_goldens/lib/flutter_goldens.dart:585
  • `_writeFailureAndThrow` is async and calls createSync, writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_goldens/lib/flutter_goldens.dart:907
  • `getImageBytes` is async and calls createSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_goldens/lib/skia_client.dart:405
  • `introducePubspecError` is async and calls readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/devicelab/lib/framework/apk_utils.dart:340
  • `launch` is async and calls runSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/devicelab/lib/framework/browser.dart:91
  • `checkForRebootRequired` is async and calls readAsStringSync, createSync, writeAsStringSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/devicelab/lib/framework/framework.dart:273
  • `writeTaskResultToFile` is async and calls deleteSync, createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/devicelab/lib/framework/metrics_result_writer.dart:56
  • `roll` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/packages_autoroller/lib/src/packages_autoroller.dart:88
  • `_prebuildRegenerateGradleLockfilesBinary` is async and calls runSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/packages_autoroller/lib/src/packages_autoroller.dart:149
  • `_lazilyInitialize` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — dev/packages_autoroller/lib/src/repository.dart:171
  • `run` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — engine/src/flutter/tools/engine_tool/lib/src/commands/stamp_command.dart:34
  • `analyzeAotSnapshot` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/base/analyze_size.dart:37
  • `analyzeZipSizeAndAotSnapshot` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/base/analyze_size.dart:90
  • `build` is async and calls createSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/base/build.dart:114
  • `build` is async and calls createSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/build_system/build_system.dart:705
  • `buildIncremental` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/build_system/build_system.dart:790
  • `build` is async and calls createSync, copySync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/build_system/targets/android.dart:45
  • `build` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/flutter_tools/lib/src/build_system/targets/android.dart:218

What to do

  • Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 11 plain JS — the untyped files are engine/src/flutter/lib/web_ui/flutter_js/src/browser_environment.js, engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/flutter.js, engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js, engine/src/flutter/lib/web_ui/flutter_js/src/loader.js (+5 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

R2 · Cyclomatic Complexity9.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js:9
  • load has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — engine/src/flutter/lib/web_ui/flutter_js/src/loader.js:85
R3 · Large Files6.4 / 10Adequate✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • engine/src/flutter/skwasm/library_skwasm_support.js has 467 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — engine/src/flutter/skwasm/library_skwasm_support.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R6 · Tooling3.4 / 10Weak✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
R7 · Dead Code0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 1 application, 1 tooling and 0 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
  • no import path from any entry point (1 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — engine/src/flutter/skwasm/library_skwasm_support.js, engine/src/flutter/lib/web_ui/flutter_js/src/flutter.js
  • no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×5) — engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/browser_environment.js, engine/src/flutter/lib/web_ui/flutter_js/src/skwasm_loader.js, …
  • no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/flutter.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — engine/src/flutter/lib/web_ui/flutter_js/src/loader.js
  • no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/skwasm_loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js
  • no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/loader.js and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — engine/src/flutter/lib/web_ui/flutter_js/src/utils.js

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

S1 · Web-Security Posture4.0 / 10Weak✓ Tool-verified

Other · Security — Read from this repository's Dart source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS certificate validation — facts about code that hold whether or not it serves anything itself. The TLS protocol version is not read: `dart:io` leaves the protocol floor to the platform's TLS library and has no switch that admits an obsolete version. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. This repository serves HTTP itself (pubspec.yaml:167 — depends on `shelf`), so its Dart source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Dart spelling appears in production source, not proven on every route.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×11) — engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:716, packages/flutter_goldens/lib/skia_client.dart:586, packages/flutter_tools/lib/src/android/gradle.dart:1177, …
  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `firebase.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — dev/docs/firebase.json:1
  • No handler of this repository's Dart server answers 400, 413 or 422 (`Response.badRequest`, `HttpStatus.badRequest`, `statusCode = 400`) and no validation package (luthor, acanthis, ez_validator, json_schema, …) is imported — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: pubspec.yaml:167 — depends on `shelf`.

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 11 sites, not one: `engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:716` (md5.convert(…)), `packages/flutter_goldens/lib/skia_client.dart:586` (md5.convert(…)), `packages/flutter_tools/lib/src/android/gradle.dart:1177` (sha1.startChunkedConversion(…)), `packages/flutter_tools/lib/src/base/fingerprint.dart:90` (md5.convert(…)), `packages/flutter_tools/lib/src/build_system/build_system.dart:379` (md5.convert(…)), `packages/flutter_tools/lib/src/bundle.dart:38` (md5.convert(…)), `packages/flutter_tools/lib/src/cache.dart:1415` (md5.startChunkedConversion(…)), `packages/flutter_tools/lib/src/commands/build_ios.dart:288` (md5.convert(…)), and 3 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
  • Validate what the server reads from a request — path, query, headers, body size and shape — and answer what fails with 400 (413 for an oversized body) before a handler acts on it, so a client and a proxy can tell a refusal from a success.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

  • `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it. (×9) — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:582, engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:608, engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:626, …
  • `change && VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it. — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:652

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document1.6 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `writeValue` is public and takes `Object ? value` from its caller, and it calls itself at line 457 (`writeValue`) with a piece of `value` (and at line 463) — and nowhere in `writeValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `writeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/flutter/lib/src/services/message_codecs.dart:457
  • `JsonObject` is public and takes `Map<String, Object ?> _object` from its caller, and it calls itself at line 229 (`JsonObject`) with a piece of `_object` — and nowhere in `JsonObject` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `JsonObject` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — engine/src/flutter/tools/engine_tool/lib/src/typed_json.dart:229
  • `unwrap` is not private and takes `Object o` from its caller, and it calls itself at line 46 with a piece of `o` (and at line 56) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `unwrap` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack. — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:46
  • `wrap` is not private and takes `Object o` from its caller, and it calls itself at line 80 with a piece of `o` (and at line 91) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `wrap` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack. — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:80
  • `writeValue` is not private and takes `Object value` from its caller, and it calls itself at line 276 with a piece of `value` (and at line 283, line 284) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `writeValue` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack. — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java:276
  • `fromJson` is not private and takes `JSONObject json` from its caller, and it calls itself at line 485 with a piece of `json` (and at line 519, line 522, line 568) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `fromJson` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack. — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java:485
  • `writeValue` is public and takes `dynamic value` from its caller, and it calls itself at line 345 (`writeValue`) with a piece of `value` (and at line 351) — and nowhere in `writeValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `writeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:345

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness5.5 / 10Adequate✓ Tool-verified

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

  • `DesktopLogReader` carries a disposal duty — it declares its own release — and it creates `_inputController` itself (line 387, `StreamController.broadcast`), which makes that instance its own. Nothing in the class releases it — no `_inputController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController.broadcast` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_inputController.close();` in `dispose()` before `super.dispose()`. — packages/flutter_tools/lib/src/desktop_device.dart:387
  • `_ProxiedLogReader` carries a disposal duty — it declares its own release — and it creates `_logLinesStreamController` itself (line 505, `StreamController`), which makes that instance its own. Nothing in the class releases it — no `_logLinesStreamController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_logLinesStreamController.close();` in `dispose()` before `super.dispose()`. — packages/flutter_tools/lib/src/proxied_devices/devices.dart:505
  • `Dir.new` is called here without a block, so it hands back an open descriptor the caller must close — and its first and only use reads `.each_child` through it and drops it. Nothing closes it: it stays open until the garbage collector happens to finalize it, which is one leaked descriptor per call (a child process too, for `IO.popen`), `Errno::EMFILE` under load, and for a written file data that is not flushed when the program next reads it. Use the block form, which closes on every path including a raise (`Dir.new(…) { |io| … }`), or the one-call reader/writer (`File.read`, `File.write`, `File.foreach`). (×2) — packages/flutter_tools/bin/podhelper.rb:101, packages/flutter_tools/bin/podhelper.rb:171

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 0/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `_loadWasmEntrypoint` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js:153
  • `getResponse` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js:85

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation4.4 / 10Weak✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `fine` at line 646 is called with an argument built by `command.join('…')` (line 646), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on. — packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:646
  • `fine` at line 651 is called with an argument built by `command.join('…')` (line 652), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on. — packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:651
  • `fine` at line 693 is called with an argument built by `command.join('…')` (line 693), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on. — packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:693
  • `fine` at line 91 is called with an argument built by `args.join('…')` (line 91), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on. — packages/fuchsia_remote_debug_protocol/lib/src/runners/ssh_command_runner.dart:91
  • `fine` at line 72 is called with an argument built by `json.encode(updateRequest)` (line 72), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on. — dev/devicelab/lib/framework/metrics_result_writer.dart:72

What to do

  • In Dart, put the construction behind the logger's own check (`if (log.isLoggable(Level.FINE))` for package:logging, `if (kDebugMode)` for a line only a debug build needs), or hand the logger a closure it calls only when the record is written (`log.fine(() => 'rows: ${rows.map((r) => r.id).join(', ')}')`; package:logger's `logger.d(() => …)` likewise). Interpolating the value into the message is not the fix: Dart builds the string, and every `map`, `join` or `jsonEncode` inside it, before the call is entered.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated8.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen. Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

  • `unsorted_deps.items()` is a live view over `unsorted_deps` by the `for` on line 297, and line 300 calls `del unsorted_deps[…]` inside the loop body — a change to the size of a dict this file builds. The loop's next step raises `RuntimeError: dictionary changed size during iteration`, so every pass that reaches this call ends the loop by exception and the remaining items are never seen. — engine/src/build/android/gyp/util/build_utils.py:297

What to do

  • Each finding names the two spans that cannot both stand — the enhanced `for` source, and the call inside the body that structurally changes that same collection. Confirm from those two, then pick one: remove through the iterator itself (`Iterator<T> it = c.iterator(); … it.remove();`) or replace the loop with `c.removeIf(…)`; iterate a copy (`for (T x : new ArrayList<>(c))`); collect what needs changing and apply it after the loop; or — where the loop was only ever meant to act on the first match — `break` immediately after the mutation, which is the one shape that is already safe. In Python: Each finding names the two lines that cannot both stand — the `for` over the collection (or its `keys()`/`values()`/`items()` view), and the call inside the body that changes its size. Confirm from those two, then pick one: walk a snapshot (`for k in list(d):`, `for x in s.copy():`); build the result instead of editing in place (`d = {k: v for k, v in d.items() if keep(v)}`); collect what needs removing and remove it after the loop; or — where only the first match was ever meant — `break` straight after the change, which is the one shape that is already safe. In Dart: Each finding names the two lines that cannot both stand — the `for … in` over the collection (or its `keys`/`values`/`entries` view), and the call inside the body that changes it. Confirm from those two, then pick one: replace the loop with `removeWhere`/`retainWhere`; walk a copy (`for (final x in items.toList())`, `for (final k in map.keys.toList())`); collect what needs changing and apply it after the loop; or — where only the first match was ever meant — `break` straight after the change, which is the one shape that is already safe. In Ruby: Each finding names the two lines that cannot both stand — the walk over the Hash or Set, and the call inside its block that Ruby refuses during iteration. Confirm from those two, then pick one: make the call after the walk ends; walk a snapshot (`h.to_a.each`, `h.keys.each`, `s.dup.each`); or build the result instead of rewriting the collection in place (`h = h.transform_keys(&:to_s)`, `s = s.map { … }.to_set`). In Kotlin: Each finding names the two lines that cannot both stand — the loop over the collection, and the call inside its body that changes it. Confirm from those two, then pick one: change the collection in one call instead of in the loop (`list.removeAll { … }`, `list.retainAll { … }`, `map.entries.removeIf { … }`); walk a snapshot (`for (x in list.toList())`, `list.toList().forEach { … }`); build a new collection (`val kept = list.filter { … }`) instead of editing the one being walked; or — where only the first match was ever meant — leave the walk straight after the change (`break`, `return`), which is the one shape that is already safe.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling7.3 / 10Strong✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×8) — packages/flutter_tools/lib/src/doctor.dart:750, packages/flutter_tools/lib/src/widget_preview/persistent_preferences.dart:61, packages/flutter_tools/lib/src/ios/simulators.dart:467, …
  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — packages/flutter_tools/lib/src/version.dart:1468, engine/src/flutter/tools/engine_tool/lib/src/logger.dart:81, engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart:2460, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×12) — packages/flutter_tools/lib/src/widget_preview/persistent_preferences.dart:78, packages/flutter_tools/lib/src/proxied_devices/devices.dart:685, packages/flutter_tools/lib/src/ios/core_devices.dart:157, …
  • `on Object catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — packages/flutter_tools/lib/src/widget_preview/preview_detector.dart:49
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. — packages/flutter_tools/lib/src/web/chrome.dart:763
  • `on Exception catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — packages/flutter_tools/lib/src/android/android_workflow.dart:98
  • `on Error catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — packages/flutter_tools/lib/src/android/android_workflow.dart:100
  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — packages/flutter/lib/src/services/process_text.dart:126, packages/flutter/lib/src/material/popup_menu.dart:1625, dev/bots/utils.dart:115
  • `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java:502
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×2) — engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js:79, engine/src/flutter/lib/web_ui/flutter_js/src/loader.js:30

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

X5 · Nullable reference types8.6 / 10Strong✓ Tool-verified

Other · Code Health — Whether Dart's sound null safety is on and is not undermined by null assertions — a package whose `environment: sdk:` lower bound is 2.12 or above is null safe, so `String` cannot hold null and `String?` must be checked before use, and each postfix `!` is a run-time `Null check operator used on a null value` the author has told the analyzer cannot happen.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

WCAG coverage — what static analysis assessed

Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 43 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health37.0Weak — gated by R1, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture69.0Adequate — gated by AX8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity63.1Adequate — gated by M1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness41.1Weak — gated by R6, P3, P4, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security26.7Weak — gated by D36, C2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100.0ExemplaryStrongest area.
Accessibility29.0Weak — gated by AC3, AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance70.7StrongSolid.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 48 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Dart isolates share no mutable memory, so no two requests write one object at the same instant. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an Isar, ObjectBox, Floor or Hive entity, or a Serverpod table model — and no database or data-store client (sqflite, Drift, Isar, Hive, Realm, Firestore, Supabase, postgres, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~1176140 lines of test source are present (.dart, .java, .kt, .swift) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .dart test runner
  • D12 Dependency Hygiene — Not scored — 80 Maven/Gradle manifest(s) were read, stating a version for 52 dependency(ies) and leaving 13 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Swift surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Aggregate boundaries — not scored for Dart: aggregate-vs-value-object classification cannot be told apart in source (every class-holding-class reads alike), and a child COLLECTION (legitimate membership) vs a single embedded aggregate is indistinguishable — reported as guidance rather than measured
  • DM3 Integration-event coupling — not scored for Dart: a cross-package domain leak cannot be told apart in source from a legitimate shared-kernel package, and most repositories ship a single package — reported as guidance rather than measured
  • DM4 Rich vs anemic domain model — this Dart repository declares no domain-layer entity carrying stored data (every type is a typed-id wrapper, DTO/config, ORM row or presentation container), so DM4's rich-vs-anemic read has no population to be taken over
  • DM6 Domain ↔ infrastructure boundary — this Dart repository maps no type to a persistence framework (drift/floor/isar/objectbox/hive), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not scored for Dart: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • ED5 Idempotency — Not assessed, and this one is on us: 3 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 2 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — the JS/TS workspace (10 production file(s)) has no JavaScript/TypeScript test, but it is 0.19% of this repository's production source and the other 99.81% carries 1,176,140 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 133 finding(s)
D34 · Knowledge Freshness · Orphaned knowledge · ×87
  • Orphaned knowledge packages/flutter/lib/src/material/icons.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/cupertino/icons.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/integration_tests/new_gallery/lib/gallery_localizations.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/integration_tests/new_gallery/lib/gallery_localizations_en.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/manual_tests/lib/text.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/typography.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/colors.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter_test/lib/src/mock_canvas.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/benchmarks/macrobenchmarks/lib/src/web/material3.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/toggle_buttons.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/about.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/cupertino/colors.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/integration_tests/new_gallery/lib/data/demos.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/widgets/scroll_position.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/bots/analyze_snippet_code.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/widgets/transitions.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/widgets/scroll_delegate.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev/tools/create_api_docs.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/bottom_navigation_bar.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/services/autofill.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/services/raw_keyboard.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/floating_action_button_location.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/material/material_localizations.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/flutter/lib/src/widgets/restoration.dart:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • + 62 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX8 · Test isolation · Production project references a test project · ×4
  • Production project references a test project: android_driver_extensions → flutter_test — `android_driver_extensions` (production) references the test project `flutter_test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: flutter_driver → flutter_test — `flutter_driver` (production) references the test project `flutter_test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: flutter_goldens → flutter_test — `flutter_goldens` (production) references the test project `flutter_test`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: ui → web_test_fonts — `ui` (production) references the test project `web_test_fonts`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
D28 · Secrets (history) · High secret · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×2
  • Boundary-crossing change coupling: dtd_services.dart ↔ dtd_services.dart dev/integration_tests/widget_preview_scaffold/lib/src/dtd/dtd_services.dart:1 — `dev/integration_tests/widget_preview_scaffold/lib/src/dtd/dtd_services.dart` (context dev) and `packages/flutter_tools/lib/src/widget_preview/dtd_services.dart` (context flutter_tools) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `afb13d8b` [ Widget Preview ] Add UUID to registered DTD streams and services (#… (at that commit the file was still `packages/flutter_tools/test/widget_preview_scaffold.shard/widget_preview_scaffold/lib/src/dtd/dtd_services.dart`); `23a9ce38` [ Widget Preview ] Persist "Filter by Selected File" toggle (#176289) (at that commit the file was still `packages/flutter_tools/test/widget_preview_scaffold.shard/widget_preview_scaffold/lib/src/dtd/dtd_services.dart`); `b9ffd90b` [ Widget Preview ] Fix filter by file on Windows (#175783) (at that commit the file was still `packages/flutter_tools/test/widget_preview_scaffold.shard/widget_preview_scaffold/lib/src/dtd/dtd_services.dart`) — run `git show` on any of them.
  • Boundary-crossing change coupling: android_java17_dependency_smoke_tests.dart ↔ gradle_utils.dart dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart:1 — `dev/devicelab/bin/tasks/android_java17_dependency_smoke_tests.dart` (context dev) and `packages/flutter_tools/lib/src/android/gradle_utils.dart` (context flutter_tools) sit in DIFFERENT parts of the tree yet change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ce6e766a` Raise Minimum Version to AGP 9.1.1 (#193813); `d0e11591` [Android 17] Updated Templates to AGP 9.3.1 (#193262); `5ea35367` [AGP 9] Update Warn Version to AGP 9+ (#189109) — run `git show` on any of them.
AC3 · Page structure · <iframe> without a title · ×1
  • <iframe> without a title dev/snippets/config/skeletons/dartpad-sample.html:15 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang packages/flutter_tools/static/index.html:5 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: Shader.getStorageBufferSlot engine/src/flutter/lib/gpu/lib/src/shader.dart:220 — `Shader.getStorageBufferSlot` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 5656 finding(s)
D17 · Explicit Debt · TodoComment · ×1108
  • TodoComment packages/integration_test/lib/integration_test.dart:57 — // TODO(jiahaog): Print the message directing users to run with — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/integration_test/lib/integration_test.dart:566 — // TODO(CareF): remove this when flush FrameTiming is readily in engine. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/integration_test/lib/integration_test.dart:612 — // TODO(jiahaog): Integration test binding should not inherit from — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/integration_test/example/test_driver/extended_integration_test.dart:15 — // TODO(yjbanov): implement, see https://github.com/flutter/flutter/issues/86120
  • TodoComment dev/integration_tests/web_e2e_tests/lib/screenshot_support.dart:29 — // TODO(yjbanov): implement, see https://github.com/flutter/flutter/issues/86120
  • TodoComment packages/integration_test/example/lib/simple_platform_view.dart:17 — // TODO(cbracken): Implement. https://github.com/flutter/flutter/issues/164130
  • TodoComment packages/integration_test/example/integration_test/matches_golden_test.dart:31 — // TODO(matanlurey): Is this necessary? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/integration_test/example/integration_test/matches_golden_test.dart:33 — // TODO(cbracken): not only is it necessary, but so is this. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/integration_test/android/src/main/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshot.java:75 — // TODO(egarciad): InstrumentationRegistry requires the uiautomator dependency. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:340 — // TODO(awdavies): Set this up to handle multiple Isolates per Dart VM. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:499 — // TODO(awdavies): Handle duplicates. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:626 — // TODO(awdavies): The square-bracket enclosure for using the IPv6 loopback — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:717 — // TODO(ianh): Determine which exceptions to catch here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart:55 — // TODO(ianh): Determine which exceptions to catch here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_driver/lib/src/driver/vmservice_driver.dart:558 — // TODO(ianh): Determine which exceptions to catch here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_tools/test/web.shard/test_data/web_server_test_common.dart:76 — // TODO(mdebbar): Remove the retry once https://issues.chromium.org/issues/582923020 is fixed.
  • TodoComment packages/flutter_tools/test/integration.shard/analyze_once_test.dart:250 — // TODO(foobar): — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_tools/test/integration.shard/android_gradle_daemon_cache_test.dart:61 — // TODO(gustl22): Override with in 'gradle.properties' has no effect, set GRADLE_OPTS instead, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_tools/test/integration.shard/flutter_build_apk_split_per_abi_test.dart:39 — // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  • TodoComment packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart:93 — // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  • TodoComment packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart:147 — // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  • TodoComment packages/flutter_tools/test/integration.shard/flutter_build_apk_split_per_abi_test.dart:51 — // TODO: Add your own signing config for the release build. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart:108 — // TODO: Add your own signing config for the release build. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_tools/test/general.shard/android/android_project_migration_test.dart:159 — // TODO: Add your own signing config for the release build. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/flutter_tools/test/integration.shard/gen_l10n_test.dart:180 — // TODO(jsimmons): need a localization test that uses deferred loading — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 1083 more in this group — see findings.md.
D6 · Cohesion (LCOM4) · Low cohesion · ×556
  • Low cohesion: EngineFlutterWindow (LCOM4 48) engine/src/flutter/lib/web_ui/lib/src/engine/window.dart:437 — EngineFlutterWindow's methods fall into 48 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 48 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UserMessages (LCOM4 35) packages/flutter_tools/lib/src/base/user_messages.dart:8 — UserMessages's methods fall into 35 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 35 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FlutterCommand (LCOM4 35) packages/flutter_tools/lib/src/runner/flutter_command.dart:183 — FlutterCommand's methods fall into 35 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 35 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _SwitchPainter (LCOM4 32) packages/flutter/lib/src/material/switch.dart:1145 — _SwitchPainter's methods fall into 32 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 32 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SkwasmRenderer (LCOM4 32) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart:15 — SkwasmRenderer's methods fall into 32 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 32 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EditableTextState (LCOM4 31) packages/flutter/lib/src/widgets/editable_text.dart:2548 — EditableTextState's methods fall into 31 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 31 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _NativeCanvas (LCOM4 31) engine/src/flutter/lib/ui/painting.dart:7727 — _NativeCanvas's methods fall into 31 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 31 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PlatformDispatcher (LCOM4 31) engine/src/flutter/lib/ui/platform_dispatcher.dart:113 — PlatformDispatcher's methods fall into 31 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 31 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CanvasKitRenderer (LCOM4 31) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:18 — CanvasKitRenderer's methods fall into 31 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 31 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: GlobalMaterialLocalizations (LCOM4 27) packages/flutter_localizations/lib/src/material_localizations.dart:22 — GlobalMaterialLocalizations's methods fall into 27 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 27 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _TransformedPointerEvent (LCOM4 26) packages/flutter/lib/src/gestures/events.dart:746 — _TransformedPointerEvent's methods fall into 26 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 26 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RenderViewportBase (LCOM4 25) packages/flutter/lib/src/rendering/viewport.dart:391 — RenderViewportBase's methods fall into 25 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 25 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EnginePlatformDispatcher (LCOM4 25) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:26 — EnginePlatformDispatcher's methods fall into 25 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 25 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _RenderRangeSlider (LCOM4 24) packages/flutter/lib/src/material/range_slider.dart:898 — _RenderRangeSlider's methods fall into 24 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 24 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _SwitchPainter (LCOM4 23) packages/flutter/lib/src/cupertino/switch.dart:819 — _SwitchPainter's methods fall into 23 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 23 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _RenderDecoration (LCOM4 22) packages/flutter/lib/src/material/input_decorator.dart:723 — _RenderDecoration's methods fall into 22 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 22 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RenderSliver (LCOM4 22) packages/flutter/lib/src/rendering/sliver.dart:1174 — RenderSliver's methods fall into 22 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 22 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RenderObject (LCOM4 21) packages/flutter/lib/src/rendering/object.dart:1886 — RenderObject's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RenderWrap (LCOM4 21) packages/flutter/lib/src/rendering/wrap.dart:205 — RenderWrap's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _RenderSingleChildViewport (LCOM4 21) packages/flutter/lib/src/widgets/single_child_scroll_view.dart:347 — _RenderSingleChildViewport's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _TimePickerDefaultsM3 (LCOM4 20) packages/flutter/lib/src/material/time_picker.dart:3629 — _TimePickerDefaultsM3's methods fall into 20 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 20 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _RenderTheater (LCOM4 20) packages/flutter/lib/src/widgets/overlay.dart:1207 — _RenderTheater's methods fall into 20 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 20 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TestWindow (LCOM4 20) packages/flutter_test/lib/src/window.dart:1659 — TestWindow's methods fall into 20 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 20 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _DebugMemberVisitor (LCOM4 19) dev/flutter_analyzer_plugin/lib/src/rules/access_debug_members_only_in_asserts.dart:59 — _DebugMemberVisitor's methods fall into 19 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 19 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _RenderListTile (LCOM4 19) packages/flutter/lib/src/material/list_tile.dart:1317 — _RenderListTile's methods fall into 19 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 19 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • + 531 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×216
  • FileTooLong: material/icons.dart packages/flutter/lib/src/material/icons.dart — FileTooLong — 10828 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Icons (167-29454). The bar is 500 significant lines; this is 10328 over it, 21.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: cupertino/icons.dart packages/flutter/lib/src/cupertino/icons.dart — FileTooLong — 5111 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CupertinoIcons (63-9806). The bar is 500 significant lines; this is 4611 over it, 10.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: widgets/editable_text.dart packages/flutter/lib/src/widgets/editable_text.dart — FileTooLong — 3522 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: EditableTextState (2549-6160). The bar is 500 significant lines; this is 3022 over it, 7.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ui/painting.dart engine/src/flutter/lib/ui/painting.dart — FileTooLong — 3434 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2934 over it, 6.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: semantics/semantics.dart packages/flutter/lib/src/semantics/semantics.dart — FileTooLong — 3318 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2818 over it, 6.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: material/input_decorator.dart packages/flutter/lib/src/material/input_decorator.dart — FileTooLong — 3316 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2816 over it, 6.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: rendering/object.dart packages/flutter/lib/src/rendering/object.dart — FileTooLong — 3085 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2585 over it, 6.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: widgets/framework.dart packages/flutter/lib/src/widgets/framework.dart — FileTooLong — 2648 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2148 over it, 5.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: material/time_picker.dart packages/flutter/lib/src/material/time_picker.dart — FileTooLong — 2591 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2091 over it, 5.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: widgets/widget_inspector.dart packages/flutter/lib/src/widgets/widget_inspector.dart — FileTooLong — 2546 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2046 over it, 5.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: widgets/basic.dart packages/flutter/lib/src/widgets/basic.dart — FileTooLong — 2532 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2032 over it, 5.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: widgets/navigator.dart packages/flutter/lib/src/widgets/navigator.dart — FileTooLong — 2455 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1955 over it, 4.91× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: rendering/proxy_box.dart packages/flutter/lib/src/rendering/proxy_box.dart — FileTooLong — 2432 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1932 over it, 4.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: rendering/paragraph.dart packages/flutter/lib/src/rendering/paragraph.dart — FileTooLong — 2386 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: _SelectableFragment (1528-3713). The bar is 500 significant lines; this is 1886 over it, 4.77× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: material/date_picker.dart packages/flutter/lib/src/material/date_picker.dart — FileTooLong — 2100 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1600 over it, 4.20× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: widgets/text_selection.dart packages/flutter/lib/src/widgets/text_selection.dart — FileTooLong — 2097 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1597 over it, 4.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: material/menu_anchor.dart packages/flutter/lib/src/material/menu_anchor.dart — FileTooLong — 2091 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1591 over it, 4.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: material/theme_data.dart packages/flutter/lib/src/material/theme_data.dart — FileTooLong — 2009 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: ThemeData (220-2936). The bar is 500 significant lines; this is 1509 over it, 4.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: widgets/selectable_region.dart packages/flutter/lib/src/widgets/selectable_region.dart — FileTooLong — 1991 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1491 over it, 3.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cupertino/nav_bar.dart packages/flutter/lib/src/cupertino/nav_bar.dart — FileTooLong — 1924 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1424 over it, 3.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: rendering/editable.dart packages/flutter/lib/src/rendering/editable.dart — FileTooLong — 1746 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: RenderEditable (267-2733). The bar is 500 significant lines; this is 1246 over it, 3.49× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: engine/dom.dart engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart — FileTooLong — 1729 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1229 over it, 3.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: material/scaffold.dart packages/flutter/lib/src/material/scaffold.dart — FileTooLong — 1709 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1209 over it, 3.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: view/AccessibilityBridge.java engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java — FileTooLong — 1671 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1171 over it, 3.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: semantics/semantics.dart engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart — FileTooLong — 1660 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1160 over it, 3.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 191 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×152
  • TooManyMethods: SemanticsConfiguration packages/flutter/lib/src/semantics/semantics.dart:5458 — TooManyMethods — 197 methods. The bar is 30 methods; this is 167 over it, 6.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RenderEditable packages/flutter/lib/src/rendering/editable.dart:250 — TooManyMethods — 177 methods. The bar is 30 methods; this is 147 over it, 5.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DefaultMaterialLocalizations packages/flutter/lib/src/material/material_localizations.dart:738 — TooManyMethods — 162 methods. The bar is 30 methods; this is 132 over it, 5.40× the bar. Most of these members implement src.MaterialLocalizations (157 of 162 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: SemanticsObject engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:1247 — TooManyMethods — 158 methods. The bar is 30 methods; this is 128 over it, 5.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MaterialLocalizations packages/flutter/lib/src/material/material_localizations.dart:47 — TooManyMethods — 158 methods. The bar is 30 methods; this is 128 over it, 5.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EditableTextState packages/flutter/lib/src/widgets/editable_text.dart:2548 — TooManyMethods — 157 methods. The bar is 30 methods; this is 127 over it, 5.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FlutterJNI engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java:108 — TooManyMethods — 143 methods. The bar is 30 methods; this is 113 over it, 4.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlatformDispatcher engine/src/flutter/lib/ui/platform_dispatcher.dart:113 — TooManyMethods — 128 methods. The bar is 30 methods; this is 98 over it, 4.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EnginePlatformDispatcher engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:26 — TooManyMethods — 125 methods. The bar is 30 methods; this is 95 over it, 4.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SemanticsNode packages/flutter/lib/src/semantics/semantics.dart:2887 — TooManyMethods — 105 methods. The bar is 30 methods; this is 75 over it, 3.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RenderObject packages/flutter/lib/src/rendering/object.dart:1886 — TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _RenderRangeSlider packages/flutter/lib/src/material/range_slider.dart:898 — TooManyMethods — 86 methods. The bar is 30 methods; this is 56 over it, 2.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _RenderSlider packages/flutter/lib/src/material/slider.dart:1161 — TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RenderParagraph packages/flutter/lib/src/rendering/paragraph.dart:328 — TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _DebugViewMetricsPlatformDispatcher packages/flutter/lib/src/foundation/debug.dart:1454 — TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlatformDispatcher engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:30 — TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Element packages/flutter/lib/src/widgets/framework.dart:3542 — TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SelectableRegionState packages/flutter/lib/src/widgets/selectable_region.dart:349 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NavigatorState packages/flutter/lib/src/widgets/navigator.dart:3729 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FlutterActivity engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java:212 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _NativeCanvas engine/src/flutter/lib/ui/painting.dart:7727 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _SwitchPainter packages/flutter/lib/src/material/switch.dart:1145 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RenderTwoDimensionalViewport packages/flutter/lib/src/widgets/two_dimensional_viewport.dart:522 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MediaQuery packages/flutter/lib/src/widgets/media_query.dart:1298 — TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TextPainter packages/flutter/lib/src/painting/text_painter.dart:595 — TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 127 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×148
  • MethodTooLong: PointerDataConverter.convert engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:235 — MethodTooLong — convert runs 508 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 408 over it, 5.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ToolDependencies.bootstrap packages/flutter_tools/lib/src/context/tool_dependencies.dart:167 — MethodTooLong — bootstrap runs 489 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 389 over it, 4.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ThemeData.debugFillProperties packages/flutter/lib/src/material/theme_data.dart:2290 — MethodTooLong — debugFillProperties runs 473 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 373 over it, 4.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CreateCommand.runCommand packages/flutter_tools/lib/src/commands/create.dart:404 — MethodTooLong — runCommand runs 380 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _InputDecoratorState.build packages/flutter/lib/src/material/input_decorator.dart:2311 — MethodTooLong — build runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _RenderRangeSlider.paint packages/flutter/lib/src/material/range_slider.dart:1518 — MethodTooLong — paint runs 270 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RollFallbackFontsCommand._generateFallbackFontData engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart:62 — MethodTooLong — _generateFallbackFontData runs 268 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _TextFieldState.build packages/flutter/lib/src/material/text_field.dart:1528 — MethodTooLong — build runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TextTheme.apply packages/flutter/lib/src/material/text_theme.dart:383 — MethodTooLong — apply runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ManifestAssetBundle.build packages/flutter_tools/lib/src/asset.dart:316 — MethodTooLong — build runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PointerEventConverter.expand packages/flutter/lib/src/gestures/converter.dart:55 — MethodTooLong — expand runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _AppBarState.build packages/flutter/lib/src/material/app_bar.dart:901 — MethodTooLong — build runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _SelectToggleButtonRenderObject.paint packages/flutter/lib/src/material/toggle_buttons.dart:1327 — MethodTooLong — paint runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _MaterialSwitchState.build packages/flutter/lib/src/material/switch.dart:907 — MethodTooLong — build runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WidgetInspectorService.initServiceExtensions packages/flutter/lib/src/widgets/widget_inspector.dart:1057 — MethodTooLong — initServiceExtensions runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _RailDestinationState.build packages/flutter/lib/src/material/navigation_rail.dart:699 — MethodTooLong — build runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TextTreeRenderer._debugRender packages/flutter/lib/src/foundation/diagnostics.dart:1143 — MethodTooLong — _debugRender runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TimePickerTemplate.generate dev/tools/gen_defaults/lib/time_picker_template.dart:22 — MethodTooLong — generate runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ThemeData.copyWith packages/flutter/lib/src/material/theme_data.dart:1481 — MethodTooLong — copyWith runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FlutterLoader.ensureInitializationComplete engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java:318 — MethodTooLong — ensureInitializationComplete runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TextLayout.addLine engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:222 — MethodTooLong — addLine runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ScaffoldState.build packages/flutter/lib/src/material/scaffold.dart:3007 — MethodTooLong — build runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _CupertinoTextFieldState.build packages/flutter/lib/src/cupertino/text_field.dart:1444 — MethodTooLong — build runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _SnackBarState.build packages/flutter/lib/src/material/snack_bar.dart:621 — MethodTooLong — build runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _DatePickerDialogState.build packages/flutter/lib/src/material/date_picker.dart:563 — MethodTooLong — build runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 123 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×90
  • ClassTooLong: Icons packages/flutter/lib/src/material/icons.dart:110 — ClassTooLong — 10782 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 10382 over it, 26.96× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CupertinoIcons packages/flutter/lib/src/cupertino/icons.dart:7 — ClassTooLong — 5109 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 4709 over it, 12.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EditableTextState packages/flutter/lib/src/widgets/editable_text.dart:2548 — ClassTooLong — 2172 significant lines (blank, comment-only and punctuation-only lines excluded), 157 methods. The bar is 400 significant lines; this is 1772 over it, 5.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ThemeData packages/flutter/lib/src/material/theme_data.dart:185 — ClassTooLong — 1674 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 1274 over it, 4.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _SelectableFragment packages/flutter/lib/src/rendering/paragraph.dart:1521 — ClassTooLong — 1507 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 1107 over it, 3.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Typography packages/flutter/lib/src/material/typography.dart:51 — ClassTooLong — 1507 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 1107 over it, 3.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RenderEditable packages/flutter/lib/src/rendering/editable.dart:250 — ClassTooLong — 1400 significant lines (blank, comment-only and punctuation-only lines excluded), 177 methods. The bar is 400 significant lines; this is 1000 over it, 3.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ColorScheme packages/flutter/lib/src/material/color_scheme.dart:65 — ClassTooLong — 1267 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 867 over it, 3.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NavigatorState packages/flutter/lib/src/widgets/navigator.dart:3729 — ClassTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 806 over it, 3.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SemanticsNode packages/flutter/lib/src/semantics/semantics.dart:2887 — ClassTooLong — 994 significant lines (blank, comment-only and punctuation-only lines excluded), 105 methods. The bar is 400 significant lines; this is 594 over it, 2.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SelectableRegionState packages/flutter/lib/src/widgets/selectable_region.dart:349 — ClassTooLong — 967 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 567 over it, 2.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Element packages/flutter/lib/src/widgets/framework.dart:3542 — ClassTooLong — 922 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 522 over it, 2.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CreateCommand packages/flutter_tools/lib/src/commands/create.dart:50 — ClassTooLong — 922 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 522 over it, 2.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FlutterJNI engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java:108 — ClassTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded), 143 methods. The bar is 400 significant lines; this is 480 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RenderObject packages/flutter/lib/src/rendering/object.dart:1886 — ClassTooLong — 874 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods. The bar is 400 significant lines; this is 474 over it, 2.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SwiftPackageManagerIntegrationMigration packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:27 — ClassTooLong — 868 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 468 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ManifestAssetBundle packages/flutter_tools/lib/src/asset.dart:228 — ClassTooLong — 857 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 457 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Matrix4 engine/src/flutter/lib/web_ui/lib/src/engine/vector_math.dart:12 — ClassTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 454 over it, 2.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EnginePlatformDispatcher engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:26 — ClassTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded), 125 methods. The bar is 400 significant lines; this is 445 over it, 2.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _RenderRangeSlider packages/flutter/lib/src/material/range_slider.dart:898 — ClassTooLong — 800 significant lines (blank, comment-only and punctuation-only lines excluded), 86 methods. The bar is 400 significant lines; this is 400 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SemanticsObject engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:1247 — ClassTooLong — 764 significant lines (blank, comment-only and punctuation-only lines excluded), 158 methods. The bar is 400 significant lines; this is 364 over it, 1.91× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HotRunner packages/flutter_tools/lib/src/run_hot.dart:66 — ClassTooLong — 759 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 359 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RenderTable packages/flutter/lib/src/rendering/table.dart:360 — ClassTooLong — 756 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 356 over it, 1.89× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlatformViewsController engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:54 — ClassTooLong — 743 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 343 over it, 1.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RenderParagraph packages/flutter/lib/src/rendering/paragraph.dart:328 — ClassTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded), 82 methods. The bar is 400 significant lines; this is 321 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 65 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×86
  • Duplicated block (9 lines × 2) engine/src/flutter/lib/ui/key.dart:217 — engine/src/flutter/lib/ui/key.dart:217-225 | engine/src/flutter/lib/web_ui/lib/key.dart:165-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) engine/src/flutter/lib/ui/painting.dart:8330 — engine/src/flutter/lib/ui/painting.dart:8330-8338 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:473-481 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:8330` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:534 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:534-542 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:570-578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:534` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1985 — engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1985-1993 | engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:2025-2033 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1985` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:172 — engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:172-180 | engine/src/flutter/tools/engine_tool/lib/src/commands/test_command.dart:55-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1633 — packages/flutter/lib/src/cupertino/date_picker.dart:1633-1641 | packages/flutter/lib/src/cupertino/date_picker.dart:2000-2008 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1701 — packages/flutter/lib/src/cupertino/date_picker.dart:1701-1709 | packages/flutter/lib/src/cupertino/date_picker.dart:2043-2051 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1701` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/cupertino/menu_anchor.dart:1275 — packages/flutter/lib/src/cupertino/menu_anchor.dart:1275-1283 | packages/flutter/lib/src/material/menu_anchor.dart:3432-3440 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/menu_anchor.dart:1275` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/cupertino/nav_bar.dart:2899 — packages/flutter/lib/src/cupertino/nav_bar.dart:2899-2909 | packages/flutter/lib/src/cupertino/nav_bar.dart:3156-3164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/nav_bar.dart:2899` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/cupertino/segmented_control.dart:535 — packages/flutter/lib/src/cupertino/segmented_control.dart:535-543 | REDACTED:935-943 — before extracting anything, compare `packages/flutter/lib/src/cupertino/segmented_control.dart` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/segmented_control.dart:535` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/gestures/events.dart:1470 — packages/flutter/lib/src/gestures/events.dart:1470-1478 | packages/flutter/lib/src/gestures/events.dart:1696-1704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/material/calendar_date_picker.dart:651 — packages/flutter/lib/src/material/calendar_date_picker.dart:651-659 | packages/flutter/lib/src/material/date_picker.dart:2205-2213 — before extracting anything, compare `packages/flutter/lib/src/material/calendar_date_picker.dart` and `packages/flutter/lib/src/material/date_picker.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/calendar_date_picker.dart:651` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/material/divider.dart:192 — packages/flutter/lib/src/material/divider.dart:192-200 | packages/flutter/lib/src/material/divider.dart:320-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/divider.dart:192` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/material/dropdown_menu.dart:751 — packages/flutter/lib/src/material/dropdown_menu.dart:751-759 | packages/flutter/lib/src/material/dropdown_menu.dart:803-811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/material/menu_anchor.dart:3558 — packages/flutter/lib/src/material/menu_anchor.dart:3558-3566 | packages/flutter/lib/src/material/popup_menu.dart:884-892 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/material/switch.dart:2219 — packages/flutter/lib/src/material/switch.dart:2219-2227 | packages/flutter/lib/src/material/switch.dart:2322-2330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/switch.dart:2219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:1778 — packages/flutter/lib/src/rendering/proxy_box.dart:1778-1786 | packages/flutter/lib/src/rendering/proxy_box.dart:1884-1892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/proxy_box.dart:1778` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/rendering/table.dart:261 — packages/flutter/lib/src/rendering/table.dart:261-269 | packages/flutter/lib/src/rendering/table.dart:313-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/table.dart:261` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/services/raw_keyboard_ios.dart:257 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:257-265 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:272-280 — before extracting anything, compare `packages/flutter/lib/src/services/raw_keyboard_ios.dart` and `packages/flutter/lib/src/services/raw_keyboard_macos.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_ios.dart:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/services/raw_keyboard_macos.dart:281` calls `add` and `packages/flutter/lib/src/services/raw_keyboard_ios.dart:266` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:197 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:197-205 | packages/flutter_test/lib/src/accessibility.dart:188-196 — before extracting anything, compare `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart` and `packages/flutter_test/lib/src/accessibility.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter/lib/src/widgets/focus_traversal.dart:945 — packages/flutter/lib/src/widgets/focus_traversal.dart:945-953 | packages/flutter/lib/src/widgets/focus_traversal.dart:967-975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/focus_traversal.dart:945` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) packages/flutter_driver/lib/src/common/find.dart:321 — packages/flutter_driver/lib/src/common/find.dart:321-329 | packages/flutter_driver/lib/src/common/find.dart:390-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter_tools/lib/src/base/error_handling_io.dart:784 — packages/flutter_tools/lib/src/base/error_handling_io.dart:784-792 | packages/flutter_tools/lib/src/base/error_handling_io.dart:813-821 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/base/error_handling_io.dart:784` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) packages/flutter_tools/lib/src/build_system/file_store.dart:194 — packages/flutter_tools/lib/src/build_system/file_store.dart:194-203 | packages/flutter_tools/lib/src/build_system/file_store.dart:215-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) packages/flutter_tools/lib/src/build_system/targets/common.dart:191 — packages/flutter_tools/lib/src/build_system/targets/common.dart:191-199 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:268-276 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • + 61 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×67
  • Duplicated block (7 lines × 2) dev/bots/analyze_snippet_code.dart:496 — dev/bots/analyze_snippet_code.dart:496-502 | dev/snippets/lib/src/snippet_generator.dart:285-291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:82 — dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:82-88 | dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:113-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/material/checkbox.dart:848 — packages/flutter/lib/src/material/checkbox.dart:848-854 | packages/flutter/lib/src/material/checkbox.dart:931-937 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox.dart:848` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/material/icon_button.dart:1186 — packages/flutter/lib/src/material/icon_button.dart:1186-1192 | packages/flutter/lib/src/material/icon_button.dart:1328-1334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/icon_button.dart:1186` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/material/switch.dart:1032 — packages/flutter/lib/src/material/switch.dart:1032-1038 | packages/flutter/lib/src/material/switch.dart:1044-1050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/material/text_field.dart:1598 — packages/flutter/lib/src/material/text_field.dart:1598-1604 | packages/flutter/lib/src/material/text_field.dart:1613-1619 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:3151 — packages/flutter/lib/src/rendering/paragraph.dart:3151-3157 | packages/flutter/lib/src/rendering/paragraph.dart:3187-3193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/rendering/table.dart:1002 — packages/flutter/lib/src/rendering/table.dart:1002-1008 | packages/flutter/lib/src/rendering/table.dart:1290-1296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/table.dart:1002` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/widgets/basic.dart:2553 — packages/flutter/lib/src/widgets/basic.dart:2553-2559 | packages/flutter/lib/src/widgets/basic.dart:3345-3351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/widgets/implicit_animations.dart:1224 — packages/flutter/lib/src/widgets/implicit_animations.dart:1224-1230 | packages/flutter/lib/src/widgets/implicit_animations.dart:1383-1389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/implicit_animations.dart:1224` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) packages/flutter_tools/lib/src/asset.dart:562 — packages/flutter_tools/lib/src/asset.dart:562-568 | packages/flutter_tools/lib/src/asset.dart:601-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/asset.dart:562` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:885 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:885-892 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:330-336 — before extracting anything, compare `packages/flutter_tools/lib/src/commands/build_ios_framework.dart` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:885` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/cupertino/slider.dart:614 — packages/flutter/lib/src/cupertino/slider.dart:614-620 | packages/flutter/lib/src/material/slider.dart:1972-1978 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/slider.dart:614` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/widgets/basic.dart:1456 — packages/flutter/lib/src/widgets/basic.dart:1456-1462 | packages/flutter/lib/src/widgets/implicit_animations.dart:2261-2267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/basic.dart:1456` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) dev/tools/gen_defaults/lib/button_template.dart:59 — dev/tools/gen_defaults/lib/button_template.dart:59-65 | dev/tools/gen_defaults/lib/icon_button_template.dart:234-240 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1088 — engine/src/flutter/lib/ui/geometry.dart:1088-1094 | engine/src/flutter/lib/web_ui/lib/geometry.dart:399-405 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1361 — engine/src/flutter/lib/ui/geometry.dart:1361-1367 | engine/src/flutter/lib/web_ui/lib/geometry.dart:602-608 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/text.dart:122 — engine/src/flutter/lib/ui/text.dart:122-128 | engine/src/flutter/lib/web_ui/lib/text.dart:47-53 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/text.dart:992 — engine/src/flutter/lib/ui/text.dart:992-998 | engine/src/flutter/lib/web_ui/lib/text.dart:129-135 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/text.dart:1187 — engine/src/flutter/lib/ui/text.dart:1187-1193 | engine/src/flutter/lib/web_ui/lib/text.dart:167-173 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/text.dart:2646 — engine/src/flutter/lib/ui/text.dart:2646-2652 | engine/src/flutter/lib/web_ui/lib/text.dart:570-576 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/text.dart:2724 — engine/src/flutter/lib/ui/text.dart:2724-2730 | engine/src/flutter/lib/web_ui/lib/text.dart:613-619 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/ui/text.dart:2770 — engine/src/flutter/lib/ui/text.dart:2770-2776 | engine/src/flutter/lib/web_ui/lib/text.dart:632-638 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:377 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:377-383 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:607-613 — before extracting anything, compare `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) packages/flutter/lib/src/material/calendar_date_picker.dart:1072 — packages/flutter/lib/src/material/calendar_date_picker.dart:1072-1078 | packages/flutter/lib/src/material/date_picker.dart:2601-2607 — before extracting anything, compare `packages/flutter/lib/src/material/calendar_date_picker.dart` and `packages/flutter/lib/src/material/date_picker.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • + 42 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×58
  • Duplicated block (10 lines × 2) dev/devicelab/lib/framework/fs_safety.dart:410 — dev/devicelab/lib/framework/fs_safety.dart:410-419 | dev/devicelab/lib/framework/fs_safety.dart:426-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) dev/snippets/lib/src/analysis.dart:201 — dev/snippets/lib/src/analysis.dart:201-210 | dev/snippets/lib/src/analysis.dart:274-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/snippets/lib/src/analysis.dart:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/ui/painting.dart:3904 — engine/src/flutter/lib/ui/painting.dart:3904-3913 | engine/src/flutter/lib/web_ui/lib/painting.dart:491-500 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/painting.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:179 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:179-188 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:486-495 — `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:145 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:145-154 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:169-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:145` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:53 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:53-62 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:123-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:53` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:471 — packages/flutter/lib/src/cupertino/switch.dart:471-480 | packages/flutter/lib/src/material/switch.dart:668-677 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/carousel.dart:1792 — packages/flutter/lib/src/material/carousel.dart:1792-1801 | packages/flutter/lib/src/widgets/page_view.dart:470-479 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1792` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/date_picker_theme.dart:1128 — packages/flutter/lib/src/material/date_picker_theme.dart:1128-1137 | packages/flutter/lib/src/material/date_picker_theme.dart:1319-1328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/filled_button.dart:767 — packages/flutter/lib/src/material/filled_button.dart:767-776 | packages/flutter/lib/src/material/segmented_button.dart:1215-1224 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/segmented_button.dart:1214` calls `contains` and `packages/flutter/lib/src/material/filled_button.dart:766` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/icon_button.dart:1090 — packages/flutter/lib/src/material/icon_button.dart:1090-1099 | packages/flutter/lib/src/material/icon_button.dart:1232-1241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/icon_button.dart:1090` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/menu_style.dart:394 — packages/flutter/lib/src/material/menu_style.dart:394-403 | packages/flutter/lib/src/material/search_bar_theme.dart:247-256 — before extracting anything, compare `packages/flutter/lib/src/material/menu_style.dart` and `packages/flutter/lib/src/material/search_bar_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/menu_style.dart:394` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/selectable_text.dart:677 — packages/flutter/lib/src/material/selectable_text.dart:677-686 | packages/flutter/lib/src/material/text_field.dart:1532-1541 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/material/slider_parts.dart:517 — packages/flutter/lib/src/material/slider_parts.dart:517-526 | packages/flutter/lib/src/material/slider_parts.dart:1179-1188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/slider_parts.dart:517` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/rendering/sliver_fill.dart:197 — packages/flutter/lib/src/rendering/sliver_fill.dart:197-206 | packages/flutter/lib/src/rendering/sliver_fill.dart:280-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/sliver_fill.dart:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/flutter_localizations/lib/src/cupertino_localizations.dart:510 — packages/flutter_localizations/lib/src/cupertino_localizations.dart:510-519 | packages/flutter_localizations/lib/src/material_localizations.dart:733-742 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_localizations/lib/src/cupertino_localizations.dart:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/flutter_tools/lib/src/build_system/targets/ios.dart:98 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:98-107 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:304-313 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/ios.dart` and `packages/flutter_tools/lib/src/build_system/targets/macos.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) packages/flutter_tools/lib/src/commands/build_apk.dart:27 — packages/flutter_tools/lib/src/commands/build_apk.dart:27-36 | packages/flutter_tools/lib/src/commands/build_appbundle.dart:33-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_apk.dart:27` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) packages/flutter_tools/lib/src/commands/build_ios.dart:633 — packages/flutter_tools/lib/src/commands/build_ios.dart:633-642 | packages/flutter_tools/lib/src/commands/build_ios.dart:1128-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:343 — packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:343-352 | packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:358-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:343` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/semantics/semantics.dart:1546 — packages/flutter/lib/src/semantics/semantics.dart:1546-1555 | packages/flutter/lib/src/semantics/semantics.dart:4654-4663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/semantics/semantics.dart:1546` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) packages/flutter/lib/src/widgets/basic.dart:5142 — packages/flutter/lib/src/widgets/basic.dart:5142-5151 | packages/flutter/lib/src/widgets/implicit_animations.dart:1199-1208 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/ui/painting.dart:8832 — engine/src/flutter/lib/ui/painting.dart:8832-8841 | engine/src/flutter/lib/web_ui/lib/painting.dart:973-982 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/painting.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/ui/text.dart:1277 — engine/src/flutter/lib/ui/text.dart:1277-1286 | engine/src/flutter/lib/web_ui/lib/text.dart:203-212 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) engine/src/flutter/lib/ui/text.dart:1555 — engine/src/flutter/lib/ui/text.dart:1555-1564 | engine/src/flutter/lib/web_ui/lib/text.dart:295-304 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/lib/ui/text.dart:1551` calls `_encode` and `engine/src/flutter/lib/web_ui/lib/text.dart:293` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • + 33 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×58
  • Duplicated block (8 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:313 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:313-320 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:331-338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1837 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1837-1844 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1910-1917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) engine/src/flutter/tools/mcp/lib/server.dart:59 — engine/src/flutter/tools/mcp/lib/server.dart:59-66 | engine/src/flutter/tools/mcp/lib/server.dart:71-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/tools/mcp/lib/server.dart:59` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/app.dart:622 — packages/flutter/lib/src/cupertino/app.dart:622-629 | packages/flutter/lib/src/material/app.dart:1116-1123 — `packages/flutter/lib/src/cupertino/app.dart` and `packages/flutter/lib/src/material/app.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/app.dart:622` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1465 — packages/flutter/lib/src/cupertino/date_picker.dart:1465-1472 | packages/flutter/lib/src/cupertino/date_picker.dart:1524-1531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1465` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/gestures/events.dart:872 — packages/flutter/lib/src/gestures/events.dart:872-879 | packages/flutter/lib/src/gestures/events.dart:968-975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/material/carousel.dart:1152 — packages/flutter/lib/src/material/carousel.dart:1152-1160 | packages/flutter/lib/src/material/carousel.dart:1172-1179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/material/icon_button.dart:1102 — packages/flutter/lib/src/material/icon_button.dart:1102-1109 | packages/flutter/lib/src/material/icon_button.dart:1513-1520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/icon_button.dart:1102` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/material/selectable_text.dart:702 — packages/flutter/lib/src/material/selectable_text.dart:702-709 | packages/flutter/lib/src/material/selectable_text.dart:715-722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/rendering/table.dart:965 — packages/flutter/lib/src/rendering/table.dart:965-972 | packages/flutter/lib/src/rendering/table.dart:980-987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/table.dart:965` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter_tools/lib/src/base/process.dart:571 — packages/flutter_tools/lib/src/base/process.dart:571-578 | packages/flutter_tools/lib/src/base/process.dart:590-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/base/process.dart:571` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter_tools/lib/src/build_system/targets/common.dart:447 — packages/flutter_tools/lib/src/build_system/targets/common.dart:447-454 | packages/flutter_tools/lib/src/build_system/targets/common.dart:475-482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/common.dart:447` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter_tools/lib/src/build_system/targets/linux.dart:50 — packages/flutter_tools/lib/src/build_system/targets/linux.dart:50-57 | packages/flutter_tools/lib/src/build_system/targets/windows.dart:59-66 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/linux.dart` and `packages/flutter_tools/lib/src/build_system/targets/windows.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/linux.dart:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter_tools/lib/src/build_system/targets/macos.dart:536 — packages/flutter_tools/lib/src/build_system/targets/macos.dart:536-543 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:545-552 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/macos.dart:536` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:119 — packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:119-126 | packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:188-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/rendering/wrap.dart:866 — packages/flutter/lib/src/rendering/wrap.dart:866-873 | packages/flutter/lib/src/widgets/basic.dart:6336-6343 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/wrap.dart:866` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/widgets/safe_area.dart:139 — packages/flutter/lib/src/widgets/safe_area.dart:139-146 | packages/flutter/lib/src/widgets/safe_area.dart:227-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) engine/src/flutter/lib/ui/key.dart:227 — engine/src/flutter/lib/ui/key.dart:227-234 | engine/src/flutter/lib/web_ui/lib/key.dart:175-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/key.dart:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/nav_bar.dart:676 — packages/flutter/lib/src/cupertino/nav_bar.dart:676-683 | packages/flutter/lib/src/material/app_bar.dart:839-846 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/page_scaffold.dart:309 — packages/flutter/lib/src/cupertino/page_scaffold.dart:309-316 | packages/flutter/lib/src/material/scaffold.dart:3510-3517 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/sheet.dart:1239 — packages/flutter/lib/src/cupertino/sheet.dart:1239-1246 | packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:897-904 — before extracting anything, compare `packages/flutter/lib/src/cupertino/sheet.dart` and `packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/sheet.dart:1248 — packages/flutter/lib/src/cupertino/sheet.dart:1248-1255 | packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:931-938 — before extracting anything, compare `packages/flutter/lib/src/cupertino/sheet.dart` and `packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:541 — packages/flutter/lib/src/cupertino/switch.dart:541-548 | packages/flutter/lib/src/material/switch.dart:821-828 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/material/banner.dart:326 — packages/flutter/lib/src/material/banner.dart:326-333 | packages/flutter/lib/src/material/snack_bar.dart:612-619 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1569 — packages/flutter/lib/src/material/range_slider_parts.dart:1569-1576 | packages/flutter/lib/src/material/slider_parts.dart:892-899 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 33 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×57
  • Duplicated block (13 lines × 2) engine/src/flutter/lib/ui/compositing.dart:64 — engine/src/flutter/lib/ui/compositing.dart:64-76 | engine/src/flutter/lib/ui/painting.dart:8537-8549 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:8537` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:2746 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2746-2758 | engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:389-401 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:246 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:246-258 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:410-422 — before extracting anything, compare `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:35 — engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:35-47 | engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart:42-54 — before extracting anything, compare `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart` and `engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/cupertino/radio.dart:241 — packages/flutter/lib/src/cupertino/radio.dart:241-253 | packages/flutter/lib/src/material/radio.dart:482-494 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/cupertino/segmented_control.dart:773 — packages/flutter/lib/src/cupertino/segmented_control.dart:773-785 | packages/flutter/lib/src/material/segmented_button.dart:1020-1032 — before extracting anything, compare `packages/flutter/lib/src/cupertino/segmented_control.dart` and `packages/flutter/lib/src/material/segmented_button.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:1101 — packages/flutter/lib/src/cupertino/switch.dart:1101-1113 | packages/flutter/lib/src/material/switch.dart:1510-1522 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/switch.dart:1101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:1581 — packages/flutter/lib/src/cupertino/text_field.dart:1581-1593 | packages/flutter/lib/src/material/text_field.dart:1699-1711 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/button.dart:422 — packages/flutter/lib/src/material/button.dart:422-434 | packages/flutter/lib/src/material/button_style_button.dart:580-592 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/button.dart:422` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/checkbox.dart:887 — packages/flutter/lib/src/material/checkbox.dart:887-899 | packages/flutter/lib/src/material/radio.dart:902-914 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/expansion_tile.dart:561 — packages/flutter/lib/src/material/expansion_tile.dart:561-573 | packages/flutter/lib/src/material/expansion_tile.dart:581-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/navigation_bar.dart:1448 — packages/flutter/lib/src/material/navigation_bar.dart:1448-1460 | packages/flutter/lib/src/material/navigation_drawer.dart:750-762 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/page_transitions_theme.dart:1036 — packages/flutter/lib/src/material/page_transitions_theme.dart:1036-1048 | packages/flutter/lib/src/material/page_transitions_theme.dart:1130-1142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/page_transitions_theme.dart:1036` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/page_transitions_theme.dart:1035` calls `_drawScrim` and `packages/flutter/lib/src/material/page_transitions_theme.dart:1128` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/range_slider.dart:1366 — packages/flutter/lib/src/material/range_slider.dart:1366-1378 | packages/flutter/lib/src/material/slider.dart:1606-1618 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider.dart:1366` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/rendering/editable.dart:2350 — packages/flutter/lib/src/rendering/editable.dart:2350-2362 | packages/flutter/lib/src/rendering/editable.dart:2371-2383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2172 — packages/flutter/lib/src/rendering/paragraph.dart:2172-2184 | packages/flutter/lib/src/rendering/paragraph.dart:2350-2362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/rendering/shifted_box.dart:734 — packages/flutter/lib/src/rendering/shifted_box.dart:734-746 | packages/flutter/lib/src/rendering/shifted_box.dart:1265-1277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/shifted_box.dart:734` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/rendering/sliver_group.dart:162 — packages/flutter/lib/src/rendering/sliver_group.dart:162-174 | packages/flutter/lib/src/rendering/sliver_group.dart:451-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/sliver_group.dart:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/services/text_input.dart:2756 — packages/flutter/lib/src/services/text_input.dart:2756-2768 | packages/flutter/lib/src/services/text_input.dart:2772-2784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/widgets/implicit_animations.dart:1075 — packages/flutter/lib/src/widgets/implicit_animations.dart:1075-1087 | packages/flutter/lib/src/widgets/implicit_animations.dart:2430-2442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/widgets/scroll_view.dart:548 — packages/flutter/lib/src/widgets/scroll_view.dart:548-560 | packages/flutter/lib/src/widgets/two_dimensional_scroll_view.dart:219-231 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/scroll_view.dart:548` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/widgets/scroll_view.dart:547` calls `getKeyboardDismissBehavior` and `packages/flutter/lib/src/widgets/two_dimensional_scroll_view.dart:218` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) packages/flutter_tools/lib/src/build_system/targets/android.dart:82 — packages/flutter_tools/lib/src/build_system/targets/android.dart:82-94 | packages/flutter_tools/lib/src/build_system/targets/windows.dart:153-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/android.dart:82` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:822 — packages/flutter/lib/src/cupertino/switch.dart:822-834 | packages/flutter/lib/src/material/switch.dart:1148-1160 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/material/desktop_text_selection.dart:78 — packages/flutter/lib/src/material/desktop_text_selection.dart:78-90 | packages/flutter/lib/src/material/text_selection.dart:120-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) packages/flutter/lib/src/rendering/list_wheel_viewport.dart:227 — packages/flutter/lib/src/rendering/list_wheel_viewport.dart:227-239 | packages/flutter/lib/src/widgets/single_child_scroll_view.dart:373-385 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • + 32 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×53
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/widgets/implicit_animations.dart:1266 — packages/flutter/lib/src/widgets/implicit_animations.dart:1266-1275 | packages/flutter/lib/src/widgets/implicit_animations.dart:1427-1436 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:427 — engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:427-437 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:687-696 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/widgets/_web_image_web.dart:480 — packages/flutter/lib/src/widgets/_web_image_web.dart:480-490 | packages/flutter/lib/src/widgets/implicit_animations.dart:1357-1366 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:760 — packages/flutter/lib/src/painting/box_border.dart:760-772 | packages/flutter/lib/src/painting/box_border.dart:1127-1136 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/widgets/sliver_fill.dart:318 — packages/flutter/lib/src/widgets/sliver_fill.dart:318-327 | packages/flutter/lib/src/widgets/sliver_persistent_header.dart:177-186 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) engine/src/flutter/lib/ui/painting.dart:3447 — engine/src/flutter/lib/ui/painting.dart:3447-3456 | engine/src/flutter/lib/ui/painting.dart:3466-3475 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/painting/circle_border.dart:58 — packages/flutter/lib/src/painting/circle_border.dart:58-67 | packages/flutter/lib/src/painting/oval_border.dart:41-50 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/painting/circle_border.dart:69 — packages/flutter/lib/src/painting/circle_border.dart:69-78 | packages/flutter/lib/src/painting/oval_border.dart:52-61 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter_driver/lib/src/driver/vmservice_driver.dart:350 — packages/flutter_driver/lib/src/driver/vmservice_driver.dart:350-359 | packages/flutter_driver/lib/src/driver/web_driver.dart:177-186 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:554 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:554-563 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:754-767 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) engine/src/flutter/lib/ui/platform_dispatcher.dart:3174 — engine/src/flutter/lib/ui/platform_dispatcher.dart:3174-3184 | engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:595-604 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:440 — packages/flutter_tools/lib/src/base/error_handling_io.dart:440-452 | packages/flutter_tools/lib/src/base/error_handling_io.dart:454-463 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:702 — packages/flutter_tools/lib/src/base/error_handling_io.dart:702-711 | packages/flutter_tools/lib/src/base/error_handling_io.dart:713-722 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) dev/bots/analyze_snippet_code.dart:309 — dev/bots/analyze_snippet_code.dart:309-318 | dev/snippets/lib/src/util.dart:25-34 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/cupertino/menu_anchor.dart:1483 — packages/flutter/lib/src/cupertino/menu_anchor.dart:1483-1492 | packages/flutter/lib/src/cupertino/menu_anchor.dart:1502-1511 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:184 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:184-193 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:330-342 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:1607 — packages/flutter/lib/src/cupertino/date_picker.dart:1607-1616 | packages/flutter/lib/src/cupertino/date_picker.dart:1974-1983 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/material/tab_indicator.dart:46 — packages/flutter/lib/src/material/tab_indicator.dart:46-55 | packages/flutter/lib/src/material/tab_indicator.dart:57-66 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/material/list_tile.dart:1470 — packages/flutter/lib/src/material/list_tile.dart:1470-1479 | packages/flutter/lib/src/material/list_tile.dart:1481-1490 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/web.dart:475 — packages/flutter_tools/lib/src/build_system/targets/web.dart:475-484 | packages/flutter_tools/lib/src/build_system/targets/web.dart:735-748 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/material/calendar_date_picker.dart:1061 — packages/flutter/lib/src/material/calendar_date_picker.dart:1061-1070 | packages/flutter/lib/src/material/date_picker.dart:2590-2599 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/widgets/restoration_properties.dart:537 — packages/flutter/lib/src/widgets/restoration_properties.dart:537-546 | packages/flutter/lib/src/widgets/restoration_properties.dart:631-641 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter_tools/lib/src/run_hot.dart:176 — packages/flutter_tools/lib/src/run_hot.dart:176-189 | packages/flutter_tools/lib/src/run_hot.dart:191-200 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter/lib/src/cupertino/route.dart:203 — packages/flutter/lib/src/cupertino/route.dart:203-212 | packages/flutter/lib/src/cupertino/sheet.dart:848-859 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/macos.dart:96 — packages/flutter_tools/lib/src/build_system/targets/macos.dart:96-105 | packages/flutter_tools/lib/src/cache.dart:1236-1245 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×53
  • Duplicated block (11 lines × 2) dev/tools/gen_keycodes/lib/gtk_code_gen.dart:119 — dev/tools/gen_keycodes/lib/gtk_code_gen.dart:119-129 | dev/tools/gen_keycodes/lib/macos_code_gen.dart:122-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_keycodes/lib/gtk_code_gen.dart:119` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) engine/src/flutter/lib/ui/painting.dart:1756 — engine/src/flutter/lib/ui/painting.dart:1756-1766 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart:183-193 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:1756` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:153 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:153-163 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:496-506 — before extracting anything, compare `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:994 — packages/flutter/lib/src/cupertino/text_field.dart:994-1004 | packages/flutter/lib/src/material/text_field.dart:1044-1054 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/text_field.dart:994` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:1137 — packages/flutter/lib/src/cupertino/text_field.dart:1137-1147 | packages/flutter/lib/src/material/text_field.dart:1305-1315 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/text_field.dart:1137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `oldWidget` to `CupertinoTextField` in one and `TextField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/calendar_date_picker.dart:839 — packages/flutter/lib/src/material/calendar_date_picker.dart:839-849 | packages/flutter/lib/src/material/date_picker.dart:2268-2278 — before extracting anything, compare `packages/flutter/lib/src/material/calendar_date_picker.dart` and `packages/flutter/lib/src/material/date_picker.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/carousel.dart:1399 — packages/flutter/lib/src/material/carousel.dart:1399-1409 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:460-470 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/checkbox.dart:450 — packages/flutter/lib/src/material/checkbox.dart:450-460 | packages/flutter/lib/src/material/radio.dart:641-651 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/checkbox.dart:542 — packages/flutter/lib/src/material/checkbox.dart:542-552 | packages/flutter/lib/src/material/radio.dart:675-685 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/dropdown_menu.dart:1531 — packages/flutter/lib/src/material/dropdown_menu.dart:1531-1541 | packages/flutter/lib/src/material/dropdown_menu.dart:1575-1585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/dropdown_menu.dart:1531` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/input_decorator.dart:5878 — packages/flutter/lib/src/material/input_decorator.dart:5878-5888 | packages/flutter/lib/src/material/input_decorator.dart:5892-5902 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/input_decorator.dart:5878` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/radio_list_tile.dart:668 — packages/flutter/lib/src/material/radio_list_tile.dart:668-678 | packages/flutter/lib/src/material/radio_list_tile.dart:689-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/range_slider.dart:1723 — packages/flutter/lib/src/material/range_slider.dart:1723-1733 | packages/flutter/lib/src/material/range_slider.dart:1811-1821 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider.dart:1723` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2077 — packages/flutter/lib/src/rendering/paragraph.dart:2077-2087 | packages/flutter/lib/src/rendering/paragraph.dart:2255-2265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2077` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:1501 — packages/flutter/lib/src/rendering/proxy_box.dart:1501-1511 | packages/flutter/lib/src/rendering/sliver_clip.dart:296-306 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/proxy_box.dart:1501` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/rendering/sliver_grid.dart:592 — packages/flutter/lib/src/rendering/sliver_grid.dart:592-602 | packages/flutter/lib/src/rendering/sliver_list.dart:45-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/sliver_grid.dart:592` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/widgets/selectable_region.dart:2954 — packages/flutter/lib/src/widgets/selectable_region.dart:2954-2964 | packages/flutter/lib/src/widgets/text.dart:1405-1415 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/selectable_region.dart:2954` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/widgets/sensitive_content.dart:258 — packages/flutter/lib/src/widgets/sensitive_content.dart:258-268 | packages/flutter/lib/src/widgets/sensitive_content.dart:281-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/sensitive_content.dart:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter_tools/lib/src/base/logger.dart:464 — packages/flutter_tools/lib/src/base/logger.dart:464-474 | packages/flutter_tools/lib/src/base/logger.dart:494-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) packages/flutter_tools/lib/src/build_system/targets/android.dart:57 — packages/flutter_tools/lib/src/build_system/targets/android.dart:57-67 | packages/flutter_tools/lib/src/build_system/targets/common.dart:70-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/android.dart:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) packages/flutter_tools/lib/src/commands/create.dart:917 — packages/flutter_tools/lib/src/commands/create.dart:917-927 | packages/flutter_tools/lib/src/commands/create.dart:938-948 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/create.dart:917` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter_tools/lib/src/commands/create.dart:928` calls `join` and `packages/flutter_tools/lib/src/commands/create.dart:949` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:519 — packages/flutter_tools/lib/src/isolated/web_asset_server.dart:519-531 | packages/flutter_tools/lib/src/isolated/web_asset_server.dart:533-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/isolated/web_asset_server.dart:519` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) packages/flutter_tools/lib/src/platform_plugins.dart:511 — packages/flutter_tools/lib/src/platform_plugins.dart:511-521 | packages/flutter_tools/lib/src/platform_plugins.dart:585-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) packages/flutter/lib/src/material/card_theme.dart:201 — packages/flutter/lib/src/material/card_theme.dart:201-211 | packages/flutter/lib/src/material/card_theme.dart:329-339 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) dev/tools/gen_keycodes/lib/ios_code_gen.dart:142 — dev/tools/gen_keycodes/lib/ios_code_gen.dart:142-152 | dev/tools/gen_keycodes/lib/macos_code_gen.dart:137-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×52
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1638 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1638-1644 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1770-1777 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/lib/ui/text.dart:984 — engine/src/flutter/lib/ui/text.dart:984-990 | engine/src/flutter/lib/ui/text.dart:1179-1185 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:636 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:636-642 | packages/flutter/lib/src/painting/stadium_border.dart:303-309 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/widgets/raw_menu_anchor.dart:552 — packages/flutter/lib/src/widgets/raw_menu_anchor.dart:552-558 | packages/flutter/lib/src/widgets/raw_menu_anchor.dart:560-566 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart:482 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart:482-489 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart:491-497 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/gestures/multitap.dart:664 — packages/flutter/lib/src/gestures/multitap.dart:664-672 | packages/flutter/lib/src/gestures/tap.dart:93-99 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:3053 — packages/flutter/lib/src/rendering/proxy_box.dart:3053-3059 | packages/flutter/lib/src/rendering/sliver_clip.dart:275-283 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/rendering/viewport.dart:1256 — packages/flutter/lib/src/rendering/viewport.dart:1256-1262 | packages/flutter/lib/src/widgets/viewport.dart:510-525 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart:182 — packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart:182-188 | packages/flutter/lib/src/services/raw_keyboard_windows.dart:221-228 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/material/user_accounts_drawer_header.dart:261 — packages/flutter/lib/src/material/user_accounts_drawer_header.dart:261-267 | packages/flutter/lib/src/material/user_accounts_drawer_header.dart:269-275 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter_driver/lib/src/driver/raster_cache_summarizer.dart:117 — packages/flutter_driver/lib/src/driver/raster_cache_summarizer.dart:117-123 | packages/flutter_driver/lib/src/driver/scene_display_lag_summarizer.dart:66-72 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/material/dropdown_menu.dart:818 — packages/flutter/lib/src/material/dropdown_menu.dart:818-825 | packages/flutter/lib/src/material/search_anchor.dart:558-564 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/ios.dart:634 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:634-641 | packages/flutter_tools/lib/src/build_system/targets/linux.dart:104-110 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:491 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:491-497 | packages/flutter/lib/src/services/message_codecs.dart:599-605 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:392 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:392-398 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:622-628 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/widgets/heroes.dart:1129 — packages/flutter/lib/src/widgets/heroes.dart:1129-1135 | packages/flutter/lib/src/widgets/ticker_provider.dart:299-311 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/android.dart:119 — packages/flutter_tools/lib/src/build_system/targets/android.dart:119-125 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:598-610 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/widgets/adapter.dart:112 — packages/flutter/lib/src/widgets/adapter.dart:112-118 | packages/flutter/lib/src/widgets/binding.dart:2119-2126 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/material/button_style_button.dart:332 — packages/flutter/lib/src/material/button_style_button.dart:332-338 | packages/flutter/lib/src/material/ink_well.dart:919-925 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:580 — packages/flutter/lib/src/painting/box_border.dart:580-586 | packages/flutter/lib/src/painting/gradient.dart:491-497 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:588 — packages/flutter/lib/src/painting/box_border.dart:588-594 | packages/flutter/lib/src/painting/gradient.dart:499-505 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:960 — packages/flutter/lib/src/painting/box_border.dart:960-966 | packages/flutter/lib/src/painting/gradient.dart:799-805 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:968 — packages/flutter/lib/src/painting/box_border.dart:968-974 | packages/flutter/lib/src/painting/gradient.dart:807-813 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:511 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:511-517 | packages/flutter/lib/src/services/message_codecs.dart:619-625 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) engine/src/flutter/shell/testing/vm_service/launcher.dart:33 — engine/src/flutter/shell/testing/vm_service/launcher.dart:33-42 | packages/flutter_tools/lib/src/protocol_discovery.dart:106-112 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 27 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×46
  • Duplicated block (12 lines × 2) dev/tools/gen_defaults/lib/date_picker_template.dart:16 — dev/tools/gen_defaults/lib/date_picker_template.dart:16-27 | dev/tools/gen_defaults/lib/segmented_button_template.dart:18-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) engine/src/flutter/lib/ui/painting.dart:1739 — engine/src/flutter/lib/ui/painting.dart:1739-1750 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart:166-177 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:1739` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:2338 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2338-2349 | engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:316-327 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:118 — engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:118-129 | engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:191-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1415 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1415-1426 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1478-1489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1415` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1477` calls `pop` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1415` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:2583 — packages/flutter/lib/src/cupertino/date_picker.dart:2583-2594 | packages/flutter/lib/src/cupertino/date_picker.dart:2656-2667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:2583` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/cupertino/desktop_text_selection.dart:177 — packages/flutter/lib/src/cupertino/desktop_text_selection.dart:177-188 | packages/flutter/lib/src/cupertino/text_selection.dart:283-294 — before extracting anything, compare `packages/flutter/lib/src/cupertino/desktop_text_selection.dart` and `packages/flutter/lib/src/cupertino/text_selection.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/desktop_text_selection.dart:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/cupertino/menu_anchor.dart:1427 — packages/flutter/lib/src/cupertino/menu_anchor.dart:1427-1438 | packages/flutter/lib/src/cupertino/menu_anchor.dart:1453-1464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/menu_anchor.dart:1427` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/gestures/events.dart:1474 — packages/flutter/lib/src/gestures/events.dart:1474-1485 | packages/flutter/lib/src/gestures/events.dart:1583-1594 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/material/button.dart:525 — packages/flutter/lib/src/material/button.dart:525-536 | packages/flutter/lib/src/material/button_style_button.dart:713-724 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/material/calendar_date_picker.dart:1048 — packages/flutter/lib/src/material/calendar_date_picker.dart:1048-1059 | packages/flutter/lib/src/material/date_picker.dart:2577-2588 — before extracting anything, compare `packages/flutter/lib/src/material/calendar_date_picker.dart` and `packages/flutter/lib/src/material/date_picker.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/material/menu_anchor.dart:4094 — packages/flutter/lib/src/material/menu_anchor.dart:4094-4105 | packages/flutter/lib/src/material/radio.dart:960-971 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/material/range_slider.dart:1677 — packages/flutter/lib/src/material/range_slider.dart:1677-1688 | packages/flutter/lib/src/material/slider.dart:1813-1824 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider.dart:1677` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/material/switch.dart:2238 — packages/flutter/lib/src/material/switch.dart:2238-2249 | packages/flutter/lib/src/material/switch.dart:2341-2352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/switch.dart:2238` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:914 — packages/flutter/lib/src/rendering/proxy_box.dart:914-925 | packages/flutter/lib/src/rendering/proxy_sliver.dart:140-151 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/rendering/proxy_sliver.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/proxy_box.dart:914` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/services/raw_keyboard_linux.dart:334 — packages/flutter/lib/src/services/raw_keyboard_linux.dart:334-345 | packages/flutter/lib/src/services/raw_keyboard_linux.dart:465-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_linux.dart:334` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/widgets/container.dart:99 — packages/flutter/lib/src/widgets/container.dart:99-110 | packages/flutter/lib/src/widgets/decorated_sliver.dart:94-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) packages/flutter_tools/lib/src/commands/create.dart:959 — packages/flutter_tools/lib/src/commands/create.dart:959-970 | packages/flutter_tools/lib/src/commands/create.dart:1070-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/create.dart:959` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) dev/tools/gen_defaults/lib/tabs_template.dart:56 — dev/tools/gen_defaults/lib/tabs_template.dart:56-67 | dev/tools/gen_defaults/lib/tabs_template.dart:135-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/tabs_template.dart:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:3897 — packages/flutter/lib/src/rendering/proxy_box.dart:3897-3908 | packages/flutter/lib/src/rendering/proxy_sliver.dart:363-374 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/rendering/proxy_sliver.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/material/input_border.dart:365 — packages/flutter/lib/src/material/input_border.dart:365-376 | packages/flutter/lib/src/painting/stadium_border.dart:427-438 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) packages/flutter/lib/src/rendering/sliver_persistent_header.dart:543 — packages/flutter/lib/src/rendering/sliver_persistent_header.dart:543-554 | packages/flutter/lib/src/widgets/sliver_floating_header.dart:189-200 — before extracting anything, compare `packages/flutter/lib/src/rendering/sliver_persistent_header.dart` and `packages/flutter/lib/src/widgets/sliver_floating_header.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:298 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:298-309 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1116-1127 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java` and `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2884 — engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2884-2895 | engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2899-2910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2884` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) dev/devicelab/lib/tasks/integration_tests.dart:294 — dev/devicelab/lib/tasks/integration_tests.dart:294-305 | dev/devicelab/lib/tasks/integration_tests.dart:373-384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/devicelab/lib/tasks/integration_tests.dart:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 21 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×45
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/cupertino/switch.dart:1377 — packages/flutter/lib/src/cupertino/switch.dart:1377-1389 | packages/flutter/lib/src/material/switch.dart:1862-1877 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/painting/linear_border.dart:207 — packages/flutter/lib/src/painting/linear_border.dart:207-219 | packages/flutter/lib/src/painting/linear_border.dart:221-233 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:831 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:831-843 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:851-866 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/material/text_selection_toolbar.dart:775 — packages/flutter/lib/src/material/text_selection_toolbar.dart:775-787 | packages/flutter/lib/src/material/text_selection_toolbar_text_button.dart:148-160 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/rendering/sliver_group.dart:253 — packages/flutter/lib/src/rendering/sliver_group.dart:253-267 | packages/flutter/lib/src/rendering/viewport.dart:1933-1945 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:241 — packages/flutter_tools/lib/src/base/error_handling_io.dart:241-253 | packages/flutter_tools/lib/src/base/error_handling_io.dart:275-290 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/rendering/editable.dart:1562 — packages/flutter/lib/src/rendering/editable.dart:1562-1574 | packages/flutter/lib/src/rendering/editable.dart:1576-1588 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) dev/flutter_analyzer_plugin/lib/src/rules/issue_link_syntax.dart:56 — dev/flutter_analyzer_plugin/lib/src/rules/issue_link_syntax.dart:56-68 | dev/flutter_analyzer_plugin/lib/src/rules/repository_link_syntax.dart:56-68 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/material/navigation_bar.dart:1468 — packages/flutter/lib/src/material/navigation_bar.dart:1468-1480 | packages/flutter/lib/src/material/navigation_drawer.dart:764-776 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:290 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:290-302 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:311-330 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/widgets/_window_positioner.dart:132 — packages/flutter/lib/src/widgets/_window_positioner.dart:132-144 | packages/flutter/lib/src/widgets/_window_positioner.dart:146-158 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/cupertino/text_field.dart:1940 — packages/flutter/lib/src/cupertino/text_field.dart:1940-1953 | packages/flutter/lib/src/material/text_selection_toolbar.dart:347-359 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:6022 — packages/flutter/lib/src/material/input_decorator.dart:6022-6034 | packages/flutter/lib/src/material/snack_bar.dart:951-966 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/rendering/editable.dart:790 — packages/flutter/lib/src/rendering/editable.dart:790-802 | packages/flutter/lib/src/rendering/paragraph.dart:401-414 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1149 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1149-1161 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1164-1176 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/cupertino/dialog.dart:2453 — packages/flutter/lib/src/cupertino/dialog.dart:2453-2465 | packages/flutter/lib/src/cupertino/dialog.dart:2467-2479 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/material/chip.dart:1876 — packages/flutter/lib/src/material/chip.dart:1876-1888 | packages/flutter/lib/src/material/chip.dart:1890-1902 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/semantics/semantics.dart:338 — packages/flutter/lib/src/semantics/semantics.dart:338-350 | packages/flutter/lib/src/semantics/semantics.dart:363-376 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/widgets/overflow_bar.dart:391 — packages/flutter/lib/src/widgets/overflow_bar.dart:391-403 | packages/flutter/lib/src/widgets/overflow_bar.dart:405-417 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/foundation/diagnostics.dart:2867 — packages/flutter/lib/src/foundation/diagnostics.dart:2867-2879 | packages/flutter/lib/src/foundation/diagnostics.dart:2881-2893 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/widgets/framework.dart:5166 — packages/flutter/lib/src/widgets/framework.dart:5166-5178 | packages/flutter/lib/src/widgets/framework.dart:5180-5192 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:866 — packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:866-878 | packages/flutter/lib/src/widgets/sliver_persistent_header.dart:274-287 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter_tools/lib/src/commands/build_macos.dart:24 — packages/flutter_tools/lib/src/commands/build_macos.dart:24-39 | packages/flutter_tools/lib/src/commands/build_web.dart:20-32 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ScribeChannel.java:78 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ScribeChannel.java:78-90 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/ScribeChannel.java:93-105 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/flutter/lib/src/cupertino/app.dart:737 — packages/flutter/lib/src/cupertino/app.dart:737-749 | packages/flutter/lib/src/material/app.dart:1235-1247 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 20 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×45
  • Duplicated block (5 lines × 2) dev/tools/gen_defaults/lib/action_chip_template.dart:61 — dev/tools/gen_defaults/lib/action_chip_template.dart:61-66 | dev/tools/gen_defaults/lib/filter_chip_template.dart:69-73 — before extracting anything, compare `dev/tools/gen_defaults/lib/action_chip_template.dart` and `dev/tools/gen_defaults/lib/filter_chip_template.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/action_chip_template.dart:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `dev/tools/gen_defaults/lib/filter_chip_template.dart:66` calls `contains` and `dev/tools/gen_defaults/lib/action_chip_template.dart:58` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) engine/src/flutter/lib/web_ui/lib/geometry.dart:520 — engine/src/flutter/lib/web_ui/lib/geometry.dart:520-525 | engine/src/flutter/lib/web_ui/lib/geometry.dart:534-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/geometry.dart:520` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/material/menu_anchor.dart:3634 — packages/flutter/lib/src/material/menu_anchor.dart:3634-3638 | packages/flutter/lib/src/material/menu_anchor.dart:3828-3832 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/material/search_anchor.dart:770 — packages/flutter/lib/src/material/search_anchor.dart:770-774 | packages/flutter/lib/src/material/search_anchor.dart:785-789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) dev/flutter_analyzer_plugin/lib/src/rules/no_double_clamp.dart:40 — dev/flutter_analyzer_plugin/lib/src/rules/no_double_clamp.dart:40-44 | dev/flutter_analyzer_plugin/lib/src/rules/render_box_intrinsics.dart:46-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:135 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:135-139 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:231-235 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/cupertino/button.dart:313 — packages/flutter/lib/src/cupertino/button.dart:313-317 | packages/flutter/lib/src/widgets/platform_menu_bar.dart:936-940 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/cupertino/radio.dart:234 — packages/flutter/lib/src/cupertino/radio.dart:234-238 | packages/flutter/lib/src/material/radio.dart:475-479 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/cupertino/segmented_control.dart:213 — packages/flutter/lib/src/cupertino/segmented_control.dart:213-217 | REDACTED:535-539 — before extracting anything, compare `packages/flutter/lib/src/cupertino/segmented_control.dart` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/cupertino/segmented_control.dart:219 — packages/flutter/lib/src/cupertino/segmented_control.dart:219-223 | REDACTED:541-545 — before extracting anything, compare `packages/flutter/lib/src/cupertino/segmented_control.dart` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/gestures/monodrag.dart:914 — packages/flutter/lib/src/gestures/monodrag.dart:914-918 | packages/flutter/lib/src/widgets/gesture_detector.dart:1272-1276 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/material/range_slider.dart:592 — packages/flutter/lib/src/material/range_slider.dart:592-596 | packages/flutter/lib/src/material/slider.dart:799-803 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/material/range_slider.dart:1310 — packages/flutter/lib/src/material/range_slider.dart:1310-1314 | packages/flutter/lib/src/material/slider.dart:1566-1570 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1398 — packages/flutter/lib/src/material/range_slider_parts.dart:1398-1402 | packages/flutter/lib/src/material/slider_parts.dart:1324-1328 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1522 — packages/flutter/lib/src/material/range_slider_parts.dart:1522-1526 | packages/flutter/lib/src/material/slider_parts.dart:845-849 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/image.dart:376 — packages/flutter/lib/src/rendering/image.dart:376-380 | packages/flutter/lib/src/widgets/_web_image_web.dart:348-352 — before extracting anything, compare `packages/flutter/lib/src/rendering/image.dart` and `packages/flutter/lib/src/widgets/_web_image_web.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/image.dart:391 — packages/flutter/lib/src/rendering/image.dart:391-395 | packages/flutter/lib/src/widgets/_web_image_web.dart:363-367 — before extracting anything, compare `packages/flutter/lib/src/rendering/image.dart` and `packages/flutter/lib/src/widgets/_web_image_web.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/layer.dart:1512 — packages/flutter/lib/src/rendering/layer.dart:1512-1516 | packages/flutter/lib/src/widgets/implicit_animations.dart:1745-1749 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/layer.dart:1980 — packages/flutter/lib/src/rendering/layer.dart:1980-1984 | packages/flutter/lib/src/widgets/color_filter.dart:51-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/list_body.dart:258 — packages/flutter/lib/src/rendering/list_body.dart:258-262 | packages/flutter/lib/src/widgets/overscroll_indicator.dart:699-703 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:3962 — packages/flutter/lib/src/rendering/proxy_box.dart:3962-3966 | packages/flutter/lib/src/widgets/basic.dart:7808-7812 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/widgets/basic.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:4246 — packages/flutter/lib/src/rendering/proxy_box.dart:4246-4250 | packages/flutter/lib/src/widgets/basic.dart:8085-8089 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/widgets/basic.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:4303 — packages/flutter/lib/src/rendering/proxy_box.dart:4303-4307 | packages/flutter/lib/src/widgets/basic.dart:8121-8125 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/widgets/basic.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:4341 — packages/flutter/lib/src/rendering/proxy_box.dart:4341-4345 | packages/flutter/lib/src/widgets/basic.dart:8176-8180 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/widgets/basic.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) packages/flutter/lib/src/rendering/sliver_persistent_header.dart:305 — packages/flutter/lib/src/rendering/sliver_persistent_header.dart:305-309 | packages/flutter/lib/src/widgets/sliver_floating_header.dart:324-328 — before extracting anything, compare `packages/flutter/lib/src/rendering/sliver_persistent_header.dart` and `packages/flutter/lib/src/widgets/sliver_floating_header.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 20 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×44
  • Duplicated block (6 lines × 2) dev/tools/gen_defaults/lib/filter_chip_template.dart:101 — dev/tools/gen_defaults/lib/filter_chip_template.dart:101-106 | dev/tools/gen_defaults/lib/input_chip_template.dart:78-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/filter_chip_template.dart:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) dev/tools/gen_defaults/lib/input_decorator_template.dart:146 — dev/tools/gen_defaults/lib/input_decorator_template.dart:146-151 | dev/tools/gen_defaults/lib/input_decorator_template.dart:209-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/input_decorator_template.dart:146` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/gestures/multitap.dart:664 — packages/flutter/lib/src/gestures/multitap.dart:664-669 | packages/flutter/lib/src/gestures/tap.dart:93-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/multitap.dart:664` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/gestures/multitap.dart:670` calls `add`, `IntProperty` and `packages/flutter/lib/src/gestures/tap.dart:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/material/radio.dart:978 — packages/flutter/lib/src/material/radio.dart:978-983 | packages/flutter/lib/src/material/tabs.dart:2909-2914 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/radio.dart:978` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/viewport.dart:1220 — packages/flutter/lib/src/rendering/viewport.dart:1220-1225 | packages/flutter/lib/src/widgets/two_dimensional_viewport.dart:1085-1090 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) engine/src/flutter/lib/gpu/lib/src/compute_pass.dart:114 — engine/src/flutter/lib/gpu/lib/src/compute_pass.dart:114-119 | engine/src/flutter/lib/gpu/lib/src/render_pass.dart:482-487 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) engine/src/flutter/lib/ui/painting.dart:375 — engine/src/flutter/lib/ui/painting.dart:375-380 | engine/src/flutter/lib/web_ui/lib/painting.dart:137-142 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/painting.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:364 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:364-369 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:594-599 — before extracting anything, compare `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/services/serialization.dart:205 — engine/src/flutter/lib/web_ui/lib/src/engine/services/serialization.dart:205-210 | packages/flutter/lib/src/foundation/serialization.dart:266-271 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/gestures/drag_details.dart:38 — packages/flutter/lib/src/gestures/drag_details.dart:38-43 | packages/flutter/lib/src/gestures/long_press.dart:161-166 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/material/choice_chip.dart:352 — packages/flutter/lib/src/material/choice_chip.dart:352-357 | packages/flutter/lib/src/material/filter_chip.dart:385-390 — before extracting anything, compare `packages/flutter/lib/src/material/choice_chip.dart` and `packages/flutter/lib/src/material/filter_chip.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/material/floating_action_button.dart:651 — packages/flutter/lib/src/material/floating_action_button.dart:651-656 | packages/flutter/lib/src/material/popup_menu.dart:1802-1807 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/material/range_slider.dart:1303 — packages/flutter/lib/src/material/range_slider.dart:1303-1308 | packages/flutter/lib/src/material/slider.dart:1559-1564 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/decorated_sliver.dart:113 — packages/flutter/lib/src/rendering/decorated_sliver.dart:113-118 | packages/flutter/lib/src/rendering/proxy_box.dart:2517-2522 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1521 — packages/flutter/lib/src/rendering/editable.dart:1521-1526 | packages/flutter/lib/src/rendering/paragraph.dart:1477-1482 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/flex.dart:28 — packages/flutter/lib/src/rendering/flex.dart:28-33 | packages/flutter/lib/src/rendering/wrap.dart:31-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/proxy_box.dart:430 — packages/flutter/lib/src/rendering/proxy_box.dart:430-435 | packages/flutter/lib/src/widgets/basic.dart:3411-3416 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/widgets/basic.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/shifted_box.dart:280 — packages/flutter/lib/src/rendering/shifted_box.dart:280-285 | packages/flutter/lib/src/rendering/sliver_padding.dart:370-375 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/rendering/sliver.dart:2060 — packages/flutter/lib/src/rendering/sliver.dart:2060-2065 | packages/flutter/lib/src/rendering/sliver_padding.dart:259-264 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `child` to `RenderBox` in one and `RenderSliver` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/widgets/basic.dart:6711 — packages/flutter/lib/src/widgets/basic.dart:6711-6716 | packages/flutter/lib/src/widgets/editable_text.dart:6249-6254 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/flutter_tools/lib/src/build_system/targets/android.dart:32 — packages/flutter_tools/lib/src/build_system/targets/android.dart:32-37 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:386-391 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) packages/flutter_tools/lib/src/commands/run.dart:145 — packages/flutter_tools/lib/src/commands/run.dart:145-150 | packages/flutter_tools/lib/src/commands/test.dart:482-487 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/cupertino/localizations.dart:485 — packages/flutter/lib/src/cupertino/localizations.dart:485-490 | packages/flutter/lib/src/material/material_localizations.dart:1171-1176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/material/range_slider.dart:568 — packages/flutter/lib/src/material/range_slider.dart:568-573 | packages/flutter/lib/src/material/slider.dart:728-733 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) packages/flutter/lib/src/widgets/basic.dart:3677 — packages/flutter/lib/src/widgets/basic.dart:3677-3682 | packages/flutter/lib/src/widgets/sliver.dart:1502-1507 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • + 19 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×43
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:333 — engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:333-341 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:605-613 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/widgets/selectable_region.dart:2590 — packages/flutter/lib/src/widgets/selectable_region.dart:2590-2598 | packages/flutter/lib/src/widgets/text.dart:1244-1254 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:265 — packages/flutter_tools/lib/src/base/error_handling_io.dart:265-273 | packages/flutter_tools/lib/src/base/error_handling_io.dart:292-305 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:365 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:365-373 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart:247-255 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:121 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:121-129 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:351-359 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:1363 — packages/flutter/lib/src/rendering/proxy_box.dart:1363-1371 | packages/flutter/lib/src/widgets/basic.dart:779-788 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/widgets/implicit_animations.dart:1530 — packages/flutter/lib/src/widgets/implicit_animations.dart:1530-1538 | packages/flutter/lib/src/widgets/implicit_animations.dart:1661-1669 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java:188 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java:188-196 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java:208-216 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:519 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:519-527 | packages/flutter/lib/src/services/message_codecs.dart:627-635 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/widgets/widget_inspector.dart:1893 — packages/flutter/lib/src/widgets/widget_inspector.dart:1893-1901 | packages/flutter/lib/src/widgets/widget_inspector.dart:1959-1972 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) dev/devicelab/lib/framework/fs_safety.dart:314 — dev/devicelab/lib/framework/fs_safety.dart:314-322 | dev/devicelab/lib/framework/fs_safety.dart:334-345 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/painting/flutter_logo.dart:148 — packages/flutter/lib/src/painting/flutter_logo.dart:148-156 | packages/flutter/lib/src/painting/flutter_logo.dart:158-166 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/painting/image_provider.dart:1699 — packages/flutter/lib/src/painting/image_provider.dart:1699-1707 | packages/flutter/lib/src/painting/image_provider.dart:1709-1718 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java:231 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java:231-239 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewWrapper.java:316-326 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/rendering/object.dart:4398 — packages/flutter/lib/src/rendering/object.dart:4398-4406 | packages/flutter/lib/src/rendering/object.dart:4408-4416 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/rendering/layer.dart:1131 — packages/flutter/lib/src/rendering/layer.dart:1131-1139 | packages/flutter/lib/src/rendering/layer.dart:1141-1149 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) dev/integration_tests/new_gallery/lib/pages/home.dart:870 — dev/integration_tests/new_gallery/lib/pages/home.dart:870-879 | packages/flutter/lib/src/widgets/page_view.dart:606-614 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:847 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:847-855 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:876-884 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter_tools/lib/src/dart/analysis.dart:169 — packages/flutter_tools/lib/src/dart/analysis.dart:169-177 | packages/flutter_tools/lib/src/dart/analysis.dart:179-187 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter_localizations/lib/src/cupertino_localizations.dart:295 — packages/flutter_localizations/lib/src/cupertino_localizations.dart:295-303 | packages/flutter_localizations/lib/src/material_localizations.dart:307-315 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/rendering/list_body.dart:264 — packages/flutter/lib/src/rendering/list_body.dart:264-273 | packages/flutter/lib/src/rendering/list_wheel_viewport.dart:570-578 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/cupertino/route.dart:190 — packages/flutter/lib/src/cupertino/route.dart:190-198 | packages/flutter/lib/src/material/page.dart:187-195 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/material/banner.dart:290 — packages/flutter/lib/src/material/banner.dart:290-298 | packages/flutter/lib/src/material/snack_bar.dart:563-572 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py:221 — engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py:221-229 | engine/src/flutter/tools/fuchsia/merge_and_upload_debug_symbols.py:143-151 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/flutter/lib/src/cupertino/route.dart:505 — packages/flutter/lib/src/cupertino/route.dart:505-514 | packages/flutter/lib/src/cupertino/sheet.dart:460-468 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 18 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×43
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:5847 — packages/flutter/lib/src/material/input_decorator.dart:5847-5855 | packages/flutter/lib/src/material/input_decorator.dart:5857-5864 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/rendering/layer.dart:3009 — packages/flutter/lib/src/rendering/layer.dart:3009-3016 | packages/flutter/lib/src/widgets/basic.dart:7577-7588 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) engine/src/flutter/lib/ui/painting.dart:7950 — engine/src/flutter/lib/ui/painting.dart:7950-7957 | engine/src/flutter/lib/ui/painting.dart:8012-8019 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/material/dropdown_menu_theme.dart:124 — packages/flutter/lib/src/material/dropdown_menu_theme.dart:124-137 | packages/flutter/lib/src/material/menu_anchor.dart:2027-2034 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) dev/tools/gen_defaults/lib/date_picker_template.dart:29 — dev/tools/gen_defaults/lib/date_picker_template.dart:29-41 | dev/tools/gen_defaults/lib/segmented_button_template.dart:31-38 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:540 — packages/flutter/lib/src/painting/box_border.dart:540-547 | packages/flutter/lib/src/painting/box_border.dart:892-899 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:174 — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:174-181 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:189-196 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/painting/shape_decoration.dart:183 — packages/flutter/lib/src/painting/shape_decoration.dart:183-190 | packages/flutter/lib/src/painting/shape_decoration.dart:192-199 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/painting/colors.dart:512 — packages/flutter/lib/src/painting/colors.dart:512-524 | packages/flutter/lib/src/widgets/icon_data.dart:129-136 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/widgets/framework.dart:7236 — packages/flutter/lib/src/widgets/framework.dart:7236-7243 | packages/flutter/lib/src/widgets/framework.dart:7245-7256 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) dev/packages_autoroller/lib/src/repository.dart:341 — dev/packages_autoroller/lib/src/repository.dart:341-348 | dev/packages_autoroller/lib/src/repository.dart:350-362 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/material/time_picker.dart:1816 — packages/flutter/lib/src/material/time_picker.dart:1816-1823 | packages/flutter/lib/src/material/time_picker.dart:1833-1840 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) dev/tools/gen_keycodes/lib/keyboard_keys_code_gen.dart:74 — dev/tools/gen_keycodes/lib/keyboard_keys_code_gen.dart:74-81 | dev/tools/gen_keycodes/lib/keyboard_keys_code_gen.dart:147-154 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:242 — packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:242-249 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:385-392 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:177 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:177-184 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:393-400 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) engine/src/flutter/shell/platform/darwin/ios/framework/Source/SplashScreenManager.swift:73 — engine/src/flutter/shell/platform/darwin/ios/framework/Source/SplashScreenManager.swift:73-80 | engine/src/flutter/shell/platform/darwin/ios/framework/Source/SplashScreenManager.swift:83-90 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/material/elevated_button.dart:529 — packages/flutter/lib/src/material/elevated_button.dart:529-536 | packages/flutter/lib/src/material/filled_button.dart:547-554 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/widgets/framework.dart:7173 — packages/flutter/lib/src/widgets/framework.dart:7173-7180 | packages/flutter/lib/src/widgets/layout_builder.dart:273-280 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java:744 — engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java:744-755 | engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java:757-764 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter_tools/lib/src/vmservice.dart:630 — packages/flutter_tools/lib/src/vmservice.dart:630-637 | packages/flutter_tools/lib/src/vmservice.dart:663-674 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/material/switch.dart:809 — packages/flutter/lib/src/material/switch.dart:809-819 | packages/flutter/lib/src/cupertino/switch.dart:532-539 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter_tools/lib/src/commands/devices.dart:138 — packages/flutter_tools/lib/src/commands/devices.dart:138-145 | packages/flutter_tools/lib/src/runner/target_devices.dart:96-106 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter_tools/lib/src/commands/devices.dart:147 — packages/flutter_tools/lib/src/commands/devices.dart:147-154 | packages/flutter_tools/lib/src/runner/target_devices.dart:108-118 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:335 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:335-344 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart:88-95 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) packages/flutter/lib/src/material/ink_sparkle.dart:421 — packages/flutter/lib/src/material/ink_sparkle.dart:421-428 | packages/flutter/lib/src/widgets/stretch_effect.dart:276-285 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 18 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×42
  • Hotspot: packages/flutter_tools/lib/src/commands/test.dart packages/flutter_tools/lib/src/commands/test.dart:489 — packages/flutter_tools/lib/src/commands/test.dart changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in TestCommand.runCommand at line 489. 1 of those changes was a fix/bug commit, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/test.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/context/tool_dependencies.dart packages/flutter_tools/lib/src/context/tool_dependencies.dart:167 — packages/flutter_tools/lib/src/context/tool_dependencies.dart changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ToolDependencies.bootstrap at line 167. 1 of those changes was a fix/bug commit, and the other 33 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/context/tool_dependencies.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/isolated/resident_web_runner.dart packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:424 — packages/flutter_tools/lib/src/isolated/resident_web_runner.dart changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in ResidentWebRunner.restart at line 424. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/isolated/resident_web_runner.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/create.dart packages/flutter_tools/lib/src/commands/create.dart:404 — packages/flutter_tools/lib/src/commands/create.dart changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in CreateCommand.runCommand at line 404. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/create.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/runner/flutter_command_runner.dart packages/flutter_tools/lib/src/runner/flutter_command_runner.dart:547 — packages/flutter_tools/lib/src/runner/flutter_command_runner.dart changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in FlutterCommandRunner.runCommand at line 547. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/runner/flutter_command_runner.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/run.dart packages/flutter_tools/lib/src/commands/run.dart:731 — packages/flutter_tools/lib/src/commands/run.dart changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in RunCommand.runCommand at line 731. 1 of those changes was a fix/bug commit, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/run.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:2266 — engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in SemanticsObject._getEngineSemanticsRole at line 2266. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/daemon.dart packages/flutter_tools/lib/src/commands/daemon.dart:608 — packages/flutter_tools/lib/src/commands/daemon.dart changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in DaemonDomain.getSupportedPlatforms at line 608. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/daemon.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/resident_runner.dart packages/flutter_tools/lib/src/resident_runner.dart:143 — packages/flutter_tools/lib/src/resident_runner.dart changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in FlutterDevice.connect at line 143. 1 of those changes was a fix/bug commit, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/resident_runner.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:222 — engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in TextLayout.addLine at line 222. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter/lib/src/rendering/object.dart packages/flutter/lib/src/rendering/object.dart:1452 — packages/flutter/lib/src/rendering/object.dart changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in PipelineOwner.flushSemantics at line 1452. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter/lib/src/rendering/object.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/isolated/web_asset_server.dart packages/flutter_tools/lib/src/isolated/web_asset_server.dart:438 — packages/flutter_tools/lib/src/isolated/web_asset_server.dart changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in WebAssetServer.handleRequest at line 438. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/isolated/web_asset_server.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/artifacts.dart packages/flutter_tools/lib/src/artifacts.dart:1076 — packages/flutter_tools/lib/src/artifacts.dart changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in CachedLocalEngineArtifacts.getArtifactPath at line 1076. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/artifacts.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/config.dart packages/flutter_tools/lib/src/commands/config.dart:192 — packages/flutter_tools/lib/src/commands/config.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ConfigCommand.runCommand at line 192. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/config.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/asset.dart packages/flutter_tools/lib/src/asset.dart:316 — packages/flutter_tools/lib/src/asset.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in ManifestAssetBundle.build at line 316. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/asset.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/build_ios.dart packages/flutter_tools/lib/src/commands/build_ios.dart:976 — packages/flutter_tools/lib/src/commands/build_ios.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _BuildIOSSubCommand.runCommand at line 976. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/build_ios.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: dev/devicelab/lib/tasks/perf_tests.dart dev/devicelab/lib/tasks/perf_tests.dart:1370 — dev/devicelab/lib/tasks/perf_tests.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in PerfTest.internalRun at line 1370. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- dev/devicelab/lib/tasks/perf_tests.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/build_web.dart packages/flutter_tools/lib/src/commands/build_web.dart:51 — packages/flutter_tools/lib/src/commands/build_web.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in BuildWebCommand.runCommand at line 51. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/build_web.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/assemble.dart packages/flutter_tools/lib/src/commands/assemble.dart:397 — packages/flutter_tools/lib/src/commands/assemble.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AssembleCommand.runCommand at line 397. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/assemble.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/update_packages.dart packages/flutter_tools/lib/src/commands/update_packages.dart:144 — packages/flutter_tools/lib/src/commands/update_packages.dart changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in UpdatePackagesCommand.runCommand at line 144. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/update_packages.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/doctor.dart packages/flutter_tools/lib/src/doctor.dart:295 — packages/flutter_tools/lib/src/doctor.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Doctor.diagnose at line 295. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/doctor.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/analyze.dart packages/flutter_tools/lib/src/commands/analyze.dart:237 — packages/flutter_tools/lib/src/commands/analyze.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in AnalyzeCommand.runCommand at line 237. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/analyze.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/build_ios_framework.dart packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in BuildIOSFrameworkCommand.runCommand at line 527. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/build_ios_framework.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/commands/drive.dart packages/flutter_tools/lib/src/commands/drive.dart:323 — packages/flutter_tools/lib/src/commands/drive.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in DriveCommand.runCommand at line 323. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/commands/drive.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:148 — packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SwiftPackageManagerIntegrationMigration.migrate at line 148. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 17 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×42
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/cupertino/checkbox.dart:382 — packages/flutter/lib/src/cupertino/checkbox.dart:382-393 | packages/flutter/lib/src/cupertino/radio.dart:379-390 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) dev/tools/gen_keycodes/lib/ios_code_gen.dart:63 — dev/tools/gen_keycodes/lib/ios_code_gen.dart:63-74 | dev/tools/gen_keycodes/lib/macos_code_gen.dart:47-61 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:315 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:315-326 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:479-490 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) REDACTED:1171 — REDACTED:1171-1182 | REDACTED:1184-1195 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) engine/src/flutter/lib/web_ui/lib/geometry.dart:517 — engine/src/flutter/lib/web_ui/lib/geometry.dart:517-531 | engine/src/flutter/lib/web_ui/lib/geometry.dart:533-544 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:945 — packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:945-958 | packages/flutter/lib/src/widgets/sliver.dart:1092-1103 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/material/floating_action_button.dart:690 — packages/flutter/lib/src/material/floating_action_button.dart:690-701 | packages/flutter/lib/src/material/floating_action_button.dart:703-716 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/widgets/focus_traversal.dart:1490 — packages/flutter/lib/src/widgets/focus_traversal.dart:1490-1501 | packages/flutter/lib/src/widgets/focus_traversal.dart:1565-1577 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/material/date_picker.dart:497 — packages/flutter/lib/src/material/date_picker.dart:497-508 | packages/flutter/lib/src/material/time_picker.dart:2483-2496 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/material/input_border.dart:392 — packages/flutter/lib/src/material/input_border.dart:392-403 | packages/flutter/lib/src/material/input_border.dart:405-416 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) engine/src/flutter/lib/ui/painting.dart:3316 — engine/src/flutter/lib/ui/painting.dart:3316-3327 | engine/src/flutter/lib/ui/painting.dart:3343-3362 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/editable.dart:1536 — packages/flutter/lib/src/rendering/editable.dart:1536-1547 | packages/flutter/lib/src/rendering/editable.dart:1549-1560 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/widgets/implicit_animations.dart:1253 — packages/flutter/lib/src/widgets/implicit_animations.dart:1253-1264 | packages/flutter/lib/src/widgets/implicit_animations.dart:1412-1425 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/viewport.dart:2207 — packages/flutter/lib/src/rendering/viewport.dart:2207-2218 | packages/flutter/lib/src/rendering/viewport.dart:2220-2231 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:700 — packages/flutter/lib/src/rendering/proxy_box.dart:700-711 | packages/flutter/lib/src/rendering/proxy_box.dart:713-724 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/editable.dart:1590 — packages/flutter/lib/src/rendering/editable.dart:1590-1601 | packages/flutter/lib/src/rendering/editable.dart:1603-1615 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:249 — packages/flutter/lib/src/rendering/proxy_box.dart:249-260 | packages/flutter/lib/src/rendering/proxy_box.dart:262-273 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:275 — packages/flutter/lib/src/rendering/proxy_box.dart:275-286 | packages/flutter/lib/src/rendering/proxy_box.dart:288-299 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter_tools/gradle/src/main/kotlin/NativePluginLoaderReflectionBridge.kt:26 — packages/flutter_tools/gradle/src/main/kotlin/NativePluginLoaderReflectionBridge.kt:26-37 | packages/flutter_tools/gradle/src/main/kotlin/NativePluginLoaderReflectionBridge.kt:45-56 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/rendering/flex.dart:847 — packages/flutter/lib/src/rendering/flex.dart:847-858 | packages/flutter/lib/src/rendering/flex.dart:860-871 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/canvas.dart:209 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/canvas.dart:209-228 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:130-141 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/material/time_picker.dart:2919 — packages/flutter/lib/src/material/time_picker.dart:2919-2934 | packages/flutter/lib/src/material/calendar_date_picker.dart:259-270 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/widgets/routes.dart:2193 — packages/flutter/lib/src/widgets/routes.dart:2193-2204 | packages/flutter/lib/src/widgets/routes.dart:2206-2218 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:277 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:277-288 | packages/flutter/lib/src/services/message_codecs.dart:336-347 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) packages/flutter/lib/src/painting/gradient.dart:910 — packages/flutter/lib/src/painting/gradient.dart:910-922 | packages/flutter/lib/src/painting/gradient.dart:1226-1237 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 17 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×42
  • Duplicated block (14 lines × 2) dev/tools/gen_keycodes/lib/logical_key_data.dart:187 — dev/tools/gen_keycodes/lib/logical_key_data.dart:187-200 | dev/tools/gen_keycodes/lib/logical_key_data.dart:212-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_keycodes/lib/logical_key_data.dart:187` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/ui/geometry.dart:913 — engine/src/flutter/lib/ui/geometry.dart:913-926 | engine/src/flutter/lib/web_ui/lib/geometry.dart:314-327 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/ui/painting.dart:8373 — engine/src/flutter/lib/ui/painting.dart:8373-8386 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:514-527 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `blendMode` to `BlendMode` in one and `ui.BlendMode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:2647 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2647-2660 | engine/src/flutter/lib/web_ui/lib/src/engine/window.dart:891-904 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/window.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:2863 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2863-2876 | engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:435-448 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/web_ui/dev/chrome_installer.dart:91 — engine/src/flutter/lib/web_ui/dev/chrome_installer.dart:91-104 | engine/src/flutter/lib/web_ui/dev/firefox_installer.dart:84-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:300 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:300-313 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:464-477 — before extracting anything, compare `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:300` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) engine/src/flutter/tools/engine_tool/lib/src/commands/stamp_command.dart:64 — engine/src/flutter/tools/engine_tool/lib/src/commands/stamp_command.dart:64-77 | engine/src/flutter/tools/engine_tool/lib/src/commands/stamp_command.dart:80-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/cupertino/nav_bar.dart:2034 — packages/flutter/lib/src/cupertino/nav_bar.dart:2034-2047 | packages/flutter/lib/src/cupertino/nav_bar.dart:2062-2075 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/nav_bar.dart:2034` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/cupertino/tab_view.dart:239 — packages/flutter/lib/src/cupertino/tab_view.dart:239-252 | packages/flutter/lib/src/widgets/app.dart:1597-1610 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/tab_view.dart:239` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:893 — packages/flutter/lib/src/cupertino/text_field.dart:893-906 | packages/flutter/lib/src/material/text_field.dart:972-985 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/text_field.dart:893` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/gestures/scale.dart:678 — packages/flutter/lib/src/gestures/scale.dart:678-691 | packages/flutter/lib/src/gestures/scale.dart:811-824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/material/dropdown_menu.dart:1616 — packages/flutter/lib/src/material/dropdown_menu.dart:1616-1629 | packages/flutter/lib/src/material/dropdown_menu.dart:1643-1656 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/dropdown_menu.dart:1616` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/material/slider.dart:2224 — packages/flutter/lib/src/material/slider.dart:2224-2237 | packages/flutter/lib/src/material/slider.dart:2313-2326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/material/stepper.dart:681 — packages/flutter/lib/src/material/stepper.dart:681-694 | packages/flutter/lib/src/material/stepper.dart:713-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/material/time_picker.dart:915 — packages/flutter/lib/src/material/time_picker.dart:915-928 | packages/flutter/lib/src/material/toggle_buttons.dart:1679-1692 — before extracting anything, compare `packages/flutter/lib/src/material/time_picker.dart` and `packages/flutter/lib/src/material/toggle_buttons.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2091 — packages/flutter/lib/src/rendering/paragraph.dart:2091-2104 | packages/flutter/lib/src/rendering/paragraph.dart:2269-2282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2091` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:256 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:256-269 | packages/flutter_test/lib/src/accessibility.dart:249-262 — before extracting anything, compare `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart` and `packages/flutter_test/lib/src/accessibility.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:256` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/widgets/restoration_properties.dart:582 — packages/flutter/lib/src/widgets/restoration_properties.dart:582-595 | packages/flutter/lib/src/widgets/restoration_properties.dart:671-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/restoration_properties.dart:582` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/widgets/viewport.dart:167 — packages/flutter/lib/src/widgets/viewport.dart:167-180 | packages/flutter/lib/src/widgets/viewport.dart:470-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/flutter_tools/lib/src/artifacts.dart:431 — packages/flutter_tools/lib/src/artifacts.dart:431-444 | packages/flutter_tools/lib/src/artifacts.dart:1345-1358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/artifacts.dart:431` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:780 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:780-793 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:353-366 — before extracting anything, compare `packages/flutter_tools/lib/src/commands/build_ios_framework.dart` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:780` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:516 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:516-529 | packages/flutter/lib/src/painting/stadium_border.dart:207-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/picture.dart:59 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/picture.dart:59-72 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart:177-190 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) packages/flutter/lib/src/rendering/proxy_sliver.dart:74 — packages/flutter/lib/src/rendering/proxy_sliver.dart:74-87 | packages/flutter/lib/src/widgets/sliver_layout_builder.dart:71-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 17 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×41
  • Edited copy of a member (11 corresponding lines) engine/src/flutter/tools/mcp/lib/server.dart:54 — engine/src/flutter/tools/mcp/lib/server.dart:54-66 | engine/src/flutter/tools/mcp/lib/server.dart:68-78 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:933 — packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:933-943 | packages/flutter/lib/src/widgets/sliver.dart:1113-1130 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/cupertino/text_selection.dart:31 — packages/flutter/lib/src/cupertino/text_selection.dart:31-51 | packages/flutter/lib/src/material/text_selection.dart:295-305 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/widgets/selectable_region.dart:1212 — packages/flutter/lib/src/widgets/selectable_region.dart:1212-1223 | packages/flutter/lib/src/widgets/selectable_region.dart:1241-1251 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) engine/src/flutter/tools/engine_tool/lib/src/typed_json.dart:150 — engine/src/flutter/tools/engine_tool/lib/src/typed_json.dart:150-160 | engine/src/flutter/tools/engine_tool/lib/src/typed_json.dart:214-231 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/material/calendar_date_picker.dart:851 — packages/flutter/lib/src/material/calendar_date_picker.dart:851-867 | packages/flutter/lib/src/material/date_picker.dart:2280-2290 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:499 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:499-509 | packages/flutter/lib/src/services/message_codecs.dart:607-617 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/material/icon_button.dart:1552 — packages/flutter/lib/src/material/icon_button.dart:1552-1563 | packages/flutter/lib/src/material/outlined_button.dart:553-563 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/rendering/table.dart:261 — packages/flutter/lib/src/rendering/table.dart:261-271 | packages/flutter/lib/src/rendering/table.dart:313-323 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/material/input_border.dart:669 — packages/flutter/lib/src/material/input_border.dart:669-679 | packages/flutter/lib/src/material/input_border.dart:681-691 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:1651 — packages/flutter/lib/src/cupertino/date_picker.dart:1651-1665 | packages/flutter/lib/src/cupertino/date_picker.dart:2011-2021 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/rendering/sliver_group.dart:136 — packages/flutter/lib/src/rendering/sliver_group.dart:136-147 | packages/flutter/lib/src/rendering/sliver_group.dart:426-436 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter_tools/lib/src/commands/build_swift_package.dart:2054 — packages/flutter_tools/lib/src/commands/build_swift_package.dart:2054-2064 | packages/flutter_tools/lib/src/commands/build_swift_package.dart:2066-2076 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:120 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:120-132 | packages/flutter/lib/src/services/message_codecs.dart:147-157 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:964 — packages/flutter/lib/src/material/range_slider.dart:964-974 | packages/flutter/lib/src/material/slider.dart:1229-1239 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/widgets/framework.dart:3212 — packages/flutter/lib/src/widgets/framework.dart:3212-3222 | packages/flutter/lib/src/widgets/framework.dart:3224-3235 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_scene_builder.dart:23 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_scene_builder.dart:23-33 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_scene_builder.dart:35-45 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter_tools/lib/src/platform_plugins.dart:315 — packages/flutter_tools/lib/src/platform_plugins.dart:315-327 | packages/flutter_tools/lib/src/platform_plugins.dart:408-418 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:1368 — packages/flutter/lib/src/cupertino/date_picker.dart:1368-1380 | packages/flutter/lib/src/cupertino/date_picker.dart:1808-1818 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/cupertino/route.dart:559 — packages/flutter/lib/src/cupertino/route.dart:559-573 | packages/flutter/lib/src/cupertino/route.dart:673-683 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/gestures/multitap.dart:1027 — packages/flutter/lib/src/gestures/multitap.dart:1027-1037 | packages/flutter/lib/src/gestures/tap.dart:775-787 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter_tools/lib/src/cache.dart:705 — packages/flutter_tools/lib/src/cache.dart:705-715 | packages/flutter_tools/lib/src/cache.dart:719-729 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:197 — packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:197-207 | packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:209-219 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/material/page_transitions_theme.dart:195 — packages/flutter/lib/src/material/page_transitions_theme.dart:195-206 | packages/flutter/lib/src/material/page_transitions_theme.dart:300-310 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/flutter/lib/src/material/text_form_field.dart:380 — packages/flutter/lib/src/material/text_form_field.dart:380-391 | packages/flutter/lib/src/cupertino/text_form_field_row.dart:327-337 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 16 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking dev/bots/analyze_snippet_code.dart:615 — `_extractSnippets` is async and calls readAsLinesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/prepare_package/archive_creator.dart:326 — `_downloadPubPackageArchives` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/prepare_package/archive_creator.dart:427 — `_populateCaches` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/prepare_package/archive_publisher.dart:150 — `_updateMetadata` is async and calls readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/suite_runners/run_web_tests.dart:67 — `webLongRunningTestsRunner` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/suite_runners/run_web_tests.dart:260 — `_runFlutterDriverWebTest` is async and calls deleteSync, readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/suite_runners/run_web_tests.dart:326 — `_runWebTreeshakeTest` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/suite_runners/run_web_tests.dart:523 — `_runWebUnitTests` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/suite_runners/run_web_tests.dart:585 — `_runFlutterWebTest` is async and calls deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/bots/unpublish_package.dart:317 — `_loadMetadata` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/tools/create_api_docs.dart:390 — `_createDocset` is async and calls createSync, copySync, readAsStringSync, writeAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/tools/create_api_docs.dart:549 — `generateDartdoc` is async and calls runSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/tools/create_api_docs.dart:932 — `_fetchArchive` is async and calls sleep — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking dev/tools/create_api_docs.dart:955 — `_extractDocs` is async and calls createSync, writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking engine/src/flutter/testing/dart/goldens.dart:26 — `create` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking engine/src/flutter/testing/dart/goldens.dart:50 — `addGoldenImage` is async and calls writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:260 — `_imgtestInit` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking engine/src/flutter/tools/build_bucket_golden_scraper/lib/build_bucket_golden_scraper.dart:88 — `run` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking engine/src/flutter/tools/clang_tidy/lib/clang_tidy.dart:119 — `run` is async and calls readAsStringSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking engine/src/flutter/tools/clang_tidy/lib/clang_tidy.dart:206 — `computeFilesOfInterest` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/flutter_goldens/lib/flutter_goldens.dart:280 — `fromLocalFileComparator` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/flutter_goldens/lib/flutter_goldens.dart:385 — `fromLocalFileComparator` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/flutter_goldens/lib/flutter_goldens.dart:585 — `fromLocalFileComparator` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/flutter_goldens/lib/flutter_goldens.dart:907 — `_writeFailureAndThrow` is async and calls createSync, writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/flutter_goldens/lib/skia_client.dart:405 — `getImageBytes` is async and calls createSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×34
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/material/checkbox.dart:750 — packages/flutter/lib/src/material/checkbox.dart:750-771 | packages/flutter/lib/src/material/chip.dart:2122-2169 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/widgets/icon.dart:359 — packages/flutter/lib/src/widgets/icon.dart:359-375 | packages/flutter/lib/src/widgets/icon_theme_data.dart:232-246 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart:144 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart:144-158 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart:160-181 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/rendering/shifted_box.dart:734 — packages/flutter/lib/src/rendering/shifted_box.dart:734-748 | packages/flutter/lib/src/rendering/shifted_box.dart:1265-1279 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/lib/ui/compositing.dart:62 — engine/src/flutter/lib/ui/compositing.dart:62-76 | engine/src/flutter/lib/ui/painting.dart:8534-8549 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter_tools/lib/src/base/process.dart:620 — packages/flutter_tools/lib/src/base/process.dart:620-634 | packages/flutter_tools/lib/src/base/process.dart:636-650 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) dev/devicelab/lib/framework/fs_safety.dart:407 — dev/devicelab/lib/framework/fs_safety.dart:407-421 | dev/devicelab/lib/framework/fs_safety.dart:423-437 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:527 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:527-542 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:564-578 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/lib/web_ui/lib/geometry.dart:61 — engine/src/flutter/lib/web_ui/lib/geometry.dart:61-75 | engine/src/flutter/lib/web_ui/lib/geometry.dart:150-164 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/widgets/sliver_clip.dart:139 — packages/flutter/lib/src/widgets/sliver_clip.dart:139-153 | packages/flutter/lib/src/widgets/sliver_clip.dart:298-319 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:821 — engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:821-835 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:837-863 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter_tools/lib/src/dart/pub.dart:246 — packages/flutter_tools/lib/src/dart/pub.dart:246-260 | packages/flutter_tools/lib/src/dart/pub.dart:262-277 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/rendering/wrap.dart:504 — packages/flutter/lib/src/rendering/wrap.dart:504-518 | packages/flutter/lib/src/rendering/wrap.dart:520-534 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/rendering/wrap.dart:536 — packages/flutter/lib/src/rendering/wrap.dart:536-550 | packages/flutter/lib/src/rendering/wrap.dart:552-566 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:872 — packages/flutter_tools/lib/src/base/error_handling_io.dart:872-886 | packages/flutter_tools/lib/src/base/error_handling_io.dart:888-902 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java:1138 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java:1138-1152 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java:825-841 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java:72 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java:72-87 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewWrapper.java:333-347 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/rendering/custom_layout.dart:332 — packages/flutter/lib/src/rendering/custom_layout.dart:332-346 | packages/flutter/lib/src/rendering/shifted_box.dart:1396-1410 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/widgets/adapter.dart:144 — packages/flutter/lib/src/widgets/adapter.dart:144-163 | packages/flutter/lib/src/widgets/binding.dart:2152-2166 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter_tools/lib/src/vmservice.dart:543 — packages/flutter_tools/lib/src/vmservice.dart:543-560 | packages/flutter_tools/lib/src/vmservice.dart:830-844 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/widgets/basic.dart:1101 — packages/flutter/lib/src/widgets/basic.dart:1101-1115 | packages/flutter/lib/src/widgets/basic.dart:1189-1203 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:671 — packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:671-685 | packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:687-703 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/material/time_picker.dart:2039 — packages/flutter/lib/src/material/time_picker.dart:2039-2054 | packages/flutter/lib/src/material/time_picker.dart:2080-2094 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/flutter/lib/src/widgets/scroll_activity.dart:493 — packages/flutter/lib/src/widgets/scroll_activity.dart:493-507 | packages/flutter/lib/src/widgets/scroll_activity.dart:509-523 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) dev/integration_tests/hybrid_android_views/lib/main.dart:45 — dev/integration_tests/hybrid_android_views/lib/main.dart:45-59 | packages/flutter/lib/src/material/dialog.dart:1496-1511 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 9 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×34
  • Edited copy of a member (14 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java:70 — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java:70-83 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java:91-105 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:339 — packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:339-352 | packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:354-367 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/scrollbar.dart:270 — packages/flutter/lib/src/material/scrollbar.dart:270-283 | packages/flutter/lib/src/material/scrollbar.dart:285-298 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2882 — engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2882-2895 | engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2897-2910 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/rendering/table.dart:963 — packages/flutter/lib/src/rendering/table.dart:963-976 | packages/flutter/lib/src/rendering/table.dart:978-991 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/button.dart:523 — packages/flutter/lib/src/material/button.dart:523-536 | packages/flutter/lib/src/material/button_style_button.dart:711-724 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/widgets/text_selection.dart:659 — packages/flutter/lib/src/widgets/text_selection.dart:659-678 | packages/flutter/lib/src/widgets/text_selection.dart:680-693 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/gestures/monodrag.dart:949 — packages/flutter/lib/src/gestures/monodrag.dart:949-962 | packages/flutter/lib/src/gestures/monodrag.dart:1013-1026 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/switch.dart:2102 — packages/flutter/lib/src/material/switch.dart:2102-2115 | packages/flutter/lib/src/material/switch.dart:2117-2132 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/icon_button.dart:1186 — packages/flutter/lib/src/material/icon_button.dart:1186-1199 | packages/flutter/lib/src/material/icon_button.dart:1328-1341 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/toggle_buttons.dart:462 — packages/flutter/lib/src/material/toggle_buttons.dart:462-475 | packages/flutter/lib/src/material/toggle_buttons.dart:479-492 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:229 — packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:229-242 | packages/flutter_tools/packages/flutter_tools_extension/lib/src/build.dart:244-257 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/navigation_bar.dart:1259 — packages/flutter/lib/src/material/navigation_bar.dart:1259-1272 | packages/flutter/lib/src/material/navigation_drawer.dart:690-703 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:742 — packages/flutter/lib/src/painting/box_border.dart:742-755 | packages/flutter/lib/src/rendering/table_border.dart:336-352 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/services/raw_keyboard_ios.dart:268 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:268-281 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:286-299 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/toggle_buttons.dart:1201 — packages/flutter/lib/src/material/toggle_buttons.dart:1201-1214 | packages/flutter/lib/src/material/toggle_buttons.dart:1270-1287 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1607 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1607-1621 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1623-1636 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/gestures/multidrag.dart:155 — packages/flutter/lib/src/gestures/multidrag.dart:155-169 | packages/flutter/lib/src/gestures/multidrag.dart:171-184 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt:253 — packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt:253-266 | packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt:278-291 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/cupertino/sheet.dart:964 — packages/flutter/lib/src/cupertino/sheet.dart:964-978 | packages/flutter/lib/src/cupertino/sheet.dart:1330-1343 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/progress_indicator.dart:1190 — packages/flutter/lib/src/material/progress_indicator.dart:1190-1203 | packages/flutter/lib/src/material/progress_indicator.dart:1402-1417 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/rendering/editable.dart:2369 — packages/flutter/lib/src/rendering/editable.dart:2369-2385 | packages/flutter/lib/src/rendering/paragraph.dart:956-969 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter_tools/lib/src/isolated/native_assets/targets.dart:365 — packages/flutter_tools/lib/src/isolated/native_assets/targets.dart:365-378 | packages/flutter_tools/lib/src/isolated/native_assets/targets.dart:385-398 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart:711 — engine/src/flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart:711-724 | engine/src/flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart:726-739 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) packages/flutter/lib/src/material/page_transitions_theme.dart:555 — packages/flutter/lib/src/material/page_transitions_theme.dart:555-569 | packages/flutter/lib/src/widgets/page_transitions_builder.dart:327-340 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 9 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×33
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/ui/painting.dart:509 — engine/src/flutter/lib/ui/painting.dart:509-523 | engine/src/flutter/lib/web_ui/lib/painting.dart:226-240 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/painting.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/ui/painting.dart:1768 — engine/src/flutter/lib/ui/painting.dart:1768-1782 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart:195-209 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:1768` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:2665 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2665-2679 | engine/src/flutter/lib/web_ui/lib/src/engine/window.dart:909-923 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/window.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/platform_dispatcher.dart:2665` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/ui/text.dart:2536 — engine/src/flutter/lib/ui/text.dart:2536-2550 | engine/src/flutter/lib/web_ui/lib/text.dart:538-552 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:189 — engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:189-203 | engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:247-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:137 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:137-151 | packages/flutter/lib/src/services/message_codecs.dart:162-176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/web_ui/lib/text.dart:353 — engine/src/flutter/lib/web_ui/lib/text.dart:353-367 | engine/src/flutter/lib/web_ui/lib/text.dart:412-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/text.dart:353` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1682 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1682-1696 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1712-1726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1682` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:790 — packages/flutter/lib/src/cupertino/switch.dart:790-804 | packages/flutter/lib/src/material/switch.dart:1107-1121 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/switch.dart:790` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/material/button.dart:547 — packages/flutter/lib/src/material/button.dart:547-561 | packages/flutter/lib/src/material/button_style_button.dart:735-749 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/material/checkbox.dart:624 — packages/flutter/lib/src/material/checkbox.dart:624-638 | packages/flutter/lib/src/material/switch.dart:1091-1105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/material/range_slider.dart:682 — packages/flutter/lib/src/material/range_slider.dart:682-696 | packages/flutter/lib/src/material/slider.dart:865-879 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider.dart:682` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/semantics/semantics.dart:452 — packages/flutter/lib/src/semantics/semantics.dart:452-466 | packages/flutter/lib/src/semantics/semantics.dart:469-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/services/raw_keyboard_android.dart:283 — packages/flutter/lib/src/services/raw_keyboard_android.dart:283-297 | packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart:157-171 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_android.dart:283` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:489 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:489-503 | packages/flutter_test/lib/src/accessibility.dart:424-438 — before extracting anything, compare `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart` and `packages/flutter_test/lib/src/accessibility.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/widgets/overflow_bar.dart:331 — packages/flutter/lib/src/widgets/overflow_bar.dart:331-345 | packages/flutter/lib/src/widgets/overflow_bar.dart:362-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/overflow_bar.dart:331` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1437 — engine/src/flutter/lib/ui/geometry.dart:1437-1451 | engine/src/flutter/lib/web_ui/lib/geometry.dart:673-687 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/geometry.dart:1437` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) packages/flutter/lib/src/material/toggle_buttons.dart:877 — packages/flutter/lib/src/material/toggle_buttons.dart:877-891 | packages/flutter/lib/src/material/toggle_buttons_theme.dart:234-248 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1479 — engine/src/flutter/lib/ui/geometry.dart:1479-1493 | engine/src/flutter/lib/web_ui/lib/geometry.dart:716-730 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py:199 — engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py:199-214 | engine/src/flutter/tools/fuchsia/merge_and_upload_debug_symbols.py:64-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) dev/integration_tests/android_engine_test/lib/external_texture/surface_producer_smiley_face_main.dart:39 — dev/integration_tests/android_engine_test/lib/external_texture/surface_producer_smiley_face_main.dart:39-53 | dev/integration_tests/android_engine_test/lib/external_texture/surface_texture_smiley_face_main.dart:39-53 — before extracting anything, compare `dev/integration_tests/android_engine_test/lib/external_texture/surface_producer_smiley_face_main.dart` and `dev/integration_tests/android_engine_test/lib/external_texture/surface_texture_smiley_face_main.dart` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/leave_behind_demo.dart:88 — dev/integration_tests/flutter_gallery/lib/demo/material/leave_behind_demo.dart:88-102 | dev/integration_tests/flutter_gallery/lib/demo/material/leave_behind_demo.dart:105-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:138 — dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:138-152 | dev/integration_tests/new_gallery/lib/studies/shrine/backdrop.dart:124-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart:80 — dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart:80-94 | dev/integration_tests/new_gallery/lib/studies/shrine/login.dart:154-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/shrine/login.dart:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:96 — dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:96-110 | dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:450-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 8 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×29
  • Edited copy of a member (18 corresponding lines) packages/flutter_tools/lib/src/commands/daemon.dart:1148 — packages/flutter_tools/lib/src/commands/daemon.dart:1148-1165 | packages/flutter_tools/lib/src/commands/daemon.dart:1167-1184 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/rendering/shifted_box.dart:452 — packages/flutter/lib/src/rendering/shifted_box.dart:452-469 | packages/flutter/lib/src/rendering/shifted_box.dart:471-491 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:879 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:879-896 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:905-927 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/animated_color_square.dart:32 — engine/src/flutter/testing/ios_scenario_app/lib/src/animated_color_square.dart:32-49 | engine/src/flutter/testing/ios_scenario_app/lib/src/poppable_screen.dart:22-40 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:51 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:51-68 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:257-274 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:70 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:70-87 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:276-293 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/material/chip.dart:1573 — packages/flutter/lib/src/material/chip.dart:1573-1590 | packages/flutter/lib/src/material/toggle_buttons.dart:1703-1725 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:1501 — packages/flutter/lib/src/rendering/proxy_box.dart:1501-1518 | packages/flutter/lib/src/rendering/sliver_clip.dart:296-313 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/rendering/sliver_grid.dart:391 — packages/flutter/lib/src/rendering/sliver_grid.dart:391-408 | packages/flutter/lib/src/rendering/sliver_grid.dart:501-523 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:699 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:699-718 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:1017-1034 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/cupertino/nav_bar.dart:1753 — packages/flutter/lib/src/cupertino/nav_bar.dart:1753-1770 | packages/flutter/lib/src/widgets/widget_span.dart:426-445 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/rendering/layer.dart:1429 — packages/flutter/lib/src/rendering/layer.dart:1429-1446 | packages/flutter/lib/src/rendering/object.dart:4674-4691 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/widgets/scrollable.dart:1080 — packages/flutter/lib/src/widgets/scrollable.dart:1080-1097 | packages/flutter/lib/src/widgets/scrollable.dart:2486-2513 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/painting/strut_style.dart:596 — packages/flutter/lib/src/painting/strut_style.dart:596-614 | packages/flutter/lib/src/services/text_input.dart:1626-1643 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart:287 — packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart:287-304 | packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart:306-326 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/widgets/platform_view.dart:759 — packages/flutter/lib/src/widgets/platform_view.dart:759-776 | packages/flutter/lib/src/widgets/platform_view.dart:917-937 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/widgets/_window_win32.dart:187 — packages/flutter/lib/src/widgets/_window_win32.dart:187-204 | packages/flutter/lib/src/widgets/_window_win32.dart:206-223 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/lib/src/widgets/_window_win32.dart:147 — packages/flutter/lib/src/widgets/_window_win32.dart:147-164 | packages/flutter/lib/src/widgets/_window_win32.dart:166-185 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:96 — examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:96-113 | examples/multiple_windows/lib/app/window_edit_dialog.dart:113-136 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart:31 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart:31-49 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.1.dart:32-49 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) dev/integration_tests/android_views/lib/wm_integrations.dart:94 — dev/integration_tests/android_views/lib/wm_integrations.dart:94-111 | dev/integration_tests/hybrid_android_views/lib/nested_view_event_page.dart:143-160 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) examples/multiple_windows/lib/app/popup_button.dart:78 — examples/multiple_windows/lib/app/popup_button.dart:78-95 | examples/multiple_windows/lib/app/tooltip_button.dart:78-95 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_edit_board_point.dart:18 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_edit_board_point.dart:18-35 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_edit_board_point.dart:21-46 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) dev/integration_tests/new_gallery/lib/feature_discovery/overlay.dart:118 — dev/integration_tests/new_gallery/lib/feature_discovery/overlay.dart:118-135 | dev/integration_tests/new_gallery/lib/feature_discovery/overlay.dart:245-262 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:82 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:82-99 | packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart:84-103 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×29
  • Duplicated block (18 lines × 2) dev/tools/gen_defaults/lib/icon_button_template.dart:19 — dev/tools/gen_defaults/lib/icon_button_template.dart:19-36 | dev/tools/gen_defaults/lib/icon_button_template.dart:58-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/icon_button_template.dart:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:121 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:121-138 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:1284-1301 — `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:585 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:585-602 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:636-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:585` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:635` calls `pushClipRect`, `fromLTRB` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:584` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/cupertino/app.dart:603 — packages/flutter/lib/src/cupertino/app.dart:603-620 | packages/flutter/lib/src/material/app.dart:1097-1114 — `packages/flutter/lib/src/cupertino/app.dart` and `packages/flutter/lib/src/material/app.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/app.dart:603` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1549 — packages/flutter/lib/src/cupertino/date_picker.dart:1549-1566 | packages/flutter/lib/src/cupertino/date_picker.dart:1917-1934 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1549` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/cupertino/radio.dart:551 — packages/flutter/lib/src/cupertino/radio.dart:551-568 | packages/flutter/lib/src/cupertino/radio.dart:579-596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/radio.dart:551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/cupertino/radio.dart:569` calls `Paint`, `drawCircle` and `packages/flutter/lib/src/cupertino/radio.dart:597` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:1311 — packages/flutter/lib/src/cupertino/switch.dart:1311-1328 | packages/flutter/lib/src/material/switch.dart:1794-1811 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/switch.dart:1311` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/bottom_navigation_bar.dart:984 — packages/flutter/lib/src/material/bottom_navigation_bar.dart:984-1001 | packages/flutter/lib/src/material/bottom_navigation_bar.dart:1015-1032 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/bottom_navigation_bar.dart:984` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/checkbox_list_tile.dart:547 — packages/flutter/lib/src/material/checkbox_list_tile.dart:547-564 | packages/flutter/lib/src/material/checkbox_list_tile.dart:568-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox_list_tile.dart:547` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/input_decorator.dart:5967 — packages/flutter/lib/src/material/input_decorator.dart:5967-5984 | packages/flutter/lib/src/material/input_decorator.dart:5990-6007 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/range_slider.dart:2235 — packages/flutter/lib/src/material/range_slider.dart:2235-2252 | packages/flutter/lib/src/material/slider.dart:2351-2368 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/switch_list_tile.dart:580 — packages/flutter/lib/src/material/switch_list_tile.dart:580-597 | packages/flutter/lib/src/material/switch_list_tile.dart:609-626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/tabs.dart:1654 — packages/flutter/lib/src/material/tabs.dart:1654-1671 | packages/flutter/lib/src/material/tabs.dart:2280-2297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/tabs.dart:1654` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/material/tabs.dart:1675` calls `removeListener` and `packages/flutter/lib/src/material/tabs.dart:2301` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/material/text_field.dart:1643 — packages/flutter/lib/src/material/text_field.dart:1643-1660 | packages/flutter/lib/src/material/text_field.dart:1663-1680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:1733 — packages/flutter/lib/src/rendering/paragraph.dart:1733-1750 | packages/flutter/lib/src/rendering/paragraph.dart:1832-1849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:1733` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/rendering/platform_view.dart:512 — packages/flutter/lib/src/rendering/platform_view.dart:512-529 | packages/flutter/lib/src/rendering/platform_view.dart:588-605 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/widgets/_window_macos.dart:384 — packages/flutter/lib/src/widgets/_window_macos.dart:384-401 | packages/flutter/lib/src/widgets/_window_macos.dart:481-498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_window_macos.dart:384` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/widgets/editable_text.dart:6995 — packages/flutter/lib/src/widgets/editable_text.dart:6995-7012 | packages/flutter/lib/src/widgets/text.dart:1447-1464 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/widgets/implicit_animations.dart:1234 — packages/flutter/lib/src/widgets/implicit_animations.dart:1234-1251 | packages/flutter/lib/src/widgets/implicit_animations.dart:1393-1410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/implicit_animations.dart:1234` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter/lib/src/widgets/text_selection.dart:772 — packages/flutter/lib/src/widgets/text_selection.dart:772-789 | packages/flutter/lib/src/widgets/text_selection.dart:942-959 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/text_selection.dart:772` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter_tools/lib/src/commands/analyze.dart:256 — packages/flutter_tools/lib/src/commands/analyze.dart:256-273 | packages/flutter_tools/lib/src/commands/analyze.dart:302-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/analyze.dart:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) packages/flutter_driver/lib/src/common/layer_tree.dart:18 — packages/flutter_driver/lib/src/common/layer_tree.dart:18-35 | packages/flutter_driver/lib/src/common/render_tree.dart:18-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_driver/lib/src/common/layer_tree.dart:18` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:20 — engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:20-37 | engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java:21-38 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java` and `engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java:20` calls `addAction` and `engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:19` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) dev/integration_tests/channels/lib/main.dart:184 — dev/integration_tests/channels/lib/main.dart:184-201 | dev/integration_tests/platform_interaction/lib/main.dart:44-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/expansion_panels_demo.dart:221 — dev/integration_tests/flutter_gallery/lib/demo/material/expansion_panels_demo.dart:221-238 | dev/integration_tests/flutter_gallery/lib/demo/material/expansion_panels_demo.dart:283-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/material/expansion_panels_demo.dart:221` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×24
  • Duplicated block (17 lines × 2) dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:272 — dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:272-288 | dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:346-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:272` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:270` calls `section` and `dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:344` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) engine/src/flutter/lib/ui/painting.dart:8135 — engine/src/flutter/lib/ui/painting.dart:8135-8151 | engine/src/flutter/lib/ui/painting.dart:8191-8207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:8135` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) engine/src/flutter/lib/ui/text.dart:160 — engine/src/flutter/lib/ui/text.dart:160-176 | engine/src/flutter/lib/web_ui/lib/text.dart:67-83 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/material/button_style_button.dart:479 — packages/flutter/lib/src/material/button_style_button.dart:479-495 | packages/flutter/lib/src/material/menu_anchor.dart:3671-3687 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/button_style_button.dart:479` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/material/carousel.dart:1424 — packages/flutter/lib/src/material/carousel.dart:1424-1440 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:479-495 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1424` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/material/checkbox.dart:510 — packages/flutter/lib/src/material/checkbox.dart:510-526 | packages/flutter/lib/src/material/radio.dart:732-748 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1277 — packages/flutter/lib/src/material/range_slider_parts.dart:1277-1293 | packages/flutter/lib/src/material/range_slider_parts.dart:1353-1369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1277` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/material/scrollbar_theme.dart:252 — packages/flutter/lib/src/material/scrollbar_theme.dart:252-268 | packages/flutter/lib/src/material/switch_theme.dart:204-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/scrollbar_theme.dart:252` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/painting/_network_image_io.dart:53 — packages/flutter/lib/src/painting/_network_image_io.dart:53-69 | packages/flutter/lib/src/painting/_network_image_io.dart:75-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/painting/_network_image_io.dart:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `decode` to `image_provider.DecoderBufferCallback` in one and `image_provider.ImageDecoderCallback` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2152 — packages/flutter/lib/src/rendering/paragraph.dart:2152-2168 | packages/flutter/lib/src/rendering/paragraph.dart:2330-2346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2152` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/rendering/paragraph.dart:2151` calls `_setSelectionPosition`, `_clampTextPosition` and `packages/flutter/lib/src/rendering/paragraph.dart:2329` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/widgets/animated_cross_fade.dart:270 — packages/flutter/lib/src/widgets/animated_cross_fade.dart:270-286 | packages/flutter/lib/src/widgets/animated_size.dart:165-181 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/animated_cross_fade.dart:270` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/widgets/animated_cross_fade.dart:269` calls `add` and `packages/flutter/lib/src/widgets/animated_size.dart:164` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/widgets/overflow_bar.dart:225 — packages/flutter/lib/src/widgets/overflow_bar.dart:225-241 | packages/flutter/lib/src/widgets/overflow_bar.dart:597-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/overflow_bar.dart:225` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/widgets/overflow_bar.dart:224` calls `add` and `packages/flutter/lib/src/widgets/overflow_bar.dart:596` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) packages/flutter/lib/src/widgets/scrollable.dart:795 — packages/flutter/lib/src/widgets/scrollable.dart:795-811 | packages/flutter/lib/src/widgets/scrollable.dart:819-835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/scrollable.dart:795` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527-543 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:74-90 — before extracting anything, compare `packages/flutter_tools/lib/src/commands/build_ios_framework.dart` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter_tools/lib/src/localizations/gen_l10n.dart:840 — packages/flutter_tools/lib/src/localizations/gen_l10n.dart:840-856 | packages/flutter_tools/lib/src/localizations/gen_l10n.dart:944-960 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/localizations/gen_l10n.dart:944` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:175 — packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:175-191 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:224-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1420 — engine/src/flutter/lib/ui/geometry.dart:1420-1436 | engine/src/flutter/lib/web_ui/lib/geometry.dart:655-671 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/geometry.dart:1420` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:447 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:447-463 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:469-485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:39 — engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:39-55 | engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java:51-67 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java` and `engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:38` calls `parseFloat` and `engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java:50` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:222 — dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:222-238 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:246-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:222` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter/examples/api/lib/material/color_scheme/color_scheme.0.dart:522 — packages/flutter/examples/api/lib/material/color_scheme/color_scheme.0.dart:522-538 | packages/flutter/examples/api/lib/material/color_scheme/dynamic_content_color.0.dart:509-525 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) packages/flutter/examples/api/lib/material/search_anchor/search_anchor.2.dart:36 — packages/flutter/examples/api/lib/material/search_anchor/search_anchor.2.dart:36-52 | packages/flutter/examples/api/lib/material/search_anchor/search_bar.0.dart:60-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/search_anchor/search_anchor.2.dart:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.0.dart:191 — packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.0.dart:191-207 | packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.1.dart:386-402 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.0.dart` and `packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.1.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart:89 — dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart:89-105 | dev/integration_tests/new_gallery/lib/studies/shrine/supplemental/cut_corners_border.dart:89-105 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart` and `dev/integration_tests/new_gallery/lib/studies/shrine/supplemental/cut_corners_border.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×24
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/carousel.dart:1292 — packages/flutter/lib/src/material/carousel.dart:1292-1307 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:337-352 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/carousel.dart:1347 — packages/flutter/lib/src/material/carousel.dart:1347-1362 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:405-420 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1347` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/checkbox_theme.dart:189 — packages/flutter/lib/src/material/checkbox_theme.dart:189-204 | packages/flutter/lib/src/material/radio_theme.dart:215-230 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox_theme.dart` and `packages/flutter/lib/src/material/radio_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox_theme.dart:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/range_slider.dart:806 — packages/flutter/lib/src/material/range_slider.dart:806-821 | packages/flutter/lib/src/material/slider.dart:1052-1067 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/range_slider.dart:927 — packages/flutter/lib/src/material/range_slider.dart:927-942 | packages/flutter/lib/src/material/slider.dart:1196-1211 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider.dart` and `packages/flutter/lib/src/material/slider.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider.dart:927` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:821 — packages/flutter/lib/src/material/range_slider_parts.dart:821-836 | packages/flutter/lib/src/material/range_slider_parts.dart:1198-1213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1298 — packages/flutter/lib/src/material/range_slider_parts.dart:1298-1313 | packages/flutter/lib/src/material/range_slider_parts.dart:1370-1385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/switch.dart:2264 — packages/flutter/lib/src/material/switch.dart:2264-2279 | packages/flutter/lib/src/material/tabs.dart:2828-2843 — before extracting anything, compare `packages/flutter/lib/src/material/switch.dart` and `packages/flutter/lib/src/material/tabs.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/switch.dart:2264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/material/time_picker.dart:2508 — packages/flutter/lib/src/material/time_picker.dart:2508-2523 | packages/flutter/lib/src/material/time_picker.dart:2558-2573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/time_picker.dart:2508` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/rendering/sliver_tree.dart:220 — packages/flutter/lib/src/rendering/sliver_tree.dart:220-235 | packages/flutter/lib/src/rendering/sliver_tree.dart:286-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/sliver_tree.dart:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/widgets/_window_win32.dart:1602 — packages/flutter/lib/src/widgets/_window_win32.dart:1602-1617 | packages/flutter/lib/src/widgets/_window_win32.dart:1639-1654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_window_win32.dart:1602` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter_tools/lib/src/build_system/targets/ios.dart:698 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:698-713 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:422-437 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/ios.dart` and `packages/flutter_tools/lib/src/build_system/targets/macos.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) packages/flutter_tools/lib/src/build_system/targets/linux.dart:117 — packages/flutter_tools/lib/src/build_system/targets/linux.dart:117-132 | packages/flutter_tools/lib/src/build_system/targets/windows.dart:131-146 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/linux.dart` and `packages/flutter_tools/lib/src/build_system/targets/windows.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1148 — packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1148-1163 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1210-1225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1148` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) packages/flutter/lib/src/widgets/basic.dart:4831 — packages/flutter/lib/src/widgets/basic.dart:4831-4846 | packages/flutter/lib/src/widgets/indexed_stack.dart:143-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java:769 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java:769-784 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java:419-434 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java` and `engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:783 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:783-798 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:229-244 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java` and `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:783` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:70 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:70-85 | dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:104-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) dev/manual_tests/lib/text.dart:1044 — dev/manual_tests/lib/text.dart:1044-1059 | dev/manual_tests/lib/text.dart:1212-1227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/manual_tests/lib/text.dart:1044` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16 lines × 2) packages/flutter/examples/api/lib/material/dialog/dialog.0.dart:39 — packages/flutter/examples/api/lib/material/dialog/dialog.0.dart:39-54 | packages/flutter/examples/api/lib/material/dialog/dialog.0.dart:63-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/dialog/dialog.0.dart:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:61 — packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:61-76 | packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:120-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:43 — packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:43-58 | packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart:68-83 — before extracting anything, compare `packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart` and `packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart:38 — packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart:38-53 | packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.1.dart:88-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:63 — packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:63-78 | packages/flutter/examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart:76-91 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart` and `packages/flutter/examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:63` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×22
  • Edited copy of a member (24 corresponding lines) packages/flutter/lib/src/material/icon_button.dart:1085 — packages/flutter/lib/src/material/icon_button.dart:1085-1109 | packages/flutter/lib/src/material/icon_button.dart:1497-1520 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/devicelab/lib/framework/devices.dart:785 — dev/devicelab/lib/framework/devices.dart:785-808 | dev/devicelab/lib/framework/devices.dart:1097-1122 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/tools/gen_keycodes/lib/logical_key_data.dart:186 — dev/tools/gen_keycodes/lib/logical_key_data.dart:186-209 | dev/tools/gen_keycodes/lib/logical_key_data.dart:211-234 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:544 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:544-573 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:157-180 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:820 — engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:820-843 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:870-897 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/lib/src/material/page_transitions_theme.dart:1024 — packages/flutter/lib/src/material/page_transitions_theme.dart:1024-1048 | packages/flutter/lib/src/material/page_transitions_theme.dart:1119-1142 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/lib/src/rendering/sliver_group.dart:155 — packages/flutter/lib/src/rendering/sliver_group.dart:155-178 | packages/flutter/lib/src/rendering/sliver_group.dart:444-467 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/lib/src/material/app_bar_theme.dart:565 — packages/flutter/lib/src/material/app_bar_theme.dart:565-591 | packages/flutter/lib/src/material/dialog_theme.dart:479-502 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:1619 — packages/flutter/lib/src/cupertino/date_picker.dart:1619-1649 | packages/flutter/lib/src/cupertino/date_picker.dart:1986-2009 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:382 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:382-405 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:474-498 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/lib/src/cupertino/page_scaffold.dart:113 — packages/flutter/lib/src/cupertino/page_scaffold.dart:113-136 | packages/flutter/lib/src/material/scaffold.dart:2747-2770 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:129 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:129-154 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart:117-140 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/colors_demo.dart:100 — dev/integration_tests/flutter_gallery/lib/demo/colors_demo.dart:100-126 | dev/integration_tests/new_gallery/lib/demos/reference/colors_demo.dart:155-178 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart:89 — dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/cut_corners_border.dart:89-114 | dev/integration_tests/new_gallery/lib/studies/shrine/supplemental/cut_corners_border.dart:89-112 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:35 — packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:35-58 | packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.build_default_drag_handles.0.dart:35-71 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:57 — packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:57-80 | packages/flutter/examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart:63-92 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/tabs_demo.dart:66 — dev/integration_tests/new_gallery/lib/demos/material/tabs_demo.dart:66-99 | dev/integration_tests/new_gallery/lib/demos/material/tabs_demo.dart:146-169 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/examples/api/lib/material/tabs/tab_bar.0.dart:23 — packages/flutter/examples/api/lib/material/tabs/tab_bar.0.dart:23-48 | packages/flutter/examples/api/lib/material/tabs/tab_bar.1.dart:45-68 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:530 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:530-553 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:689-716 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.0.dart:202 — packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.0.dart:202-226 | packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.1.dart:218-241 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/leave_behind_demo.dart:275 — dev/integration_tests/flutter_gallery/lib/demo/material/leave_behind_demo.dart:275-298 | packages/flutter/examples/api/lib/widgets/page/page_can_pop.0.dart:51-76 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_shared_z_axis_transition.dart:76 — dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_shared_z_axis_transition.dart:76-99 | dev/integration_tests/new_gallery/lib/studies/reply/app.dart:29-52 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×22
  • Edited copy of a member (21 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:874 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:874-894 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:902-924 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/widgets/safe_area.dart:112 — packages/flutter/lib/src/widgets/safe_area.dart:112-137 | packages/flutter/lib/src/widgets/safe_area.dart:205-225 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/material/time_picker.dart:3582 — packages/flutter/lib/src/material/time_picker.dart:3582-3602 | packages/flutter/lib/src/material/time_picker.dart:3905-3944 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/cupertino/menu_anchor.dart:1427 — packages/flutter/lib/src/cupertino/menu_anchor.dart:1427-1447 | packages/flutter/lib/src/cupertino/menu_anchor.dart:1453-1473 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/painting/stadium_border.dart:36 — packages/flutter/lib/src/painting/stadium_border.dart:36-56 | packages/flutter/lib/src/painting/stadium_border.dart:58-78 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/cupertino/text_form_field_row.dart:339 — packages/flutter/lib/src/cupertino/text_form_field_row.dart:339-359 | packages/flutter/lib/src/material/text_form_field.dart:393-413 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/widgets/overflow_bar.dart:220 — packages/flutter/lib/src/widgets/overflow_bar.dart:220-241 | packages/flutter/lib/src/widgets/overflow_bar.dart:593-613 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/cupertino/spell_check_suggestions_toolbar.dart:108 — packages/flutter/lib/src/cupertino/spell_check_suggestions_toolbar.dart:108-128 | packages/flutter/lib/src/material/spell_check_suggestions_toolbar.dart:117-138 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) engine/src/flutter/lib/web_ui/dev/chrome_installer.dart:90 — engine/src/flutter/lib/web_ui/dev/chrome_installer.dart:90-110 | engine/src/flutter/lib/web_ui/dev/firefox_installer.dart:83-103 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/painting/_network_image_io.dart:49 — packages/flutter/lib/src/painting/_network_image_io.dart:49-69 | packages/flutter/lib/src/painting/_network_image_io.dart:71-91 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:853 — packages/flutter/lib/src/material/range_slider.dart:853-873 | packages/flutter/lib/src/material/slider.dart:1108-1131 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) engine/src/flutter/tools/pkg/process_fakes/lib/process_fakes.dart:95 — engine/src/flutter/tools/pkg/process_fakes/lib/process_fakes.dart:95-115 | packages/flutter_tools/lib/src/base/error_handling_io.dart:1305-1328 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:875 — packages/flutter/lib/src/material/range_slider.dart:875-895 | packages/flutter/lib/src/material/slider.dart:1133-1158 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/lib/src/widgets/sliver_tree.dart:783 — packages/flutter/lib/src/widgets/sliver_tree.dart:783-803 | packages/flutter/lib/src/widgets/sliver_tree.dart:812-832 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:448 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:448-468 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:718-738 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter_tools/lib/src/commands/devices.dart:95 — packages/flutter_tools/lib/src/commands/devices.dart:95-116 | packages/flutter_tools/lib/src/runner/target_devices.dart:51-71 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart:896 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart:896-916 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart:930-950 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/examples/api/lib/rendering/box/parent_data.0.dart:323 — packages/flutter/examples/api/lib/rendering/box/parent_data.0.dart:323-343 | packages/flutter/examples/api/lib/rendering/box/parent_data.0.dart:350-374 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) dev/integration_tests/new_gallery/lib/studies/rally/data.dart:232 — dev/integration_tests/new_gallery/lib/studies/rally/data.dart:232-252 | dev/integration_tests/new_gallery/lib/studies/rally/data.dart:280-300 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/examples/api/lib/widgets/framework/state.dispose.0.dart:157 — packages/flutter/examples/api/lib/widgets/framework/state.dispose.0.dart:157-182 | packages/flutter/examples/api/lib/widgets/sensitive_content/sensitive_content.0.dart:161-181 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/examples/api/lib/widgets/implicit_animations/animated_align.0.dart:46 — packages/flutter/examples/api/lib/widgets/implicit_animations/animated_align.0.dart:46-68 | packages/flutter/examples/api/lib/widgets/implicit_animations/animated_container.0.dart:36-56 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) packages/flutter/examples/api/lib/widgets/transitions/listenable_builder.1.dart:44 — packages/flutter/examples/api/lib/widgets/transitions/listenable_builder.1.dart:44-64 | packages/flutter/examples/api/lib/widgets/transitions/listenable_builder.2.dart:54-74 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×22
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/painting/beveled_rectangle_border.dart:105 — packages/flutter/lib/src/painting/beveled_rectangle_border.dart:105-108 | packages/flutter/lib/src/painting/continuous_rectangle_border.dart:110-113 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/material/range_slider_parts.dart:1440 — packages/flutter/lib/src/material/range_slider_parts.dart:1440-1443 | packages/flutter/lib/src/material/slider_parts.dart:1366-1369 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/cupertino/menu_anchor.dart:485 — packages/flutter/lib/src/cupertino/menu_anchor.dart:485-488 | packages/flutter/lib/src/material/menu_anchor.dart:474-477 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:181 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:181-184 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/path.dart:737-740 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:260 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:260-263 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/path.dart:742-745 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:174 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:174-177 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:517-520 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/material/date_picker.dart:3389 — packages/flutter/lib/src/material/date_picker.dart:3389-3392 | packages/flutter/lib/src/material/input_date_picker_form_field.dart:214-217 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/material/input_border.dart:424 — packages/flutter/lib/src/material/input_border.dart:424-427 | packages/flutter/lib/src/painting/stadium_border.dart:252-255 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/material/range_slider_parts.dart:1564 — packages/flutter/lib/src/material/range_slider_parts.dart:1564-1567 | packages/flutter/lib/src/material/slider_parts.dart:887-890 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/painting/beveled_rectangle_border.dart:110 — packages/flutter/lib/src/painting/beveled_rectangle_border.dart:110-113 | packages/flutter/lib/src/painting/continuous_rectangle_border.dart:115-118 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/foundation/assertions.dart:735 — packages/flutter/lib/src/foundation/assertions.dart:735-738 | packages/flutter/lib/src/foundation/diagnostics.dart:3451-3454 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/material/ink_well.dart:1332 — packages/flutter/lib/src/material/ink_well.dart:1332-1335 | packages/flutter/lib/src/widgets/actions.dart:1377-1380 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/rendering/custom_layout.dart:360 — packages/flutter/lib/src/rendering/custom_layout.dart:360-363 | packages/flutter/lib/src/rendering/flow.dart:260-263 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:127 — packages/flutter/lib/src/rendering/proxy_box.dart:127-130 | packages/flutter/lib/src/widgets/layout_builder.dart:462-465 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:235 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:235-243 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart:220-223 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/dart_plugin_registrant.dart:91 — packages/flutter_tools/lib/src/build_system/targets/dart_plugin_registrant.dart:91-94 | packages/flutter_tools/lib/src/build_system/targets/ios.dart:516-519 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) dev/integration_tests/android_views/lib/motion_events_page.dart:206 — dev/integration_tests/android_views/lib/motion_events_page.dart:206-209 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:185-189 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:572 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:572-575 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:734-737 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/grid_list_demo.dart:44 — dev/integration_tests/flutter_gallery/lib/demo/material/grid_list_demo.dart:44-47 | dev/integration_tests/new_gallery/lib/demos/material/grid_list_demo.dart:118-125 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/examples/api/lib/material/color_scheme/color_scheme.0.dart:517 — packages/flutter/examples/api/lib/material/color_scheme/color_scheme.0.dart:517-520 | packages/flutter/examples/api/lib/material/color_scheme/dynamic_content_color.0.dart:501-507 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart:58 — dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart:58-61 | dev/integration_tests/new_gallery/lib/studies/shrine/supplemental/asymmetric_view.dart:112-115 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/flutter/examples/api/lib/widgets/heroes/hero.0.dart:73 — packages/flutter/examples/api/lib/widgets/heroes/hero.0.dart:73-80 | packages/flutter/examples/api/lib/widgets/heroes/hero.1.dart:118-121 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×21
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:5965 — packages/flutter/lib/src/material/input_decorator.dart:5965-5986 | packages/flutter/lib/src/material/input_decorator.dart:5988-6009 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/material/stepper.dart:1174 — packages/flutter/lib/src/material/stepper.dart:1174-1193 | packages/flutter/lib/src/painting/box_decoration.dart:349-372 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/widgets/selectable_region.dart:2945 — packages/flutter/lib/src/widgets/selectable_region.dart:2945-2964 | packages/flutter/lib/src/widgets/text.dart:1391-1415 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:67 — packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:67-86 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:321-340 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/rendering/platform_view.dart:511 — packages/flutter/lib/src/rendering/platform_view.dart:511-530 | packages/flutter/lib/src/rendering/platform_view.dart:583-607 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:1257 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:1257-1276 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:600-620 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:437 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:437-465 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:468-487 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter_tools/lib/src/commands/create.dart:916 — packages/flutter_tools/lib/src/commands/create.dart:916-935 | packages/flutter_tools/lib/src/commands/create.dart:937-956 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/widgets/animated_cross_fade.dart:266 — packages/flutter/lib/src/widgets/animated_cross_fade.dart:266-286 | packages/flutter/lib/src/widgets/animated_size.dart:162-181 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) dev/flutter_analyzer_plugin/lib/src/rules/issue_link_syntax.dart:113 — dev/flutter_analyzer_plugin/lib/src/rules/issue_link_syntax.dart:113-132 | dev/flutter_analyzer_plugin/lib/src/rules/repository_link_syntax.dart:86-105 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/painting/border_radius.dart:795 — packages/flutter/lib/src/painting/border_radius.dart:795-814 | packages/flutter/lib/src/painting/border_radius.dart:924-943 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/rendering/viewport.dart:553 — packages/flutter/lib/src/rendering/viewport.dart:553-572 | packages/flutter/lib/src/widgets/two_dimensional_viewport.dart:709-728 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter_tools/lib/src/base/logger.dart:294 — packages/flutter_tools/lib/src/base/logger.dart:294-313 | packages/flutter_tools/lib/src/base/logger.dart:1107-1130 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter_tools/gradle/src/main/kotlin/FlutterPlugin.kt:491 — packages/flutter_tools/gradle/src/main/kotlin/FlutterPlugin.kt:491-520 | packages/flutter_tools/gradle/src/main/kotlin/FlutterPlugin.kt:531-550 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/lib/src/rendering/viewport.dart:2026 — packages/flutter/lib/src/rendering/viewport.dart:2026-2046 | packages/flutter/lib/src/widgets/framework.dart:5081-5100 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:156 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:156-177 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart:142-161 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) dev/manual_tests/lib/material_arc.dart:129 — dev/manual_tests/lib/material_arc.dart:129-149 | dev/manual_tests/lib/material_arc.dart:289-308 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart:47 — packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart:47-66 | packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart:48-81 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) dev/manual_tests/lib/overlay_geometry.dart:138 — dev/manual_tests/lib/overlay_geometry.dart:138-178 | dev/manual_tests/lib/page_view.dart:24-43 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) dev/manual_tests/lib/actions.dart:304 — dev/manual_tests/lib/actions.dart:304-323 | dev/manual_tests/lib/focus.dart:52-71 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart:115 — dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart:115-134 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_alert_demo.dart:136-157 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×21
  • Edited copy of a member (16 corresponding lines) packages/flutter/lib/src/material/time_picker.dart:913 — packages/flutter/lib/src/material/time_picker.dart:913-928 | packages/flutter/lib/src/material/toggle_buttons.dart:1677-1692 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:355 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:355-370 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:598-613 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/lib/src/material/page_transitions_theme.dart:221 — packages/flutter/lib/src/material/page_transitions_theme.dart:221-237 | packages/flutter/lib/src/material/page_transitions_theme.dart:324-339 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:170 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:170-188 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:480-495 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/lib/src/cupertino/app.dart:467 — packages/flutter/lib/src/cupertino/app.dart:467-482 | packages/flutter/lib/src/material/app.dart:856-876 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/lib/src/material/flexible_space_bar.dart:481 — packages/flutter/lib/src/material/flexible_space_bar.dart:481-501 | packages/flutter/lib/src/rendering/proxy_sliver.dart:173-188 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/lib/src/cupertino/text_field.dart:1426 — packages/flutter/lib/src/cupertino/text_field.dart:1426-1441 | packages/flutter/lib/src/material/text_field.dart:1500-1515 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java:263 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java:263-278 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java:355-371 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:764 — engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:764-779 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:781-797 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter_tools/lib/src/isolated/devfs_web.dart:456 — packages/flutter_tools/lib/src/isolated/devfs_web.dart:456-471 | packages/flutter_tools/lib/src/isolated/devfs_web.dart:481-496 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java:205 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java:205-223 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java:180-195 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java:237 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java:237-253 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java:209-224 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:28 — dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:28-43 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:254-270 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:143 — dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:143-158 | dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:160-178 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:51 — dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:51-71 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:278-293 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/examples/api/lib/material/banner/material_banner.0.dart:23 — packages/flutter/examples/api/lib/material/banner/material_banner.0.dart:23-38 | packages/flutter/examples/api/lib/material/banner/material_banner.1.dart:23-44 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/examples/api/lib/material/autocomplete/autocomplete.0.dart:44 — packages/flutter/examples/api/lib/material/autocomplete/autocomplete.0.dart:44-59 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.1.dart:70-88 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/examples/api/lib/ui/text/font_feature.0.dart:14 — packages/flutter/examples/api/lib/ui/text/font_feature.0.dart:14-32 | packages/flutter_test/lib/src/test_widgets_app.dart:297-312 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) dev/integration_tests/flutter_gallery/lib/gallery/app.dart:83 — dev/integration_tests/flutter_gallery/lib/gallery/app.dart:83-102 | dev/integration_tests/new_gallery/lib/data/gallery_options.dart:229-244 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) packages/flutter/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.0.dart:32 — packages/flutter/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.0.dart:32-47 | packages/flutter/examples/api/lib/rendering/sliver_grid/sliver_grid_delegate_with_fixed_cross_axis_count.1.dart:32-47 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:210 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:210-226 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:224-239 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×20
  • Duplicated block (8 lines × 3) dev/bots/analyze.dart:913 — dev/bots/analyze.dart:913-920 | dev/bots/analyze.dart:921-928 | dev/bots/analyze.dart:929-936 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1808 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1808-1815 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1865-1872 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1936-1943 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1808` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/cupertino/search_field.dart:402 — packages/flutter/lib/src/cupertino/search_field.dart:402-409 | packages/flutter/lib/src/cupertino/text_field.dart:1135-1142 | packages/flutter/lib/src/material/text_field.dart:1303-1310 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Note first that the copies are not typed on the same thing: the declarations holding them bind `oldWidget` to `CupertinoSearchTextField` in one and `CupertinoTextField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/gestures/events.dart:1468 — packages/flutter/lib/src/gestures/events.dart:1468-1475 | packages/flutter/lib/src/gestures/events.dart:1694-1701 | packages/flutter/lib/src/gestures/events.dart:2483-2490 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/rendering/shifted_box.dart:741 — packages/flutter/lib/src/rendering/shifted_box.dart:741-748 | packages/flutter/lib/src/rendering/shifted_box.dart:1095-1102 | packages/flutter/lib/src/rendering/shifted_box.dart:1272-1279 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/shifted_box.dart:741` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/rendering/shifted_box.dart:740` calls `_getInnerConstraints` and `packages/flutter/lib/src/rendering/shifted_box.dart:1094` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/widgets/_window_macos.dart:396 — packages/flutter/lib/src/widgets/_window_macos.dart:396-403 | packages/flutter/lib/src/widgets/_window_macos.dart:493-500 | packages/flutter/lib/src/widgets/_window_macos.dart:634-641 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_window_macos.dart:396` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 3) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:475 — packages/flutter_tools/lib/src/isolated/web_asset_server.dart:475-482 | packages/flutter_tools/lib/src/isolated/web_asset_server.dart:487-494 | packages/flutter_tools/lib/src/isolated/web_asset_server.dart:500-507 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/isolated/web_asset_server.dart:475` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/material/choice_chip.dart:298 — packages/flutter/lib/src/material/choice_chip.dart:298-305 | packages/flutter/lib/src/material/filter_chip.dart:331-338 | packages/flutter/lib/src/material/input_chip.dart:289-296 — before extracting anything, compare `packages/flutter/lib/src/material/choice_chip.dart` and `packages/flutter/lib/src/material/filter_chip.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/material/elevated_button.dart:538 — packages/flutter/lib/src/material/elevated_button.dart:538-545 | packages/flutter/lib/src/material/outlined_button.dart:480-487 | packages/flutter/lib/src/material/text_button.dart:513-520 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/rendering/custom_layout.dart:369 — packages/flutter/lib/src/rendering/custom_layout.dart:369-376 | packages/flutter/lib/src/rendering/flow.dart:272-279 | packages/flutter/lib/src/rendering/shifted_box.dart:1432-1439 — before extracting anything, compare `packages/flutter/lib/src/rendering/custom_layout.dart` and `packages/flutter/lib/src/rendering/flow.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/rendering/custom_layout.dart:361` calls `debugAssertIsValid` and `packages/flutter/lib/src/rendering/shifted_box.dart:1424` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/rendering/custom_layout.dart:378 — packages/flutter/lib/src/rendering/custom_layout.dart:378-385 | packages/flutter/lib/src/rendering/flow.dart:281-288 | packages/flutter/lib/src/rendering/shifted_box.dart:1441-1448 — before extracting anything, compare `packages/flutter/lib/src/rendering/custom_layout.dart` and `packages/flutter/lib/src/rendering/flow.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/rendering/custom_layout.dart:387 — packages/flutter/lib/src/rendering/custom_layout.dart:387-394 | packages/flutter/lib/src/rendering/flow.dart:290-297 | packages/flutter/lib/src/rendering/shifted_box.dart:1450-1457 — before extracting anything, compare `packages/flutter/lib/src/rendering/custom_layout.dart` and `packages/flutter/lib/src/rendering/flow.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/rendering/custom_layout.dart:396 — packages/flutter/lib/src/rendering/custom_layout.dart:396-403 | packages/flutter/lib/src/rendering/flow.dart:299-306 | packages/flutter/lib/src/rendering/shifted_box.dart:1459-1466 — before extracting anything, compare `packages/flutter/lib/src/rendering/custom_layout.dart` and `packages/flutter/lib/src/rendering/flow.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/flutter_driver/lib/src/driver/gpu_sumarizer.dart:54 — packages/flutter_driver/lib/src/driver/gpu_sumarizer.dart:54-61 | packages/flutter_driver/lib/src/driver/memory_summarizer.dart:54-61 | packages/flutter_driver/lib/src/driver/raster_cache_summarizer.dart:105-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) packages/flutter/lib/src/cupertino/desktop_text_selection.dart:145 — packages/flutter/lib/src/cupertino/desktop_text_selection.dart:145-152 | packages/flutter/lib/src/cupertino/text_selection.dart:236-243 | packages/flutter/lib/src/material/desktop_text_selection.dart:160-167 — before extracting anything, compare `packages/flutter/lib/src/cupertino/desktop_text_selection.dart` and `packages/flutter/lib/src/cupertino/text_selection.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:217 — packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:217-224 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:199-206 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:233-240 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart` and `packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) dev/manual_tests/lib/density.dart:138 — dev/manual_tests/lib/density.dart:138-145 | dev/manual_tests/lib/star_border.dart:241-248 | packages/flutter/examples/api/lib/painting/star_border/star_border.0.dart:166-173 — before extracting anything, compare `dev/manual_tests/lib/star_border.dart` and `packages/flutter/examples/api/lib/painting/star_border/star_border.0.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:87 — examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:87-94 | examples/multiple_windows/lib/app/satellite_window_edit_dialog.dart:79-86 | examples/multiple_windows/lib/app/window_edit_dialog.dart:104-111 — before extracting anything, compare `examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart` and `examples/multiple_windows/lib/app/window_edit_dialog.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:73 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:73-80 | packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart:76-83 | packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart:75-82 — before extracting anything, compare `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart` and `packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:61 — examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:61-68 | examples/multiple_windows/lib/app/satellite_window_edit_dialog.dart:58-65 | examples/multiple_windows/lib/app/window_edit_dialog.dart:66-73 — before extracting anything, compare `examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart` and `examples/multiple_windows/lib/app/window_edit_dialog.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×19
  • Edited copy of a member (19 corresponding lines) packages/flutter/lib/src/material/bottom_sheet_theme.dart:212 — packages/flutter/lib/src/material/bottom_sheet_theme.dart:212-230 | packages/flutter/lib/src/material/progress_indicator_theme.dart:277-310 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:123 — engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:123-144 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:306-324 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) dev/tools/gen_keycodes/lib/gtk_code_gen.dart:111 — dev/tools/gen_keycodes/lib/gtk_code_gen.dart:111-129 | dev/tools/gen_keycodes/lib/macos_code_gen.dart:114-132 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter/lib/src/material/dropdown_menu.dart:1053 — packages/flutter/lib/src/material/dropdown_menu.dart:1053-1071 | packages/flutter/lib/src/material/dropdown_menu.dart:1073-1091 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:588 — packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:588-606 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:627-645 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter_tools/lib/src/base/terminal.dart:267 — packages/flutter_tools/lib/src/base/terminal.dart:267-285 | packages/flutter_tools/lib/src/base/terminal.dart:287-306 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:1683 — packages/flutter/lib/src/material/input_decorator.dart:1683-1701 | packages/flutter/lib/src/widgets/two_dimensional_viewport.dart:975-996 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:173 — packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:173-191 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:222-240 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter/lib/src/material/checkbox_theme.dart:169 — packages/flutter/lib/src/material/checkbox_theme.dart:169-187 | packages/flutter/lib/src/material/radio_theme.dart:195-213 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) dev/snippets/lib/src/data_types.dart:32 — dev/snippets/lib/src/data_types.dart:32-50 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:1007-1027 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter_tools/lib/src/localizations/gen_l10n.dart:838 — packages/flutter_tools/lib/src/localizations/gen_l10n.dart:838-856 | packages/flutter_tools/lib/src/localizations/gen_l10n.dart:939-960 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:37 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:37-55 | packages/flutter_tools/lib/src/commands/build_swift_package.dart:64-82 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java:147 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java:147-165 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java:174-192 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) dev/integration_tests/flutter_gallery/lib/gallery/demo.dart:77 — dev/integration_tests/flutter_gallery/lib/gallery/demo.dart:77-99 | dev/integration_tests/new_gallery/lib/pages/demo.dart:149-167 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) dev/integration_tests/flutter_gallery/lib/gallery/options.dart:34 — dev/integration_tests/flutter_gallery/lib/gallery/options.dart:34-58 | dev/integration_tests/new_gallery/lib/data/gallery_options.dart:104-122 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart:49 — packages/flutter/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart:49-67 | packages/flutter/examples/api/lib/services/keyboard_key/physical_keyboard_key.0.dart:49-68 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) dev/integration_tests/channels/android/app/src/main/java/com/example/channels/MainActivity.java:113 — dev/integration_tests/channels/android/app/src/main/java/com/example/channels/MainActivity.java:113-131 | dev/integration_tests/channels/android/app/src/main/java/com/example/channels/MainActivity.java:133-151 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter/examples/api/lib/material/input_decorator/input_decoration.helper.0.dart:28 — packages/flutter/examples/api/lib/material/input_decorator/input_decoration.helper.0.dart:28-50 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.label.0.dart:28-46 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.0.dart:19 — packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.0.dart:19-37 | packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.1.dart:25-44 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×19
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/doctor.dart:750 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/version.dart:1468 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/widget_preview/persistent_preferences.dart:61 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/widget_preview/preview_detector.dart:49 — `on Object catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/ios/simulators.dart:467 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/ios/simulators.dart:477 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/android/android_sdk.dart:333 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/android/android_sdk.dart:416 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/android/android_sdk.dart:477 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/android/android_sdk.dart:512 — `on Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/android/android_workflow.dart:98 — `on Exception catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter_tools/lib/src/android/android_workflow.dart:100 — `on Error catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter/lib/src/services/process_text.dart:126 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/flutter/lib/src/material/popup_menu.dart:1625 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) engine/src/flutter/tools/engine_tool/lib/src/logger.dart:81 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java:502 — `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart:2460 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) dev/bots/luci_resultdb.dart:32 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) dev/bots/utils.dart:115 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×18
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/material/menu_theme.dart:81 — packages/flutter/lib/src/material/menu_theme.dart:81-92 | packages/flutter/lib/src/material/menu_anchor.dart:898-903 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/painting/stadium_border.dart:85 — packages/flutter/lib/src/painting/stadium_border.dart:85-91 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:99-104 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/ios.dart:763 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:763-769 | packages/flutter_tools/lib/src/build_system/targets/android.dart:112-117 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) dev/integration_tests/android_hardware_smoke_test/lib/pixel_exact_local_file_comparator.dart:93 — dev/integration_tests/android_hardware_smoke_test/lib/pixel_exact_local_file_comparator.dart:93-98 | dev/tools/android_driver_extensions/lib/src/goldens.dart:132-137 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter_tools/lib/src/isolated/devfs_web.dart:473 — packages/flutter_tools/lib/src/isolated/devfs_web.dart:473-479 | packages/flutter_tools/lib/src/isolated/web_asset_server.dart:657-662 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/material/action_chip.dart:322 — packages/flutter/lib/src/material/action_chip.dart:322-327 | packages/flutter/lib/src/material/input_chip.dart:333-338 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:1202 — packages/flutter/lib/src/material/range_slider.dart:1202-1209 | packages/flutter/lib/src/material/slider.dart:1485-1490 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/services/text_input.dart:3422 — packages/flutter/lib/src/services/text_input.dart:3422-3428 | packages/flutter/lib/src/widgets/system_context_menu.dart:542-547 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) dev/tools/gen_keycodes/lib/ios_code_gen.dart:48 — dev/tools/gen_keycodes/lib/ios_code_gen.dart:48-53 | dev/tools/gen_keycodes/lib/keyboard_maps_code_gen.dart:52-57 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) engine/src/flutter/sky/tools/create_ios_framework.py:231 — engine/src/flutter/sky/tools/create_ios_framework.py:231-236 | engine/src/flutter/sky/tools/sky_utils.py:210-215 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:2047 — packages/flutter/lib/src/material/range_slider.dart:2047-2053 | packages/flutter/lib/src/material/slider.dart:2075-2080 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/cupertino/app.dart:528 — packages/flutter/lib/src/cupertino/app.dart:528-533 | packages/flutter/lib/src/material/app.dart:935-941 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/lib/src/material/material_localizations.dart:1018 — packages/flutter/lib/src/material/material_localizations.dart:1018-1023 | packages/flutter_localizations/lib/src/material_localizations.dart:231-236 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:152 — dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:152-159 | dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:140-145 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java:73 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java:73-79 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java:135-140 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) dev/integration_tests/new_gallery/lib/studies/crane/fly_form.dart:28 — dev/integration_tests/new_gallery/lib/studies/crane/fly_form.dart:28-34 | dev/integration_tests/new_gallery/lib/studies/crane/sleep_form.dart:27-32 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/list_demo.dart:59 — dev/integration_tests/flutter_gallery/lib/demo/material/list_demo.dart:59-64 | dev/integration_tests/flutter_gallery/lib/demo/material/reorderable_list_demo.dart:61-71 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) packages/flutter/examples/api/lib/material/menu_anchor/menu_bar.0.dart:260 — packages/flutter/examples/api/lib/material/menu_anchor/menu_bar.0.dart:260-267 | packages/flutter/examples/api/lib/material/menu_anchor/radio_menu_button.0.dart:120-125 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×18
  • Duplicated block (21 lines × 2) engine/src/flutter/lib/ui/painting.dart:3982 — engine/src/flutter/lib/ui/painting.dart:3982-4002 | engine/src/flutter/lib/web_ui/lib/painting.dart:569-589 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/painting.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) engine/src/flutter/lib/ui/painting.dart:4010 — engine/src/flutter/lib/ui/painting.dart:4010-4030 | engine/src/flutter/lib/web_ui/lib/painting.dart:597-617 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/painting.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:98 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:98-118 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:198-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:96 — engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:96-116 | engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:170-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:697 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:697-717 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:803-823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) packages/flutter/lib/src/material/input_decorator.dart:6038 — packages/flutter/lib/src/material/input_decorator.dart:6038-6058 | packages/flutter/lib/src/material/input_decorator.dart:6062-6082 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/input_decorator.dart:6038` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) packages/flutter/lib/src/rendering/sliver_persistent_header.dart:311 — packages/flutter/lib/src/rendering/sliver_persistent_header.dart:311-331 | packages/flutter/lib/src/widgets/sliver_floating_header.dart:330-350 — before extracting anything, compare `packages/flutter/lib/src/rendering/sliver_persistent_header.dart` and `packages/flutter/lib/src/widgets/sliver_floating_header.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:344 — packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:344-364 | packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:427-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) packages/flutter/lib/src/widgets/page_view.dart:301 — packages/flutter/lib/src/widgets/page_view.dart:301-321 | packages/flutter/lib/src/widgets/page_view.dart:523-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) packages/flutter_tools/lib/src/build_system/targets/ios.dart:316 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:316-336 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:144-164 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/ios.dart` and `packages/flutter_tools/lib/src/build_system/targets/macos.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/ios.dart:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1527 — packages/flutter/lib/src/cupertino/date_picker.dart:1527-1547 | packages/flutter/lib/src/cupertino/date_picker.dart:1895-1915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1527` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:251 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:251-271 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1093-1113 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java` and `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1092` calls `remove` and `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:250` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21 lines × 2) dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart:71 — dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart:71-91 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:103-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:85 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:85-105 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:87-107 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart` and `dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:178 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:178-198 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:192-212 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart` and `dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) examples/platform_channel/lib/main.dart:59 — examples/platform_channel/lib/main.dart:59-79 | examples/platform_channel_swift/lib/main.dart:55-75 — before extracting anything, compare `examples/platform_channel/lib/main.dart` and `examples/platform_channel_swift/lib/main.dart` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:142 — packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:142-162 | packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:186-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:142` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (21 lines × 2) packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:94 — packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:94-114 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:126-146 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart` and `packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×18
  • Duplicated block (20 lines × 2) dev/tools/gen_defaults/lib/chip_template.dart:19 — dev/tools/gen_defaults/lib/chip_template.dart:19-38 | dev/tools/gen_defaults/lib/input_chip_template.dart:19-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/chip_template.dart:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `dev/tools/gen_defaults/lib/input_chip_template.dart:41` calls `color` and `dev/tools/gen_defaults/lib/chip_template.dart:39` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (20 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1495 — engine/src/flutter/lib/ui/geometry.dart:1495-1514 | engine/src/flutter/lib/web_ui/lib/geometry.dart:732-751 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/geometry.dart:1495` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) engine/src/flutter/lib/ui/text.dart:1404 — engine/src/flutter/lib/ui/text.dart:1404-1423 | engine/src/flutter/lib/web_ui/lib/text.dart:259-278 — before extracting anything, compare `engine/src/flutter/lib/ui/text.dart` and `engine/src/flutter/lib/web_ui/lib/text.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:802 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:802-821 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:826-845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:802` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/material/checkbox_theme.dart:207 — packages/flutter/lib/src/material/checkbox_theme.dart:207-226 | packages/flutter/lib/src/material/radio_theme.dart:227-246 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox_theme.dart` and `packages/flutter/lib/src/material/radio_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox_theme.dart:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/material/navigation_rail.dart:842 — packages/flutter/lib/src/material/navigation_rail.dart:842-861 | packages/flutter/lib/src/material/navigation_rail.dart:901-920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/navigation_rail.dart:842` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1983 — packages/flutter/lib/src/rendering/editable.dart:1983-2002 | packages/flutter/lib/src/rendering/paragraph.dart:868-887 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/editable.dart:1983` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:1712 — packages/flutter/lib/src/rendering/paragraph.dart:1712-1731 | packages/flutter/lib/src/rendering/paragraph.dart:1811-1830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:1712` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/widgets/editable_text.dart:7014 — packages/flutter/lib/src/widgets/editable_text.dart:7014-7033 | packages/flutter/lib/src/widgets/text.dart:1466-1485 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/widgets/indexed_stack.dart:478 — packages/flutter/lib/src/widgets/indexed_stack.dart:478-497 | packages/flutter/lib/src/widgets/indexed_stack.dart:733-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) packages/flutter/lib/src/widgets/text_selection.dart:878 — packages/flutter/lib/src/widgets/text_selection.dart:878-897 | packages/flutter/lib/src/widgets/text_selection.dart:1013-1032 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/text_selection.dart:878` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) dev/integration_tests/android_views/lib/motion_events_page.dart:155 — dev/integration_tests/android_views/lib/motion_events_page.dart:155-174 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:134-153 — before extracting anything, compare `dev/integration_tests/android_views/lib/motion_events_page.dart` and `dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_views/lib/motion_events_page.dart:155` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:124 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:124-143 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:144-163 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart` and `dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) packages/flutter/examples/api/lib/cupertino/list_section/list_section_base.0.dart:55 — packages/flutter/examples/api/lib/cupertino/list_section/list_section_base.0.dart:55-74 | packages/flutter/examples/api/lib/cupertino/list_section/list_section_inset.0.dart:55-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/cupertino/list_section/list_section_base.0.dart:55` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart:40 — packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart:40-59 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.1.dart:40-59 — before extracting anything, compare `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart` and `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.1.dart` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:100 — packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:100-119 | packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:130-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:100` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) packages/flutter/examples/api/lib/material/ink/ink.image_clip.0.dart:35 — packages/flutter/examples/api/lib/material/ink/ink.image_clip.0.dart:35-54 | packages/flutter/examples/api/lib/material/ink/ink.image_clip.1.dart:36-55 — before extracting anything, compare `packages/flutter/examples/api/lib/material/ink/ink.image_clip.0.dart` and `packages/flutter/examples/api/lib/material/ink/ink.image_clip.1.dart` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) dev/integration_tests/android_views/lib/motion_events_page.dart:299 — dev/integration_tests/android_views/lib/motion_events_page.dart:299-318 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:268-287 — before extracting anything, compare `dev/integration_tests/android_views/lib/motion_events_page.dart` and `dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_views/lib/motion_events_page.dart:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×17
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:1213 — packages/flutter/lib/src/material/input_decorator.dart:1213-1229 | packages/flutter/lib/src/material/input_decorator.dart:1231-1247 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:721 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:721-737 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:972-990 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:411 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:411-434 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:1130-1146 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/cupertino/search_field.dart:400 — packages/flutter/lib/src/cupertino/search_field.dart:400-416 | packages/flutter/lib/src/cupertino/text_field.dart:1133-1149 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:914 — packages/flutter/lib/src/rendering/proxy_box.dart:914-930 | packages/flutter/lib/src/rendering/proxy_sliver.dart:140-156 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/widgets/actions.dart:1737 — packages/flutter/lib/src/widgets/actions.dart:1737-1755 | packages/flutter/lib/src/widgets/actions.dart:1757-1773 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/widgets/restoration_properties.dart:576 — packages/flutter/lib/src/widgets/restoration_properties.dart:576-595 | packages/flutter/lib/src/widgets/restoration_properties.dart:668-684 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/cupertino/theme.dart:379 — packages/flutter/lib/src/cupertino/theme.dart:379-396 | packages/flutter/lib/src/cupertino/theme.dart:581-597 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/widgets/overlay.dart:1434 — packages/flutter/lib/src/widgets/overlay.dart:1434-1450 | packages/flutter/lib/src/widgets/overlay.dart:1452-1469 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/widgets/editable_text.dart:6556 — packages/flutter/lib/src/widgets/editable_text.dart:6556-6572 | packages/flutter/lib/src/widgets/editable_text.dart:6574-6590 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/material/slider_value_indicator_shape.dart:317 — packages/flutter/lib/src/material/slider_value_indicator_shape.dart:317-334 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:589-605 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/cupertino/route.dart:166 — packages/flutter/lib/src/cupertino/route.dart:166-182 | packages/flutter/lib/src/material/page.dart:161-179 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/lib/src/cupertino/picker.dart:268 — packages/flutter/lib/src/cupertino/picker.dart:268-287 | packages/flutter/lib/src/cupertino/slider.dart:259-275 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvas.dart:350 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvas.dart:350-366 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/canvas.dart:365-381 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/examples/api/lib/rendering/box/parent_data.0.dart:275 — packages/flutter/examples/api/lib/rendering/box/parent_data.0.dart:275-291 | packages/flutter/examples/api/lib/rendering/box/parent_data.0.dart:293-309 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) packages/flutter/examples/api/lib/widgets/keep_alive/automatic_keep_alive.0.dart:19 — packages/flutter/examples/api/lib/widgets/keep_alive/automatic_keep_alive.0.dart:19-35 | packages/flutter/examples/api/lib/widgets/keep_alive/keep_alive.0.dart:19-38 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) examples/flutter_view/lib/main.dart:22 — examples/flutter_view/lib/main.dart:22-43 | packages/flutter/examples/api/lib/widgets/app/widgets_app.widgets_app.0.dart:14-30 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×17
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/painting/box_border.dart:552 — packages/flutter/lib/src/painting/box_border.dart:552-556 | packages/flutter/lib/src/painting/box_border.dart:901-905 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/material/range_slider_parts.dart:725 — packages/flutter/lib/src/material/range_slider_parts.dart:725-729 | packages/flutter/lib/src/material/slider_parts.dart:585-592 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/material/date_picker.dart:2474 — packages/flutter/lib/src/material/date_picker.dart:2474-2478 | packages/flutter/lib/src/rendering/sliver_grid.dart:226-233 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/cupertino/switch.dart:651 — packages/flutter/lib/src/cupertino/switch.dart:651-656 | packages/flutter/lib/src/material/switch.dart:899-903 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:2368 — packages/flutter/lib/src/rendering/proxy_box.dart:2368-2372 | packages/flutter/lib/src/widgets/basic.dart:1362-1368 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:211 — packages/flutter/lib/src/rendering/proxy_box.dart:211-215 | packages/flutter/lib/src/widgets/basic.dart:7850-7855 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:733 — engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:733-739 | packages/flutter/lib/src/foundation/debug.dart:1714-1718 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/rendering/layer.dart:2021 — packages/flutter/lib/src/rendering/layer.dart:2021-2025 | packages/flutter/lib/src/widgets/text.dart:360-370 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/painting/box_decoration.dart:393 — packages/flutter/lib/src/painting/box_decoration.dart:393-397 | packages/flutter/lib/src/painting/shape_decoration.dart:300-304 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/widgets/basic.dart:2650 — packages/flutter/lib/src/widgets/basic.dart:2650-2654 | packages/flutter/lib/src/widgets/heroes.dart:348-352 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) dev/devicelab/lib/framework/apk_utils.dart:303 — dev/devicelab/lib/framework/apk_utils.dart:303-307 | dev/devicelab/lib/tasks/plugin_tests.dart:237-241 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/cupertino/route.dart:1020 — packages/flutter/lib/src/cupertino/route.dart:1020-1024 | packages/flutter/lib/src/widgets/platform_menu_bar.dart:701-705 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:481 — packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:481-487 | packages/flutter/lib/src/widgets/scroll_notification.dart:358-362 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:825 — packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:825-829 | packages/flutter/lib/src/widgets/scroll_notification.dart:39-43 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/flutter/lib/src/widgets/layout_builder.dart:170 — packages/flutter/lib/src/widgets/layout_builder.dart:170-174 | packages/flutter/lib/src/widgets/sliver_persistent_header.dart:262-266 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/model/app_state_model.dart:31 — dev/integration_tests/flutter_gallery/lib/demo/shrine/model/app_state_model.dart:31-35 | dev/integration_tests/new_gallery/lib/studies/shrine/model/app_state_model.dart:31-35 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) examples/flutter_view/android/app/src/main/java/com/example/view/MainActivity.java:97 — examples/flutter_view/android/app/src/main/java/com/example/view/MainActivity.java:97-102 | examples/platform_view/android/app/src/main/java/io/flutter/examples/platform_view/CountActivity.java:50-54 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×16
  • Edited copy of a member (23 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:580 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:580-602 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:630-653 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) engine/src/flutter/sky/tools/create_embedder_framework.py:90 — engine/src/flutter/sky/tools/create_embedder_framework.py:90-112 | engine/src/flutter/sky/tools/sky_utils.py:156-188 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:531 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:531-560 | packages/flutter/lib/src/painting/stadium_border.dart:222-244 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter_tools/lib/src/cache.dart:1049 — packages/flutter_tools/lib/src/cache.dart:1049-1073 | packages/flutter_tools/lib/src/flutter_cache.dart:569-591 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:799 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:799-821 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:823-845 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) engine/src/flutter/lib/ui/painting.dart:8129 — engine/src/flutter/lib/ui/painting.dart:8129-8151 | engine/src/flutter/lib/ui/painting.dart:8185-8207 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/lib/src/cupertino/nav_bar.dart:2029 — packages/flutter/lib/src/cupertino/nav_bar.dart:2029-2051 | packages/flutter/lib/src/cupertino/nav_bar.dart:2056-2079 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/lib/src/rendering/editable.dart:1979 — packages/flutter/lib/src/rendering/editable.dart:1979-2002 | packages/flutter/lib/src/rendering/paragraph.dart:865-887 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:143 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:143-165 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:167-189 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/canvas.dart:252 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/canvas.dart:252-274 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/canvas.dart:276-298 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:2879 — packages/flutter/lib/src/rendering/proxy_box.dart:2879-2902 | packages/flutter/lib/src/rendering/proxy_box.dart:2911-2933 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) dev/integration_tests/android_views/lib/motion_events_page.dart:182 — dev/integration_tests/android_views/lib/motion_events_page.dart:182-204 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:161-183 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.dart:28 — packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.dart:28-53 | packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.2.dart:28-50 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/examples/api/lib/material/radio/radio.toggleable.0.dart:42 — packages/flutter/examples/api/lib/material/radio/radio.toggleable.0.dart:42-71 | packages/flutter/examples/api/lib/material/radio_list_tile/radio_list_tile.toggleable.0.dart:42-64 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) dev/integration_tests/new_gallery/lib/pages/category_list_item.dart:103 — dev/integration_tests/new_gallery/lib/pages/category_list_item.dart:103-125 | dev/integration_tests/new_gallery/lib/pages/settings_list_item.dart:160-182 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) packages/flutter/examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart:130 — packages/flutter/examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart:130-158 | packages/flutter/examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart:164-186 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×15
  • Edited copy of a member (22 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:96 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:96-121 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:196-221 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) engine/src/flutter/lib/ui/platform_dispatcher.dart:2665 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2665-2686 | engine/src/flutter/lib/web_ui/lib/src/engine/window.dart:909-930 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/lib/src/widgets/scroll_delegate.dart:545 — packages/flutter/lib/src/widgets/scroll_delegate.dart:545-574 | packages/flutter/lib/src/widgets/scroll_delegate.dart:768-789 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/lib/src/material/segmented_button.dart:950 — packages/flutter/lib/src/material/segmented_button.dart:950-971 | packages/flutter/lib/src/material/segmented_button.dart:973-1005 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/lib/src/services/raw_keyboard_linux.dart:334 — packages/flutter/lib/src/services/raw_keyboard_linux.dart:334-355 | packages/flutter/lib/src/services/raw_keyboard_linux.dart:465-486 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:779 — packages/flutter_tools/lib/src/base/error_handling_io.dart:779-805 | packages/flutter_tools/lib/src/base/error_handling_io.dart:807-828 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/lib/src/services/platform_views.dart:1075 — packages/flutter/lib/src/services/platform_views.dart:1075-1100 | packages/flutter/lib/src/services/platform_views.dart:1285-1306 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/lib/src/material/tabs.dart:1917 — packages/flutter/lib/src/material/tabs.dart:1917-1938 | packages/flutter/lib/src/material/tabs.dart:2496-2517 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/lib/src/material/menu_style.dart:225 — packages/flutter/lib/src/material/menu_style.dart:225-247 | packages/flutter/lib/src/material/search_bar_theme.dart:193-214 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/dialog_demo.dart:79 — dev/integration_tests/new_gallery/lib/demos/material/dialog_demo.dart:79-100 | dev/integration_tests/new_gallery/lib/demos/material/dialog_demo.dart:102-124 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_alert_demo.dart:101 — dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_alert_demo.dart:101-125 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_alert_demo.dart:127-148 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/examples/api/lib/material/checkbox/checkbox.0.dart:35 — packages/flutter/examples/api/lib/material/checkbox/checkbox.0.dart:35-59 | packages/flutter/examples/api/lib/material/material_state/material_state_property.0.dart:28-49 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:263 — dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:263-288 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:225-246 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) dev/manual_tests/lib/star_border.dart:453 — dev/manual_tests/lib/star_border.dart:453-474 | packages/flutter/examples/api/lib/painting/star_border/star_border.0.dart:413-434 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) packages/flutter/examples/api/lib/material/checkbox_list_tile/custom_labeled_checkbox.1.dart:34 — packages/flutter/examples/api/lib/material/checkbox_list_tile/custom_labeled_checkbox.1.dart:34-55 | packages/flutter/examples/api/lib/material/switch_list_tile/custom_labeled_switch.1.dart:39-60 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×15
  • Duplicated block (19 lines × 2) dev/tools/gen_defaults/lib/range_slider_template.dart:20 — dev/tools/gen_defaults/lib/range_slider_template.dart:20-38 | dev/tools/gen_defaults/lib/slider_template.dart:20-38 — before extracting anything, compare `dev/tools/gen_defaults/lib/range_slider_template.dart` and `dev/tools/gen_defaults/lib/slider_template.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/range_slider_template.dart:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:671 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:671-689 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:776-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1497 — packages/flutter/lib/src/cupertino/date_picker.dart:1497-1515 | packages/flutter/lib/src/cupertino/date_picker.dart:1865-1883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1497` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) packages/flutter/lib/src/material/checkbox.dart:577 — packages/flutter/lib/src/material/checkbox.dart:577-595 | packages/flutter/lib/src/material/radio.dart:703-721 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) packages/flutter/lib/src/material/slider_parts.dart:325 — packages/flutter/lib/src/material/slider_parts.dart:325-343 | packages/flutter/lib/src/material/slider_parts.dart:459-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/slider_parts.dart:325` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) packages/flutter/lib/src/material/slider_parts.dart:428 — packages/flutter/lib/src/material/slider_parts.dart:428-446 | packages/flutter/lib/src/material/slider_parts.dart:1063-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/slider_parts.dart:428` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:536 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:536-554 | packages/flutter/lib/src/painting/stadium_border.dart:224-242 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (19 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1344 — packages/flutter/lib/src/rendering/editable.dart:1344-1362 | packages/flutter/lib/src/rendering/paragraph.dart:1254-1272 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) packages/flutter_tools/lib/src/commands/create.dart:973 — packages/flutter_tools/lib/src/commands/create.dart:973-991 | packages/flutter_tools/lib/src/commands/create.dart:1082-1100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:277 — packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:277-295 | packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:318-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:277` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) packages/flutter/examples/api/lib/material/menu_anchor/menu_accelerator_label.0.dart:37 — packages/flutter/examples/api/lib/material/menu_anchor/menu_accelerator_label.0.dart:37-55 | packages/flutter/examples/api/lib/material/menu_anchor/menu_accelerator_label.0.dart:58-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/menu_anchor/menu_accelerator_label.0.dart:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/examples/api/lib/material/menu_anchor/menu_accelerator_label.0.dart:56` calls `SubmenuButton` and `packages/flutter/examples/api/lib/material/menu_anchor/menu_accelerator_label.0.dart:36` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.0.dart:80 — packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.0.dart:80-98 | packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.1.dart:88-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (19 lines × 2) packages/flutter/examples/api/lib/services/binding/handle_request_app_exit.0.dart:79 — packages/flutter/examples/api/lib/services/binding/handle_request_app_exit.0.dart:79-97 | packages/flutter/examples/api/lib/widgets/app_lifecycle_listener/app_lifecycle_listener.1.dart:76-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/services/binding/handle_request_app_exit.0.dart:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) engine/src/flutter/examples/glfw/main.dart:29 — engine/src/flutter/examples/glfw/main.dart:29-47 | engine/src/flutter/examples/glfw_drm/main.dart:18-36 — `engine/src/flutter/examples/glfw/main.dart` and `engine/src/flutter/examples/glfw_drm/main.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 19 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/SimplePlatformView.java:52 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/SimplePlatformView.java:52-70 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/SimplePlatformView.java:53-71 — before extracting anything, compare `dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/SimplePlatformView.java` and `dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/SimplePlatformView.java` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X3 · Exception handling · Swallowed exception (empty catch) · ×15
  • Swallowed exception (empty catch) packages/flutter_tools/lib/src/widget_preview/persistent_preferences.dart:78 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter_tools/lib/src/web/chrome.dart:763 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `close()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) packages/flutter_tools/lib/src/proxied_devices/devices.dart:685 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter_tools/lib/src/ios/core_devices.dart:157 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter_tools/lib/src/build_system/targets/ios.dart:426 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter_tools/lib/src/build_system/targets/ios.dart:444 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter_goldens/lib/skia_client.dart:456 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter/lib/src/widgets/framework.dart:4711 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/flutter/lib/src/widgets/framework.dart:5892 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/flutter/tools/fuchsia/merge_and_upload_debug_symbols.py:171 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:60 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:108 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js:79 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) engine/src/flutter/lib/web_ui/flutter_js/src/loader.js:30 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) engine/src/build/linux/sysroot_scripts/install-sysroot.py:139 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×14
  • Members sharing a duplicated core (4 members, 50+ identical tokens) engine/src/flutter/lib/web_ui/dev/package_roller.dart:205 — engine/src/flutter/lib/web_ui/dev/package_roller.dart:205-248 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:252-296 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:300-343 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:345-399 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:181 — packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:181-198 | packages/flutter/lib/src/material/dropdown_menu.dart:1678-1696 | packages/flutter/lib/src/material/list_tile.dart:1745-1762 | packages/flutter/lib/src/rendering/table.dart:1445-1466 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/gestures/drag_details.dart:88 — packages/flutter/lib/src/gestures/drag_details.dart:88-95 | packages/flutter/lib/src/gestures/drag_details.dart:175-183 | packages/flutter/lib/src/gestures/tap_and_drag.dart:220-228 | packages/flutter/lib/src/gestures/tap_and_drag.dart:331-343 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/button.dart:508 — packages/flutter/lib/src/material/button.dart:508-516 | packages/flutter/lib/src/material/button_style_button.dart:696-704 | packages/flutter/lib/src/material/time_picker.dart:898-906 | packages/flutter/lib/src/material/toggle_buttons.dart:1662-1670 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/button.dart:538 — packages/flutter/lib/src/material/button.dart:538-545 | packages/flutter/lib/src/material/button_style_button.dart:726-733 | packages/flutter/lib/src/material/time_picker.dart:930-937 | packages/flutter/lib/src/material/toggle_buttons.dart:1694-1701 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/carousel.dart:1292 — packages/flutter/lib/src/material/carousel.dart:1292-1474 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:337-529 | packages/flutter/lib/src/rendering/sliver_grid.dart:592-727 | packages/flutter/lib/src/rendering/sliver_list.dart:45-340 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/checkbox_theme.dart:232 — packages/flutter/lib/src/material/checkbox_theme.dart:232-246 | packages/flutter/lib/src/material/chip_theme.dart:564-578 | packages/flutter/lib/src/material/radio_theme.dart:136-150 | packages/flutter/lib/src/material/search_view_theme.dart:227-241 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/date_picker_theme.dart:791 — packages/flutter/lib/src/material/date_picker_theme.dart:791-979 | packages/flutter/lib/src/material/dialog_theme.dart:285-311 | packages/flutter/lib/src/material/dialog_theme.dart:504-533 | packages/flutter/lib/src/material/drawer_theme.dart:160-172 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/elevated_button.dart:484 — packages/flutter/lib/src/material/elevated_button.dart:484-503 | packages/flutter/lib/src/material/filled_button.dart:501-521 | packages/flutter/lib/src/material/outlined_button.dart:430-450 | packages/flutter/lib/src/material/text_button.dart:464-483 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/icon_button.dart:1073 — packages/flutter/lib/src/material/icon_button.dart:1073-1083 | packages/flutter/lib/src/material/icon_button.dart:1201-1214 | packages/flutter/lib/src/material/icon_button.dart:1343-1356 | packages/flutter/lib/src/material/icon_button.dart:1485-1495 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/material/menu_anchor.dart:4091 — packages/flutter/lib/src/material/menu_anchor.dart:4091-4108 | packages/flutter/lib/src/material/radio.dart:942-974 | packages/flutter/lib/src/material/segmented_button.dart:1198-1274 | packages/flutter/lib/src/material/time_picker.dart:3861-3888 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/lib/src/widgets/_window_linux.dart:106 — packages/flutter/lib/src/widgets/_window_linux.dart:106-128 | packages/flutter/lib/src/widgets/_window_linux.dart:130-154 | packages/flutter/lib/src/widgets/_window_linux.dart:156-179 | packages/flutter/lib/src/widgets/_window_linux.dart:181-204 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/examples/api/lib/material/autocomplete/autocomplete.2.dart:88 — packages/flutter/examples/api/lib/material/autocomplete/autocomplete.2.dart:88-96 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.3.dart:112-120 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:86-94 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.4.dart:116-124 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:106 — packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:106-121 | packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.1.dart:194-209 | packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart:92-107 | packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart:112-127 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×13
  • Edited copy of a member (30 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:932 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:932-961 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1010-1039 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter/lib/src/widgets/overflow_bar.dart:329 — packages/flutter/lib/src/widgets/overflow_bar.dart:329-358 | packages/flutter/lib/src/widgets/overflow_bar.dart:360-389 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1972 — engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1972-2010 | engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:2012-2041 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter/lib/src/cupertino/nav_bar.dart:2896 — packages/flutter/lib/src/cupertino/nav_bar.dart:2896-2929 | packages/flutter/lib/src/cupertino/nav_bar.dart:3154-3183 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter/lib/src/rendering/sliver_tree.dart:216 — packages/flutter/lib/src/rendering/sliver_tree.dart:216-249 | packages/flutter/lib/src/rendering/sliver_tree.dart:282-311 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter/lib/src/services/raw_keyboard_linux.dart:303 — packages/flutter/lib/src/services/raw_keyboard_linux.dart:303-332 | packages/flutter/lib/src/services/raw_keyboard_linux.dart:433-463 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/data_table_demo.dart:106 — dev/integration_tests/flutter_gallery/lib/demo/material/data_table_demo.dart:106-135 | dev/integration_tests/new_gallery/lib/demos/material/data_table_demo.dart:482-515 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/bottom_app_bar_demo.dart:151 — dev/integration_tests/new_gallery/lib/demos/material/bottom_app_bar_demo.dart:151-185 | packages/flutter/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart:124-153 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart:130 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart:130-159 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo.dart:170-200 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter_test/lib/src/event_simulation.dart:73 — packages/flutter_test/lib/src/event_simulation.dart:73-102 | packages/flutter_test/lib/src/event_simulation.dart:191-224 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:94 — packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:94-123 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:126-157 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/text_form_field_demo.dart:54 — dev/integration_tests/flutter_gallery/lib/demo/material/text_form_field_demo.dart:54-83 | dev/integration_tests/new_gallery/lib/demos/material/text_field_demo.dart:82-113 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) packages/flutter/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart:27 — packages/flutter/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart:27-62 | packages/flutter/examples/api/lib/cupertino/dialog/cupertino_alert_dialog.0.dart:26-55 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D30 · Dependency Vulnerabilities · Medium CVE · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×12
  • Edited copy of a member (25 corresponding lines) packages/flutter/lib/src/widgets/focus_traversal.dart:1062 — packages/flutter/lib/src/widgets/focus_traversal.dart:1062-1087 | packages/flutter/lib/src/widgets/focus_traversal.dart:1092-1116 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:529 — engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:529-553 | packages/flutter/lib/src/services/message_codecs.dart:637-665 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) dev/snippets/lib/src/analysis.dart:195 — dev/snippets/lib/src/analysis.dart:195-223 | dev/snippets/lib/src/analysis.dart:271-295 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:252 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:252-279 | packages/flutter_test/lib/src/accessibility.dart:245-269 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/lib/src/widgets/ticker_provider.dart:358 — packages/flutter/lib/src/widgets/ticker_provider.dart:358-382 | packages/flutter/lib/src/widgets/ticker_provider.dart:511-539 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/lib/src/widgets/text_selection.dart:1310 — packages/flutter/lib/src/widgets/text_selection.dart:1310-1334 | packages/flutter/lib/src/widgets/text_selection.dart:1431-1455 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/examples/api/lib/material/expansion_panel/expansion_panel_list.0.dart:63 — packages/flutter/examples/api/lib/material/expansion_panel/expansion_panel_list.0.dart:63-91 | packages/flutter/examples/api/lib/material/expansion_panel/expansion_panel_list.expansion_panel_list_radio.0.dart:65-89 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart:28 — packages/flutter/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart:28-54 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.dart:28-52 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.0.dart:26 — packages/flutter/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.0.dart:26-50 | packages/flutter/examples/api/lib/cupertino/scrollbar/cupertino_scrollbar.1.dart:33-60 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/examples/api/lib/material/switch/switch.2.dart:42 — packages/flutter/examples/api/lib/material/switch/switch.2.dart:42-66 | packages/flutter/examples/api/lib/material/switch/switch.3.dart:41-66 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter/examples/api/lib/cupertino/magnifier/cupertino_text_magnifier.0.dart:35 — packages/flutter/examples/api/lib/cupertino/magnifier/cupertino_text_magnifier.0.dart:35-59 | packages/flutter/examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart:20-44 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) packages/flutter_test/lib/src/recording_canvas.dart:269 — packages/flutter_test/lib/src/recording_canvas.dart:269-293 | packages/flutter_test/lib/src/recording_canvas.dart:295-319 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×12
  • Duplicated block (9 lines × 3) engine/src/flutter/lib/ui/platform_dispatcher.dart:2676 — engine/src/flutter/lib/ui/platform_dispatcher.dart:2676-2684 | engine/src/flutter/lib/web_ui/lib/src/engine/window.dart:920-928 | packages/flutter/lib/src/rendering/box.dart:681-689 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/window.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) packages/flutter/lib/src/cupertino/date_picker.dart:792 — packages/flutter/lib/src/cupertino/date_picker.dart:792-800 | packages/flutter/lib/src/cupertino/date_picker.dart:1399-1407 | packages/flutter/lib/src/cupertino/date_picker.dart:1836-1844 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:792` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) packages/flutter/lib/src/gestures/events.dart:1481 — packages/flutter/lib/src/gestures/events.dart:1481-1489 | packages/flutter/lib/src/gestures/events.dart:1708-1716 | packages/flutter/lib/src/gestures/events.dart:2496-2504 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/events.dart:1481` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) packages/flutter/lib/src/material/checkbox.dart:1023 — packages/flutter/lib/src/material/checkbox.dart:1023-1031 | packages/flutter/lib/src/material/radio.dart:991-999 | packages/flutter/lib/src/material/tabs.dart:2843-2851 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/flutter/lib/src/material/input_decorator.dart:2597 — packages/flutter/lib/src/material/input_decorator.dart:2597-2605 | packages/flutter/lib/src/material/input_decorator.dart:2610-2618 | packages/flutter/lib/src/material/input_decorator.dart:2622-2630 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) packages/flutter/lib/src/material/switch.dart:2282 — packages/flutter/lib/src/material/switch.dart:2282-2290 | packages/flutter/lib/src/material/tabs.dart:2846-2854 | packages/flutter/lib/src/material/tabs.dart:2925-2933 — before extracting anything, compare `packages/flutter/lib/src/material/switch.dart` and `packages/flutter/lib/src/material/tabs.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/switch.dart:2282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) packages/flutter/lib/src/material/search_anchor.dart:1630 — packages/flutter/lib/src/material/search_anchor.dart:1630-1638 | packages/flutter/lib/src/material/text_field.dart:891-899 | packages/flutter/lib/src/material/text_form_field.dart:332-340 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/flutter/examples/api/lib/material/context_menu/selectable_region_toolbar_builder.0.dart:27 — packages/flutter/examples/api/lib/material/context_menu/selectable_region_toolbar_builder.0.dart:27-35 | packages/flutter/examples/api/lib/widgets/context_menu/context_menu_controller.0.dart:30-38 | packages/flutter/examples/api/lib/widgets/context_menu/editable_text_toolbar_builder.1.dart:30-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) packages/flutter/examples/api/lib/material/radio/radio.0.dart:14 — packages/flutter/examples/api/lib/material/radio/radio.0.dart:14-22 | packages/flutter/examples/api/lib/material/radio/radio.1.dart:14-22 | packages/flutter/examples/api/lib/widgets/radio_group/radio_group.0.dart:14-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/flutter/examples/api/lib/material/switch/switch.0.dart:14 — packages/flutter/examples/api/lib/material/switch/switch.0.dart:14-22 | packages/flutter/examples/api/lib/material/switch/switch.1.dart:14-22 | packages/flutter/examples/api/lib/material/switch/switch.2.dart:14-22 — before extracting anything, compare `packages/flutter/examples/api/lib/material/switch/switch.0.dart` and `packages/flutter/examples/api/lib/material/switch/switch.1.dart` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/flutter/examples/api/lib/widgets/basic/aspect_ratio.0.dart:14 — packages/flutter/examples/api/lib/widgets/basic/aspect_ratio.0.dart:14-22 | packages/flutter/examples/api/lib/widgets/basic/aspect_ratio.1.dart:14-22 | packages/flutter/examples/api/lib/widgets/basic/aspect_ratio.2.dart:14-22 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/basic/aspect_ratio.1.dart` and `packages/flutter/examples/api/lib/widgets/basic/aspect_ratio.2.dart` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) packages/flutter/examples/api/lib/widgets/basic/mouse_region.0.dart:14 — packages/flutter/examples/api/lib/widgets/basic/mouse_region.0.dart:14-22 | packages/flutter/examples/api/lib/widgets/basic/mouse_region.on_exit.0.dart:14-22 | packages/flutter/examples/api/lib/widgets/basic/mouse_region.on_exit.1.dart:14-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×11
  • Edited copy of a member (26 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:431 — packages/flutter/lib/src/material/range_slider.dart:431-456 | packages/flutter/lib/src/material/slider.dart:599-624 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/lib/src/material/dropdown_menu.dart:1604 — packages/flutter/lib/src/material/dropdown_menu.dart:1604-1629 | packages/flutter/lib/src/material/dropdown_menu.dart:1631-1656 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/lib/src/material/scaffold.dart:2936 — packages/flutter/lib/src/material/scaffold.dart:2936-2961 | packages/flutter/lib/src/material/scaffold.dart:2963-2988 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/lib/src/rendering/sliver_clip.dart:113 — packages/flutter/lib/src/rendering/sliver_clip.dart:113-138 | packages/flutter/lib/src/rendering/sliver_clip.dart:247-273 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1579 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1579-1605 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1743-1768 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/lib/src/widgets/gesture_detector.dart:1722 — packages/flutter/lib/src/widgets/gesture_detector.dart:1722-1750 | packages/flutter/lib/src/widgets/gesture_detector.dart:1752-1777 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/examples/api/lib/services/binding/handle_request_app_exit.0.dart:79 — packages/flutter/examples/api/lib/services/binding/handle_request_app_exit.0.dart:79-104 | packages/flutter/examples/api/lib/widgets/app_lifecycle_listener/app_lifecycle_listener.1.dart:76-101 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/examples/api/lib/widgets/scroll_view/list_view.0.dart:156 — packages/flutter/examples/api/lib/widgets/scroll_view/list_view.0.dart:156-187 | packages/flutter/examples/api/lib/widgets/scroll_view/list_view.0.dart:215-240 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart:216 — packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart:216-244 | packages/flutter/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart:216-241 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) packages/flutter/examples/api/lib/material/ink/ink.image_clip.0.dart:31 — packages/flutter/examples/api/lib/material/ink/ink.image_clip.0.dart:31-56 | packages/flutter/examples/api/lib/material/ink/ink.image_clip.1.dart:31-58 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) dev/integration_tests/windowing_test/lib/main.dart:311 — dev/integration_tests/windowing_test/lib/main.dart:311-336 | packages/flutter/examples/api/lib/widgets/routes/flexible_route_transitions.1.dart:234-267 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×11
  • Edited copy of a member (28 corresponding lines) packages/flutter/lib/src/material/divider.dart:184 — packages/flutter/lib/src/material/divider.dart:184-211 | packages/flutter/lib/src/material/divider.dart:312-339 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:202 — packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:202-233 | packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:235-262 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter/lib/src/material/carousel.dart:1792 — packages/flutter/lib/src/material/carousel.dart:1792-1819 | packages/flutter/lib/src/widgets/page_view.dart:470-498 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter/lib/src/widgets/_window_win32.dart:1601 — packages/flutter/lib/src/widgets/_window_win32.dart:1601-1628 | packages/flutter/lib/src/widgets/_window_win32.dart:1638-1665 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter/examples/api/lib/widgets/text_editing_intents/editable_text_tap_up_outside_intent.0.dart:38 — packages/flutter/examples/api/lib/widgets/text_editing_intents/editable_text_tap_up_outside_intent.0.dart:38-77 | packages/flutter/lib/src/widgets/editable_text.dart:6950-6977 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter/lib/src/rendering/paragraph.dart:3449 — packages/flutter/lib/src/rendering/paragraph.dart:3449-3476 | packages/flutter/lib/src/widgets/editable_text.dart:5524-5555 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:65 — dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:65-93 | dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:300-327 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) examples/layers/rendering/src/sector_layout.dart:403 — examples/layers/rendering/src/sector_layout.dart:403-433 | examples/layers/rendering/src/sector_layout.dart:435-462 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_button_demo.dart:14 — dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_button_demo.dart:14-44 | packages/flutter/examples/api/lib/cupertino/button/cupertino_button.0.dart:26-53 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter/examples/api/lib/material/radio_list_tile/custom_labeled_radio.0.dart:75 — packages/flutter/examples/api/lib/material/radio_list_tile/custom_labeled_radio.0.dart:75-102 | packages/flutter/examples/api/lib/material/radio_list_tile/custom_labeled_radio.1.dart:66-93 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) packages/flutter/examples/api/lib/material/list_tile/custom_list_item.0.dart:92 — packages/flutter/examples/api/lib/material/list_tile/custom_list_item.0.dart:92-119 | packages/flutter/examples/api/lib/material/list_tile/custom_list_item.1.dart:118-150 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×11
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter/lib/src/services/raw_keyboard_android.dart:306 — packages/flutter/lib/src/services/raw_keyboard_android.dart:306-315 | packages/flutter/lib/src/services/raw_keyboard_linux.dart:148-160 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:272-284 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter_tools/lib/src/commands/daemon.dart:490 — packages/flutter_tools/lib/src/commands/daemon.dart:490-499 | packages/flutter_tools/lib/src/commands/daemon.dart:501-510 | packages/flutter_tools/lib/src/commands/daemon.dart:512-521 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:772 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:772-786 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:788-797 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:886-901 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter/lib/src/painting/stadium_border.dart:114 — packages/flutter/lib/src/painting/stadium_border.dart:114-124 | packages/flutter/lib/src/painting/stadium_border.dart:279-288 | packages/flutter/lib/src/painting/stadium_border.dart:440-450 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter/lib/src/material/date_picker_theme.dart:1175 — packages/flutter/lib/src/material/date_picker_theme.dart:1175-1184 | packages/flutter/lib/src/material/date_picker_theme.dart:1366-1375 | packages/flutter/lib/src/material/date_picker_theme.dart:1386-1395 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter_tools/lib/src/build_system/targets/android.dart:198 — packages/flutter_tools/lib/src/build_system/targets/android.dart:198-207 | packages/flutter_tools/lib/src/build_system/targets/common.dart:447-456 | packages/flutter_tools/lib/src/build_system/targets/common.dart:475-484 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter/lib/src/material/input_border.dart:213 — packages/flutter/lib/src/material/input_border.dart:213-222 | packages/flutter/lib/src/painting/beveled_rectangle_border.dart:44-53 | packages/flutter/lib/src/painting/continuous_rectangle_border.dart:56-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter/lib/src/material/input_border.dart:224 — packages/flutter/lib/src/material/input_border.dart:224-233 | packages/flutter/lib/src/painting/beveled_rectangle_border.dart:55-64 | packages/flutter/lib/src/painting/continuous_rectangle_border.dart:67-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) packages/flutter/lib/src/foundation/diagnostics.dart:2010 — packages/flutter/lib/src/foundation/diagnostics.dart:2010-2019 | packages/flutter/lib/src/foundation/diagnostics.dart:2189-2200 | packages/flutter/lib/src/widgets/framework.dart:5598-5607 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:1197 — REDACTED:1197-1207 | REDACTED:1209-1219 | REDACTED:1247-1256 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) examples/layers/widgets/sectors.dart:169 — examples/layers/widgets/sectors.dart:169-178 | packages/flutter/examples/api/lib/widgets/navigator/restorable_route_future.0.dart:14-23 | packages/flutter/examples/api/lib/widgets/system_context_menu/system_context_menu.1.dart:14-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×11
  • Duplicated block (28 lines × 2) engine/src/flutter/lib/ui/semantics.dart:2040 — engine/src/flutter/lib/ui/semantics.dart:2040-2067 | engine/src/flutter/lib/web_ui/lib/semantics.dart:717-744 — before extracting anything, compare `engine/src/flutter/lib/ui/semantics.dart` and `engine/src/flutter/lib/web_ui/lib/semantics.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/semantics.dart:2040` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) engine/src/flutter/lib/web_ui/lib/channel_buffers.dart:185 — engine/src/flutter/lib/web_ui/lib/channel_buffers.dart:185-212 | engine/src/flutter/lib/web_ui/lib/channel_buffers.dart:220-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/channel_buffers.dart:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1451 — packages/flutter/lib/src/rendering/editable.dart:1451-1478 | packages/flutter/lib/src/rendering/paragraph.dart:1402-1429 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2588 — packages/flutter/lib/src/rendering/paragraph.dart:2588-2615 | packages/flutter/lib/src/rendering/paragraph.dart:2840-2867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2588` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:114 — dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:114-141 | dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:181-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) packages/flutter/examples/api/lib/widgets/focus_manager/focus_node.0.dart:55 — packages/flutter/examples/api/lib/widgets/focus_manager/focus_node.0.dart:55-82 | packages/flutter/examples/api/lib/widgets/focus_scope/focus.0.dart:36-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart:56 — packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart:56-83 | packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart:76-103 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart` and `packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) packages/flutter/examples/api/lib/widgets/text/ui_testing_with_text.dart:95 — packages/flutter/examples/api/lib/widgets/text/ui_testing_with_text.dart:95-122 | packages/flutter/examples/api/lib/widgets/text/ui_testing_with_text.dart:123-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (28 lines × 2) examples/multiple_windows/lib/app/popup_window_edit_dialog.dart:84 — examples/multiple_windows/lib/app/popup_window_edit_dialog.dart:84-111 | examples/multiple_windows/lib/app/tooltip_window_edit_dialog.dart:84-111 — before extracting anything, compare `examples/multiple_windows/lib/app/popup_window_edit_dialog.dart` and `examples/multiple_windows/lib/app/tooltip_window_edit_dialog.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:79 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:79-106 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:76-103 — before extracting anything, compare `dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java` and `dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (28 lines × 2) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:23 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:23-50 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:21-48 — before extracting anything, compare `dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java` and `dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:51` calls `put` and `dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:50` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×11
  • Duplicated block (24 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:932 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:932-955 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1010-1033 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:932` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) packages/flutter/lib/src/material/about.dart:421 — packages/flutter/lib/src/material/about.dart:421-444 | packages/flutter/lib/src/material/about.dart:569-592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) packages/flutter/lib/src/material/checkbox.dart:1011 — packages/flutter/lib/src/material/checkbox.dart:1011-1034 | packages/flutter/lib/src/material/radio.dart:979-1002 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox.dart` and `packages/flutter/lib/src/material/radio.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox.dart:1011` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1479 — packages/flutter/lib/src/rendering/editable.dart:1479-1502 | packages/flutter/lib/src/rendering/paragraph.dart:1431-1454 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/editable.dart:1479` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:1131 — packages/flutter/lib/src/cupertino/switch.dart:1131-1154 | packages/flutter/lib/src/material/switch.dart:1655-1678 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (24 lines × 2) dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:97 — dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:97-120 | dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart:97-120 — before extracting anything, compare `dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart` and `dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) dev/integration_tests/android_views/lib/motion_events_page.dart:274 — dev/integration_tests/android_views/lib/motion_events_page.dart:274-297 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:243-266 — before extracting anything, compare `dev/integration_tests/android_views/lib/motion_events_page.dart` and `dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:112 — dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:112-135 | dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:348-371 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart` and `dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:375` calls `_CustomValueIndicatorShape` and `dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:139` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (24 lines × 2) packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart:72 — packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart:72-95 | packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart:67-90 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart` and `packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart:71` calls `SliverAppBar`, `Text` and `packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart:66` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (24 lines × 2) packages/flutter_test/lib/src/event_simulation.dart:555 — packages/flutter_test/lib/src/event_simulation.dart:555-578 | packages/flutter_test/lib/src/event_simulation.dart:622-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_test/lib/src/event_simulation.dart:555` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/TouchPipe.java:21 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/TouchPipe.java:21-44 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/TouchPipe.java:21-44 — before extracting anything, compare `dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/TouchPipe.java` and `dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/TouchPipe.java` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
S1 · Web-Security Posture · Weak hash algorithm · ×11
  • Weak hash algorithm engine/src/flutter/testing/skia_gold_client/lib/skia_gold_client.dart:716 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_goldens/lib/skia_client.dart:586 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/android/gradle.dart:1177 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/base/fingerprint.dart:90 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/build_system/build_system.dart:379 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/bundle.dart:38 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/cache.dart:1415 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/commands/build_ios.dart:288 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/flutter_manifest.dart:286 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/proxied_devices/file_transfer.dart:240 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm packages/flutter_tools/lib/src/proxied_devices/file_transfer.dart:303 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×10
  • Edited copy of a member (29 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:19 — engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:19-47 | engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart:18-54 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1165 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1165-1195 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1698-1726 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) packages/flutter/lib/src/services/raw_keyboard_android.dart:190 — packages/flutter/lib/src/services/raw_keyboard_android.dart:190-218 | packages/flutter/lib/src/services/raw_keyboard_windows.dart:80-108 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvas.dart:222 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvas.dart:222-250 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/canvas.dart:252-281 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics_helper.dart:305 — engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics_helper.dart:305-338 | engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics_helper.dart:529-557 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) packages/flutter/examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart:16 — packages/flutter/examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart:16-44 | packages/flutter/examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart:86-122 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) packages/flutter/examples/api/lib/widgets/basic/listener.0.dart:59 — packages/flutter/examples/api/lib/widgets/basic/listener.0.dart:59-87 | packages/flutter/examples/api/lib/widgets/basic/mouse_region.0.dart:57-85 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) packages/flutter/examples/api/lib/material/input_decorator/input_decoration.prefix_icon_constraints.0.dart:28 — packages/flutter/examples/api/lib/material/input_decorator/input_decoration.prefix_icon_constraints.0.dart:28-56 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.suffix_icon_constraints.0.dart:28-56 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) packages/flutter/examples/api/lib/material/scaffold/scaffold.drawer.0.dart:38 — packages/flutter/examples/api/lib/material/scaffold/scaffold.drawer.0.dart:38-66 | packages/flutter/examples/api/lib/material/scaffold/scaffold.end_drawer.0.dart:38-66 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) packages/flutter/examples/api/lib/cupertino/sheet/cupertino_sheet.1.dart:25 — packages/flutter/examples/api/lib/cupertino/sheet/cupertino_sheet.1.dart:25-53 | packages/flutter/examples/api/lib/cupertino/sheet/cupertino_sheet.3.dart:28-56 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×10
  • Duplicated block (12 lines × 3) packages/flutter/lib/src/material/calendar_date_picker.dart:1217 — packages/flutter/lib/src/material/calendar_date_picker.dart:1217-1228 | packages/flutter/lib/src/material/calendar_date_picker.dart:1473-1484 | packages/flutter/lib/src/material/date_picker.dart:2863-2874 — before extracting anything, compare `packages/flutter/lib/src/material/calendar_date_picker.dart` and `packages/flutter/lib/src/material/date_picker.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/material/calendar_date_picker.dart:1230` calls `of` and `packages/flutter/lib/src/material/date_picker.dart:2876` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:173 — packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:173-184 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:222-233 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:272-283 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:284` calls `toString` and `packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:185` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) packages/flutter/lib/src/rendering/image.dart:465 — packages/flutter/lib/src/rendering/image.dart:465-476 | packages/flutter/lib/src/widgets/basic.dart:7060-7071 | packages/flutter/lib/src/widgets/image.dart:1130-1141 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/rendering/image.dart:477` calls `add` and `packages/flutter/lib/src/widgets/basic.dart:7072` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) engine/src/flutter/lib/ui/text.dart:3022 — engine/src/flutter/lib/ui/text.dart:3022-3033 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:108-119 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:1251-1262 — `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (12 lines × 3) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/image.dart:103 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/image.dart:103-114 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/picture.dart:105-118 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:1183-1196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (12 lines × 3) packages/flutter/lib/src/rendering/proxy_box.dart:975 — packages/flutter/lib/src/rendering/proxy_box.dart:975-986 | packages/flutter/lib/src/rendering/proxy_sliver.dart:197-208 | packages/flutter/lib/src/widgets/basic.dart:384-395 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/rendering/proxy_sliver.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) packages/flutter/lib/src/rendering/proxy_box.dart:1102 — packages/flutter/lib/src/rendering/proxy_box.dart:1102-1113 | packages/flutter/lib/src/widgets/transitions.dart:627-638 | packages/flutter/lib/src/widgets/transitions.dart:723-734 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (12 lines × 3) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:123 — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:123-134 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/EventChannel.java:107-118 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/MethodChannel.java:138-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `handler` to `MessageHandler<T>` in one and `StreamHandler` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 3) packages/flutter/examples/api/lib/material/app/app.0.dart:46 — packages/flutter/examples/api/lib/material/app/app.0.dart:46-57 | packages/flutter/examples/api/lib/material/expansion_tile/expansion_tile.2.dart:43-54 | packages/flutter/examples/api/lib/material/popup_menu/popup_menu.2.dart:54-65 — before extracting anything, compare `packages/flutter/examples/api/lib/material/app/app.0.dart` and `packages/flutter/examples/api/lib/material/expansion_tile/expansion_tile.2.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/app/app.0.dart:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) packages/flutter/examples/api/lib/material/tooltip/tooltip.0.dart:14 — packages/flutter/examples/api/lib/material/tooltip/tooltip.0.dart:14-25 | packages/flutter/examples/api/lib/material/tooltip/tooltip.1.dart:14-25 | packages/flutter/examples/api/lib/material/tooltip/tooltip.2.dart:14-25 — before extracting anything, compare `packages/flutter/examples/api/lib/material/tooltip/tooltip.0.dart` and `packages/flutter/examples/api/lib/material/tooltip/tooltip.1.dart` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X12 · Unreachable branch · Branch is unreachable · ×10
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:582 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:608 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:626 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:652 — `change && VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:667 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:696 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:725 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:893 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:907 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
  • Branch is unreachable — its condition cannot hold here engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:944 — `VERBOSE_LOGS` can never be true where it stands: it is decided by constants. The branch it guards never runs — whatever it was meant to handle is silently handled elsewhere or not at all. Remove it, or fix the test it repeats or the guard that decides it.
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: painting.dart ↔ shaders.dart engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/painting.dart:1 — `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` change together 92% of the time (11 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `74b8f233` [web] Unify ui.Shader between CanvasKit and Skwasm (#191232); `8f61855d` Implement getUniformMatX and getUniformMatXArray functionality on web…; `836c2950` Update web ui fragment shader tests (#181877) — run `git show` on any of them.
  • Change coupling: renderer.dart ↔ renderer.dart engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:1 — `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_stub/renderer.dart` change together 87% of the time (13 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `040d4292` [web] Render bounded ImageFilter.blur on wimp (#196081); `27f299e9` [web] Unify ui.Paint across CanvasKit and Skwasm (#196071); `93197e2d` [wimp] Adds wimp-heavy variant for non-chrome browsers (#189953) — run `git show` on any of them.
  • Change coupling: analyze.dart ↔ main.dart dev/bots/analyze.dart:1 — `dev/bots/analyze.dart` and `dev/flutter_analyzer_plugin/lib/main.dart` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `b0319d81` [analysis] Migrate issue and repository link syntax rules to flutter_…; `eae07165` [analysis] Migrate verifyTabooDocumentation to flutter_analyzer_plugi…; `e8c1e046` [analysis] Migrate verifyNoTestImports to flutter_analyzer_plugin (#1… — run `git show` on any of them.
  • Change coupling: renderer.dart ↔ renderer.dart engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart:1 — `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/renderer.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/renderer.dart` change together 74% of the time (17 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `6b2bb92c` [web] Unify ui.Canvas behind a shared EngineCanvas frontend (#196348); `040d4292` [web] Render bounded ImageFilter.blur on wimp (#196081); `27f299e9` [web] Unify ui.Paint across CanvasKit and Skwasm (#196071) — run `git show` on any of them.
  • Change coupling: build_aar.dart ↔ build_appbundle.dart packages/flutter_tools/lib/src/commands/build_aar.dart:1 — `packages/flutter_tools/lib/src/commands/build_aar.dart` and `packages/flutter_tools/lib/src/commands/build_appbundle.dart` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `93017532` refactor(flutter_tools): share FlutterCommand options and OptionBundl…; `416cfc74` [tool] Migrate BuildApkCommand and Android build toolchain to modular…; `4762dec4` feat(flutter_tools): migrate Android build commands to typed options … — run `git show` on any of them.
  • Change coupling: text.dart ↔ paragraph.dart engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart:1 — `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/text.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/paragraph.dart` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `27f299e9` [web] Unify ui.Paint across CanvasKit and Skwasm (#196071); `0d7df4b6` Add ParagraphStyle.hyphenCharacter to dart:ui (#195345); `0081d314` [web] Unify effective font families and strut leading distribution be… — run `git show` on any of them.
  • Change coupling: attach.dart ↔ run.dart packages/flutter_tools/lib/src/commands/attach.dart:1 — `packages/flutter_tools/lib/src/commands/attach.dart` and `packages/flutter_tools/lib/src/commands/run.dart` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `9a3453c4` [tool] Migrate ResidentRunner, HotRunner, and ColdRunner to modular d…; `f2a4d129` [flutter_tools] Migrate DaemonCommand and Daemon domains to construct…; `43596b35` [tool] Require explicit dependency injection for FlutterDevice and Fl… — run `git show` on any of them.
  • Change coupling: build.dart ↔ macos_device.dart packages/flutter_tools/lib/src/commands/build.dart:1 — `packages/flutter_tools/lib/src/commands/build.dart` and `packages/flutter_tools/lib/src/macos/macos_device.dart` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `0dc1db00` Reland "[flutter_tools] Remove globals from macOS build, migration, a…; `8bf6f100` Revert: [flutter_tools] Remove globals from macOS build, migration, a…; `6da6a9b8` [flutter_tools] Remove globals from macOS build, migration, and Xcode… — run `git show` on any of them.
  • Change coupling: android_device.dart ↔ desktop_device.dart packages/flutter_tools/lib/src/android/android_device.dart:1 — `packages/flutter_tools/lib/src/android/android_device.dart` and `packages/flutter_tools/lib/src/desktop_device.dart` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `287ec892` [flutter_tools] Make DeviceLogReader.dispose asynchronous (#195389); `4a97c10c` [flutter_tools, engine] Add --disable-service-origin-check option to …; `28481edd` Add `--profile-startup` flag to `flutter run` (#172990) — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×9
  • Edited copy of a member (27 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1088 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1088-1114 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1122-1151 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/material/switch.dart:2264 — packages/flutter/lib/src/material/switch.dart:2264-2290 | packages/flutter/lib/src/material/tabs.dart:2828-2854 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/widgets/container.dart:448 — packages/flutter/lib/src/widgets/container.dart:448-474 | packages/flutter/lib/src/widgets/implicit_animations.dart:721-753 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/material/switch.dart:2183 — packages/flutter/lib/src/material/switch.dart:2183-2215 | packages/flutter/lib/src/material/time_picker.dart:3693-3719 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/material/tabs.dart:1654 — packages/flutter/lib/src/material/tabs.dart:1654-1683 | packages/flutter/lib/src/material/tabs.dart:2280-2306 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/material/navigation_bar.dart:1002 — packages/flutter/lib/src/material/navigation_bar.dart:1002-1028 | packages/flutter/lib/src/material/navigation_drawer.dart:441-471 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/widgets/text_selection.dart:1795 — packages/flutter/lib/src/widgets/text_selection.dart:1795-1821 | packages/flutter/lib/src/widgets/text_selection.dart:1823-1852 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) packages/flutter/lib/src/cupertino/text_field.dart:1198 — packages/flutter/lib/src/cupertino/text_field.dart:1198-1224 | packages/flutter/lib/src/material/text_field.dart:1381-1411 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) engine/src/flutter/lib/ui/semantics.dart:1551 — engine/src/flutter/lib/ui/semantics.dart:1551-1577 | engine/src/flutter/lib/web_ui/lib/semantics.dart:499-525 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×9
  • Duplicated block (15–16 lines × 2) packages/flutter/lib/src/material/tooltip.dart:357 — packages/flutter/lib/src/material/tooltip.dart:357-372 | packages/flutter/lib/src/material/tooltip_theme.dart:275-289 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/tooltip.dart:357` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) packages/flutter/lib/src/widgets/scroll_delegate.dart:560 — packages/flutter/lib/src/widgets/scroll_delegate.dart:560-574 | packages/flutter/lib/src/widgets/scroll_delegate.dart:774-789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/scroll_delegate.dart:560` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (15–16 lines × 2) packages/flutter_tools/lib/src/project.dart:1449 — packages/flutter_tools/lib/src/project.dart:1449-1464 | packages/flutter_tools/lib/src/project.dart:1535-1549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/project.dart:1449` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) examples/multiple_windows/lib/app/popup_window_content.dart:68 — examples/multiple_windows/lib/app/popup_window_content.dart:68-83 | examples/multiple_windows/lib/app/tooltip_window_content.dart:49-63 — before extracting anything, compare `examples/multiple_windows/lib/app/popup_window_content.dart` and `examples/multiple_windows/lib/app/tooltip_window_content.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/multiple_windows/lib/app/popup_window_content.dart:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) packages/flutter/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart:139 — packages/flutter/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart:139-153 | packages/flutter/examples/api/lib/material/bottom_app_bar/bottom_app_bar.2.dart:173-188 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/bottom_app_bar/bottom_app_bar.1.dart:139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) packages/flutter/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart:39 — packages/flutter/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart:39-54 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.dart:38-52 — before extracting anything, compare `packages/flutter/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart` and `packages/flutter/examples/api/lib/material/input_decorator/input_decoration.label_style_error.0.dart` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/input_decorator/input_decoration.floating_label_style_error.0.dart:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) packages/flutter/examples/api/lib/material/navigation_bar/navigation_bar.0.dart:101 — packages/flutter/examples/api/lib/material/navigation_bar/navigation_bar.0.dart:101-116 | packages/flutter/examples/api/lib/material/navigation_bar/navigation_bar.0.dart:119-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/navigation_bar/navigation_bar.0.dart:101` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–16 lines × 2) packages/flutter/examples/api/lib/ui/text/font_feature.0.dart:17 — packages/flutter/examples/api/lib/ui/text/font_feature.0.dart:17-32 | packages/flutter_test/lib/src/test_widgets_app.dart:298-312 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/ui/text/font_feature.0.dart:17` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) packages/flutter/examples/api/lib/widgets/keep_alive/automatic_keep_alive.0.dart:54 — packages/flutter/examples/api/lib/widgets/keep_alive/automatic_keep_alive.0.dart:54-68 | packages/flutter/examples/api/lib/widgets/keep_alive/automatic_keep_alive_client_mixin.0.dart:86-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×9
  • Duplicated block (11–12 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1882 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1882-1893 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1952-1962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1882` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11–12 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2092 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2092-2102 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2178-2189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2092` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) packages/flutter/lib/src/material/switch.dart:2329 — packages/flutter/lib/src/material/switch.dart:2329-2340 | packages/flutter/lib/src/material/time_picker.dart:3863-3873 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/time_picker.dart:3863` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) packages/flutter/lib/src/rendering/editable.dart:790 — packages/flutter/lib/src/rendering/editable.dart:790-800 | packages/flutter/lib/src/rendering/paragraph.dart:401-412 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/editable.dart:790` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11–12 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2071 — packages/flutter/lib/src/rendering/paragraph.dart:2071-2081 | packages/flutter/lib/src/rendering/paragraph.dart:2453-2464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2071` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2249 — packages/flutter/lib/src/rendering/paragraph.dart:2249-2259 | packages/flutter/lib/src/rendering/paragraph.dart:2705-2716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) packages/flutter/lib/src/widgets/focus_manager.dart:2250 — packages/flutter/lib/src/widgets/focus_manager.dart:2250-2261 | packages/flutter/lib/src/widgets/focus_manager.dart:2306-2316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/focus_manager.dart:2250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:546 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:546-556 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:93-104 — before extracting anything, compare `packages/flutter_tools/lib/src/commands/build_ios_framework.dart` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:546` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) engine/src/flutter/sky/tools/create_embedder_framework.py:25 — engine/src/flutter/sky/tools/create_embedder_framework.py:25-35 | engine/src/flutter/sky/tools/create_macos_framework.py:17-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×9
  • Duplicated block (7 lines × 4) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:912 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:912-918 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:988-995 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1067-1074 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1139-1145 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:912` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/material/icon_button.dart:1073 — packages/flutter/lib/src/material/icon_button.dart:1073-1079 | packages/flutter/lib/src/material/icon_button.dart:1201-1207 | packages/flutter/lib/src/material/icon_button.dart:1343-1349 | packages/flutter/lib/src/material/icon_button.dart:1485-1491 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/icon_button.dart:1073` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/material/menu_anchor.dart:4153 — packages/flutter/lib/src/material/menu_anchor.dart:4153-4159 | packages/flutter/lib/src/material/search_anchor.dart:1880-1886 | packages/flutter/lib/src/material/segmented_button.dart:1250-1256 | packages/flutter/lib/src/material/tabs.dart:2911-2917 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/menu_anchor.dart:4153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/material/button.dart:476 — packages/flutter/lib/src/material/button.dart:476-482 | packages/flutter/lib/src/material/button_style_button.dart:664-670 | packages/flutter/lib/src/material/time_picker.dart:866-872 | packages/flutter/lib/src/material/toggle_buttons.dart:1630-1636 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/material/button.dart:484 — packages/flutter/lib/src/material/button.dart:484-490 | packages/flutter/lib/src/material/button_style_button.dart:672-678 | packages/flutter/lib/src/material/time_picker.dart:874-880 | packages/flutter/lib/src/material/toggle_buttons.dart:1638-1644 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/material/button.dart:492 — packages/flutter/lib/src/material/button.dart:492-498 | packages/flutter/lib/src/material/button_style_button.dart:680-686 | packages/flutter/lib/src/material/time_picker.dart:882-888 | packages/flutter/lib/src/material/toggle_buttons.dart:1646-1652 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/material/button.dart:500 — packages/flutter/lib/src/material/button.dart:500-506 | packages/flutter/lib/src/material/button_style_button.dart:688-694 | packages/flutter/lib/src/material/time_picker.dart:890-896 | packages/flutter/lib/src/material/toggle_buttons.dart:1654-1660 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 4) packages/flutter/lib/src/painting/alignment.dart:372 — packages/flutter/lib/src/painting/alignment.dart:372-378 | packages/flutter/lib/src/painting/alignment.dart:582-588 | packages/flutter/lib/src/painting/border_radius.dart:479-485 | packages/flutter/lib/src/painting/edge_insets.dart:618-624 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `BorderRadiusGeometry` in one and `EdgeInsetsGeometry` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 4) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:97 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:97-103 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:94-100 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java:213-219 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel2.java:137-143 — before extracting anything, compare `dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java` and `dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×8
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:90 — engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:90-157 | engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:165-233 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:371-422 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:163-209 | engine/src/flutter/lib/web_ui/lib/text.dart:322-390 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/text_field.dart:209 — engine/src/flutter/lib/web_ui/lib/src/engine/semantics/text_field.dart:209-226 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:1693-1735 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2145-2195 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2291-2329 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2357-2421 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) packages/flutter/lib/src/gestures/long_press.dart:132 — packages/flutter/lib/src/gestures/long_press.dart:132-138 | packages/flutter/lib/src/gestures/multitap.dart:754-761 | packages/flutter/lib/src/gestures/tap.dart:48-54 | packages/flutter/lib/src/gestures/tap_and_drag.dart:107-114 | packages/flutter/lib/src/gestures/tap_and_drag.dart:160-167 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) packages/flutter/lib/src/material/date_picker_theme.dart:791 — packages/flutter/lib/src/material/date_picker_theme.dart:791-979 | packages/flutter/lib/src/material/dialog_theme.dart:285-311 | packages/flutter/lib/src/material/dialog_theme.dart:504-533 | packages/flutter/lib/src/material/navigation_bar_theme.dart:215-258 | packages/flutter/lib/src/material/navigation_drawer_theme.dart:195-222 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) packages/flutter/lib/src/rendering/proxy_box.dart:1632 — packages/flutter/lib/src/rendering/proxy_box.dart:1632-1642 | packages/flutter/lib/src/rendering/proxy_box.dart:1736-1746 | packages/flutter/lib/src/rendering/proxy_box.dart:2011-2021 | packages/flutter/lib/src/rendering/proxy_box.dart:2191-2201 | packages/flutter/lib/src/rendering/proxy_box.dart:2297-2307 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) dev/integration_tests/android_engine_test/lib/hcpp/platform_view_clippath_main.dart:250 — dev/integration_tests/android_engine_test/lib/hcpp/platform_view_clippath_main.dart:250-273 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_cliprect_surfaceview_main.dart:132-154 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_fractional_size_main.dart:153-175 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_opacity_main.dart:92-114 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_transform_main.dart:169-191 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:39 — packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:39-54 | packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart:42-57 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:39-54 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:41-56 | packages/flutter/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart:42-57 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) packages/flutter_test/lib/src/event_simulation.dart:310 — packages/flutter_test/lib/src/event_simulation.dart:310-356 | packages/flutter_test/lib/src/event_simulation.dart:441-477 | packages/flutter_test/lib/src/event_simulation.dart:479-521 | packages/flutter_test/lib/src/event_simulation.dart:523-588 | packages/flutter_test/lib/src/event_simulation.dart:590-655 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×8
  • Edited copy of a member (31 corresponding lines) packages/flutter/lib/src/material/search_bar_theme.dart:216 — packages/flutter/lib/src/material/search_bar_theme.dart:216-287 | packages/flutter/lib/src/material/search_view_theme.dart:194-224 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) packages/flutter/lib/src/gestures/resampler.dart:49 — packages/flutter/lib/src/gestures/resampler.dart:49-79 | packages/flutter/lib/src/gestures/resampler.dart:81-114 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) packages/flutter/lib/src/scheduler/binding.dart:341 — packages/flutter/lib/src/scheduler/binding.dart:341-371 | packages/flutter/lib/src/widgets/focus_manager.dart:2152-2186 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) packages/flutter/lib/src/cupertino/tab_view.dart:224 — packages/flutter/lib/src/cupertino/tab_view.dart:224-254 | packages/flutter/lib/src/widgets/app.dart:1580-1612 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/typography_demo.dart:38 — dev/integration_tests/flutter_gallery/lib/demo/typography_demo.dart:38-95 | dev/integration_tests/new_gallery/lib/demos/reference/typography_demo.dart:35-65 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) packages/flutter/examples/api/lib/material/dialog/show_dialog.2.dart:38 — packages/flutter/examples/api/lib/material/dialog/show_dialog.2.dart:38-77 | packages/flutter/examples/api/lib/widgets/pop_scope/pop_scope.1.dart:80-110 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) packages/flutter/examples/api/lib/material/text_field/text_field.1.dart:42 — packages/flutter/examples/api/lib/material/text_field/text_field.1.dart:42-72 | packages/flutter/examples/api/lib/widgets/editable_text/editable_text.on_changed.0.dart:37-73 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) packages/flutter/examples/api/lib/widgets/image/image.frame_builder.0.dart:23 — packages/flutter/examples/api/lib/widgets/image/image.frame_builder.0.dart:23-53 | packages/flutter/examples/api/lib/widgets/image/image.loading_builder.0.dart:23-53 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×8
  • Edited copy of a member (33 corresponding lines) packages/flutter/lib/src/widgets/implicit_animations.dart:1219 — packages/flutter/lib/src/widgets/implicit_animations.dart:1219-1251 | packages/flutter/lib/src/widgets/implicit_animations.dart:1378-1410 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:969 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:969-1001 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1048-1080 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) packages/flutter/lib/src/cupertino/text_field.dart:1226 — packages/flutter/lib/src/cupertino/text_field.dart:1226-1258 | packages/flutter/lib/src/material/text_field.dart:1421-1453 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) packages/flutter/lib/src/material/range_slider_parts.dart:1277 — packages/flutter/lib/src/material/range_slider_parts.dart:1277-1313 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:336-368 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/ios.dart:304 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:304-336 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:129-164 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) packages/flutter/lib/src/widgets/focus_manager.dart:1259 — packages/flutter/lib/src/widgets/focus_manager.dart:1259-1303 | packages/flutter/lib/src/widgets/focus_scope.dart:481-513 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:42 — packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:42-74 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.4.dart:72-104 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:82 — packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:82-117 | packages/flutter/examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart:94-126 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×8
  • Edited copy of a member (37 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/linux.dart:115 — packages/flutter_tools/lib/src/build_system/targets/linux.dart:115-157 | packages/flutter_tools/lib/src/build_system/targets/windows.dart:129-165 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) packages/flutter/lib/src/material/menu_anchor.dart:1484 — packages/flutter/lib/src/material/menu_anchor.dart:1484-1524 | packages/flutter/lib/src/material/menu_anchor.dart:1682-1718 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:89 — dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:89-127 | dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:445-481 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart:16 — packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart:16-52 | packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.3.dart:16-52 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart:50 — packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.0.dart:50-88 | packages/flutter/examples/api/lib/material/progress_indicator/linear_progress_indicator.0.dart:55-91 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart:106 — dev/integration_tests/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart:106-150 | dev/integration_tests/flutter_gallery/lib/demo/material/text_form_field_demo.dart:143-179 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) packages/flutter/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.0.dart:23 — packages/flutter/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.0.dart:23-59 | packages/flutter/examples/api/lib/widgets/single_child_scroll_view/single_child_scroll_view.1.dart:23-62 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (37 corresponding lines) packages/flutter/examples/api/lib/material/context_menu/selectable_region_toolbar_builder.0.dart:55 — packages/flutter/examples/api/lib/material/context_menu/selectable_region_toolbar_builder.0.dart:55-91 | packages/flutter/examples/api/lib/widgets/context_menu/context_menu_controller.0.dart:58-94 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×8
  • Edited copy of a member (3 corresponding lines) packages/flutter/lib/src/physics/friction_simulation.dart:198 — packages/flutter/lib/src/physics/friction_simulation.dart:198-200 | packages/flutter/lib/src/physics/gravity_simulation.dart:92-94 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) engine/src/flutter/lib/ui/painting.dart:528 — engine/src/flutter/lib/ui/painting.dart:528-530 | engine/src/flutter/lib/web_ui/lib/painting.dart:245-247 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) packages/flutter/lib/src/rendering/flex.dart:48 — packages/flutter/lib/src/rendering/flex.dart:48-50 | packages/flutter/lib/src/rendering/wrap.dart:52-54 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) packages/flutter/lib/src/painting/_network_image_io.dart:188 — packages/flutter/lib/src/painting/_network_image_io.dart:188-190 | packages/flutter/lib/src/painting/_network_image_web.dart:261-263 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) packages/flutter/lib/src/widgets/editable_text.dart:5568 — packages/flutter/lib/src/widgets/editable_text.dart:5568-5570 | packages/flutter/lib/src/widgets/selectable_region.dart:527-529 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart:63 — dev/integration_tests/flutter_gallery/lib/demo/shrine/supplemental/asymmetric_view.dart:63-65 | dev/integration_tests/new_gallery/lib/studies/shrine/supplemental/asymmetric_view.dart:117-119 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:271 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:271-273 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:282-284 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:403 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:403-405 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:560-562 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×8
  • Duplicated block (27 lines × 2) engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2154 — engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2154-2180 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2300-2326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:969 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:969-995 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1048-1074 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:969` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:1579 — packages/flutter/lib/src/cupertino/date_picker.dart:1579-1605 | packages/flutter/lib/src/cupertino/date_picker.dart:1946-1972 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1579` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) packages/flutter/lib/src/material/carousel.dart:1448 — packages/flutter/lib/src/material/carousel.dart:1448-1474 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:503-529 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1448` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2558 — packages/flutter/lib/src/rendering/paragraph.dart:2558-2584 | packages/flutter/lib/src/rendering/paragraph.dart:2810-2836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java:203 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java:203-229 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel2.java:127-153 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java` and `engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel2.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) packages/flutter/examples/api/lib/material/scaffold/scaffold.of.0.dart:33 — packages/flutter/examples/api/lib/material/scaffold/scaffold.of.0.dart:33-59 | packages/flutter/examples/api/lib/material/scaffold/scaffold.of.1.dart:31-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/scaffold/scaffold.of.0.dart:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (27 lines × 2) packages/flutter_test/lib/src/binding.dart:639 — packages/flutter_test/lib/src/binding.dart:639-665 | packages/flutter_test/lib/src/binding.dart:714-740 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_test/lib/src/binding.dart:639` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×8
  • Duplicated block (22 lines × 2) engine/src/flutter/lib/ui/geometry.dart:1456 — engine/src/flutter/lib/ui/geometry.dart:1456-1477 | engine/src/flutter/lib/web_ui/lib/geometry.dart:693-714 — before extracting anything, compare `engine/src/flutter/lib/ui/geometry.dart` and `engine/src/flutter/lib/web_ui/lib/geometry.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) packages/flutter/lib/src/gestures/velocity_tracker.dart:376 — packages/flutter/lib/src/gestures/velocity_tracker.dart:376-397 | packages/flutter/lib/src/gestures/velocity_tracker.dart:447-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/velocity_tracker.dart:376` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) packages/flutter/lib/src/material/choice_chip.dart:307 — packages/flutter/lib/src/material/choice_chip.dart:307-328 | packages/flutter/lib/src/material/filter_chip.dart:340-361 — before extracting anything, compare `packages/flutter/lib/src/material/choice_chip.dart` and `packages/flutter/lib/src/material/filter_chip.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (22 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:861 — packages/flutter/lib/src/material/range_slider_parts.dart:861-882 | packages/flutter/lib/src/material/slider_parts.dart:751-772 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:861` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) packages/flutter/lib/src/widgets/implicit_animations.dart:1042 — packages/flutter/lib/src/widgets/implicit_animations.dart:1042-1063 | packages/flutter/lib/src/widgets/implicit_animations.dart:2397-2418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/progress_indicator_demo.dart:23 — dev/integration_tests/flutter_gallery/lib/demo/material/progress_indicator_demo.dart:23-44 | dev/integration_tests/new_gallery/lib/demos/material/progress_indicator_demo.dart:26-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (22 lines × 2) packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:93 — packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:93-114 | packages/flutter/examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart:103-124 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart` and `packages/flutter/examples/api/lib/widgets/scroll_position/is_scrolling_listener.0.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/scroll_end_notification/scroll_end_notification.0.dart:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) packages/flutter_test/lib/src/binding.dart:527 — packages/flutter_test/lib/src/binding.dart:527-548 | packages/flutter_test/lib/src/binding.dart:799-820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_test/lib/src/binding.dart:527` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×8
  • Duplicated block (9 lines × 4) packages/flutter/lib/src/material/carousel.dart:1300 — packages/flutter/lib/src/material/carousel.dart:1300-1308 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:345-353 | packages/flutter/lib/src/rendering/sliver_grid.dart:594-602 | packages/flutter/lib/src/rendering/sliver_list.dart:47-55 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 4) packages/flutter/lib/src/material/filled_button.dart:709 — packages/flutter/lib/src/material/filled_button.dart:709-717 | packages/flutter/lib/src/material/icon_button.dart:1362-1370 | packages/flutter/lib/src/material/icon_button.dart:1383-1391 | packages/flutter/lib/src/material/segmented_button.dart:1240-1248 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/icon_button.dart:1361` calls `contains` and `packages/flutter/lib/src/material/filled_button.dart:708` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) packages/flutter/lib/src/material/button.dart:508 — packages/flutter/lib/src/material/button.dart:508-516 | packages/flutter/lib/src/material/button_style_button.dart:696-704 | packages/flutter/lib/src/material/time_picker.dart:898-906 | packages/flutter/lib/src/material/toggle_buttons.dart:1662-1670 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) packages/flutter/examples/api/lib/material/autocomplete/autocomplete.2.dart:88 — packages/flutter/examples/api/lib/material/autocomplete/autocomplete.2.dart:88-96 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.3.dart:112-120 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:86-94 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.4.dart:116-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) packages/flutter/examples/api/lib/material/input_decorator/input_decoration.0.dart:14 — packages/flutter/examples/api/lib/material/input_decorator/input_decoration.0.dart:14-22 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.1.dart:14-22 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.2.dart:14-22 | packages/flutter/examples/api/lib/material/input_decorator/input_decoration.3.dart:14-22 — before extracting anything, compare `packages/flutter/examples/api/lib/material/input_decorator/input_decoration.0.dart` and `packages/flutter/examples/api/lib/material/input_decorator/input_decoration.1.dart` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:14 — packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart:14-22 | packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart:16-24 | packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.2.dart:16-24 | packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.build_default_drag_handles.0.dart:14-22 — before extracting anything, compare `packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.0.dart` and `packages/flutter/examples/api/lib/material/reorderable_list/reorderable_list_view.1.dart` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.0.dart:14 — packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.0.dart:14-22 | packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.1.dart:14-22 | packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.2.dart:14-22 | packages/flutter/examples/api/lib/widgets/sliver_fill/sliver_fill_remaining.3.dart:14-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) packages/flutter/examples/api/lib/sample_templates/widgets.0.dart:42 — packages/flutter/examples/api/lib/sample_templates/widgets.0.dart:42-50 | packages/flutter/examples/api/lib/widgets/fade_in_image/fade_in_image.transition.0.dart:17-25 | packages/flutter/examples/api/lib/widgets/sensitive_content/sensitive_content.0.dart:15-23 | packages/flutter/examples/api/lib/widgets/tap_region/tap_region.0.dart:14-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×8
  • Duplicated block (7 lines × 3) engine/src/flutter/lib/ui/platform_dispatcher.dart:1952 — engine/src/flutter/lib/ui/platform_dispatcher.dart:1952-1958 | engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1987-1993 | engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:2027-2033 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:145 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:145-151 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:171-178 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:249-255 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:181` calls `drawCircle`, `Offset`, `Paint` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:154` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) packages/flutter_tools/lib/src/build_system/hash.dart:204 — packages/flutter_tools/lib/src/build_system/hash.dart:204-210 | packages/flutter_tools/lib/src/build_system/hash.dart:213-219 | packages/flutter_tools/lib/src/build_system/hash.dart:222-228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/hash.dart:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) packages/flutter/examples/api/lib/widgets/scroll_notification_observer/scroll_notification_observer.0.dart:48 — packages/flutter/examples/api/lib/widgets/scroll_notification_observer/scroll_notification_observer.0.dart:48-57 | packages/flutter/lib/src/cupertino/nav_bar.dart:668-674 | packages/flutter/lib/src/cupertino/search_field.dart:392-398 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) packages/flutter/lib/src/painting/border_radius.dart:471 — packages/flutter/lib/src/painting/border_radius.dart:471-477 | packages/flutter/lib/src/painting/border_radius.dart:675-681 | packages/flutter/lib/src/painting/edge_insets.dart:610-616 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterImageView.java:101 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterImageView.java:101-107 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java:129-135 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java:126-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (7 lines × 3) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart:14 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart:14-20 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.1.dart:15-21 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.2.dart:14-20 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.0.dart` and `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_navigation_bar.1.dart` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:14 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:14-20 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.1.dart:14-20 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart:14-20 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart` and `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×8
  • Duplicated block (6 lines × 3) packages/flutter/lib/src/cupertino/switch.dart:1347 — packages/flutter/lib/src/cupertino/switch.dart:1347-1352 | packages/flutter/lib/src/material/switch.dart:1832-1837 | packages/flutter/lib/src/widgets/icon.dart:308-313 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 3) packages/flutter/lib/src/gestures/drag_details.dart:248 — packages/flutter/lib/src/gestures/drag_details.dart:248-253 | packages/flutter/lib/src/gestures/long_press.dart:242-247 | packages/flutter/lib/src/gestures/tap_and_drag.dart:409-414 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/drag_details.dart:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/gestures/drag_details.dart:254` calls `add`, `DoubleProperty` and `packages/flutter/lib/src/gestures/long_press.dart:248` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) packages/flutter_tools/lib/src/build_system/hash.dart:213 — packages/flutter_tools/lib/src/build_system/hash.dart:213-218 | packages/flutter_tools/lib/src/build_system/hash.dart:222-227 | packages/flutter_tools/lib/src/build_system/hash.dart:231-236 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/hash.dart:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) packages/flutter_driver/lib/src/common/frame_sync.dart:22 — packages/flutter_driver/lib/src/common/frame_sync.dart:22-27 | packages/flutter_driver/lib/src/common/semantics.dart:22-45 | packages/flutter_driver/lib/src/common/text.dart:16-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_driver/lib/src/common/semantics.dart:22` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) packages/flutter/lib/src/rendering/proxy_box.dart:968 — packages/flutter/lib/src/rendering/proxy_box.dart:968-973 | packages/flutter/lib/src/rendering/proxy_box.dart:1095-1100 | packages/flutter/lib/src/rendering/proxy_sliver.dart:190-195 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/rendering/proxy_sliver.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) packages/flutter/lib/src/rendering/proxy_sliver.dart:67 — packages/flutter/lib/src/rendering/proxy_sliver.dart:67-72 | packages/flutter/lib/src/widgets/layout_builder.dart:467-472 | packages/flutter/lib/src/widgets/nested_scroll_view.dart:1840-1845 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) packages/flutter/lib/src/rendering/viewport_offset.dart:263 — packages/flutter/lib/src/rendering/viewport_offset.dart:263-268 | packages/flutter/lib/src/widgets/scroll_controller.dart:317-322 | packages/flutter/lib/src/widgets/scroll_delegate.dart:214-219 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:61 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:61-66 | packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart:64-69 | packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart:63-68 — before extracting anything, compare `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart` and `packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:61` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 24+ corresponding lines) packages/flutter/lib/src/rendering/image.dart:458 — packages/flutter/lib/src/rendering/image.dart:458-483 | packages/flutter/lib/src/widgets/basic.dart:7053-7077 | packages/flutter/lib/src/widgets/image.dart:1122-1145 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) engine/src/flutter/lib/ui/painting.dart:6265 — engine/src/flutter/lib/ui/painting.dart:6265-6291 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:149-172 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:492-515 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:2552 — packages/flutter/lib/src/cupertino/date_picker.dart:2552-2575 | packages/flutter/lib/src/cupertino/date_picker.dart:2625-2648 | packages/flutter/lib/src/cupertino/date_picker.dart:2694-2717 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) packages/flutter_tools/lib/src/commands/widget_preview.dart:776 — packages/flutter_tools/lib/src/commands/widget_preview.dart:776-803 | packages/flutter_tools/lib/src/commands/widget_preview.dart:805-828 | packages/flutter_tools/lib/src/commands/widget_preview.dart:830-853 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) packages/flutter/lib/src/widgets/_window_macos.dart:183 — packages/flutter/lib/src/widgets/_window_macos.dart:183-208 | packages/flutter/lib/src/widgets/_window_win32.dart:225-248 | packages/flutter_test/lib/src/binding.dart:1096-1119 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) packages/flutter_test/lib/src/binding.dart:339 — packages/flutter_test/lib/src/binding.dart:339-362 | packages/flutter_test/lib/src/binding.dart:522-548 | packages/flutter_test/lib/src/binding.dart:792-820 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 24+ corresponding lines) packages/flutter/examples/api/lib/material/checkbox_list_tile/custom_labeled_checkbox.0.dart:36 — packages/flutter/examples/api/lib/material/checkbox_list_tile/custom_labeled_checkbox.0.dart:36-66 | packages/flutter/examples/api/lib/material/radio_list_tile/custom_labeled_radio.0.dart:39-62 | packages/flutter/examples/api/lib/material/switch_list_tile/custom_labeled_switch.0.dart:41-71 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×7
  • Edited copy of a member (36 corresponding lines) packages/flutter/lib/src/material/icon_button.dart:1216 — packages/flutter/lib/src/material/icon_button.dart:1216-1251 | packages/flutter/lib/src/material/icon_button.dart:1358-1393 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) packages/flutter/lib/src/services/raw_keyboard_ios.dart:220 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:220-255 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:224-259 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:780 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:780-815 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:353-392 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) dev/tools/gen_defaults/lib/list_tile_template.dart:18 — dev/tools/gen_defaults/lib/list_tile_template.dart:18-53 | dev/tools/gen_defaults/lib/snackbar_template.dart:18-80 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) dev/tools/gen_defaults/lib/icon_button_template.dart:18 — dev/tools/gen_defaults/lib/icon_button_template.dart:18-55 | dev/tools/gen_defaults/lib/icon_button_template.dart:57-92 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) packages/flutter/examples/api/lib/material/segmented_button/segmented_button.0.dart:51 — packages/flutter/examples/api/lib/material/segmented_button/segmented_button.0.dart:51-86 | packages/flutter/examples/api/lib/material/segmented_button/segmented_button.1.dart:36-77 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:115 — examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:115-152 | examples/multiple_windows/lib/app/satellite_window_edit_dialog.dart:103-138 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/flutter/lib/src/rendering/flex.dart:1483 — packages/flutter/lib/src/rendering/flex.dart:1483-1496 | packages/flutter/lib/src/rendering/wrap.dart:866-883 | packages/flutter/lib/src/widgets/basic.dart:6336-6353 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) dev/flutter_analyzer_plugin/lib/src/rules/integration_test_timeouts.dart:32 — dev/flutter_analyzer_plugin/lib/src/rules/integration_test_timeouts.dart:32-46 | dev/flutter_analyzer_plugin/lib/src/rules/no_sync_async_star.dart:36-53 | dev/flutter_analyzer_plugin/lib/src/rules/taboo_documentation.dart:34-47 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/flutter/lib/src/material/bottom_sheet.dart:598 — packages/flutter/lib/src/material/bottom_sheet.dart:598-613 | packages/flutter/lib/src/rendering/shifted_box.dart:234-247 | packages/flutter/lib/src/rendering/shifted_box.dart:1474-1494 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/flutter/lib/src/services/text_input.dart:2739 — packages/flutter/lib/src/services/text_input.dart:2739-2752 | packages/flutter/lib/src/services/text_input.dart:2754-2768 | packages/flutter/lib/src/services/text_input.dart:2770-2784 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/flutter/lib/src/widgets/basic.dart:6017 — packages/flutter/lib/src/widgets/basic.dart:6017-6036 | packages/flutter/lib/src/widgets/sliver.dart:1658-1671 | packages/flutter/lib/src/widgets/sliver.dart:1720-1735 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/flutter_test/lib/src/_binding_io.dart:428 — packages/flutter_test/lib/src/_binding_io.dart:428-441 | packages/flutter_test/lib/src/_binding_io.dart:472-485 | packages/flutter_test/lib/src/_binding_io.dart:510-523 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/flutter/examples/api/lib/cupertino/route/show_cupertino_dialog.0.dart:27 — packages/flutter/examples/api/lib/cupertino/route/show_cupertino_dialog.0.dart:27-40 | packages/flutter/examples/api/lib/material/dialog/show_dialog.2.dart:23-36 | packages/flutter/examples/api/lib/widgets/routes/show_general_dialog.0.dart:26-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 11+ corresponding lines) packages/flutter/lib/src/cupertino/checkbox.dart:370 — packages/flutter/lib/src/cupertino/checkbox.dart:370-380 | packages/flutter/lib/src/cupertino/radio.dart:355-365 | packages/flutter/lib/src/cupertino/radio.dart:367-377 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) dev/integration_tests/widget_preview_scaffold/lib/src/widget_preview_rendering.dart:1018 — dev/integration_tests/widget_preview_scaffold/lib/src/widget_preview_rendering.dart:1018-1031 | packages/flutter/lib/src/rendering/proxy_box.dart:2718-2728 | packages/flutter/lib/src/rendering/proxy_box.dart:3022-3035 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:308 — packages/flutter_tools/lib/src/base/error_handling_io.dart:308-318 | packages/flutter_tools/lib/src/base/error_handling_io.dart:402-412 | packages/flutter_tools/lib/src/base/error_handling_io.dart:690-700 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) packages/flutter/lib/src/foundation/assertions.dart:153 — packages/flutter/lib/src/foundation/assertions.dart:153-163 | packages/flutter_test/lib/src/matchers.dart:2011-2021 | packages/flutter_tools/lib/src/asset.dart:718-730 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/chip_demo.dart:25 — dev/integration_tests/new_gallery/lib/demos/material/chip_demo.dart:25-36 | dev/integration_tests/new_gallery/lib/demos/material/selection_controls_demo.dart:26-36 | dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:29-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) packages/flutter/examples/api/lib/cupertino/expansion_tile/cupertino_expansion_tile.0.dart:15 — packages/flutter/examples/api/lib/cupertino/expansion_tile/cupertino_expansion_tile.0.dart:15-26 | packages/flutter/examples/api/lib/cupertino/menu_anchor/menu_anchor.1.dart:14-24 | packages/flutter/examples/api/lib/cupertino/radio/cupertino_radio.toggleable.0.dart:14-24 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) dev/integration_tests/deferred_components_test/lib/main.dart:20 — dev/integration_tests/deferred_components_test/lib/main.dart:20-30 | dev/integration_tests/ios_app_with_extensions/lib/main.dart:13-31 | dev/integration_tests/web_e2e_tests/lib/scroll_wheel_main.dart:15-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×7
  • Duplicated block (23 lines × 2) packages/flutter/lib/src/cupertino/desktop_text_selection_toolbar.dart:128 — packages/flutter/lib/src/cupertino/desktop_text_selection_toolbar.dart:128-150 | packages/flutter/lib/src/material/desktop_text_selection_toolbar.dart:65-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) packages/flutter/lib/src/rendering/stack.dart:570 — packages/flutter/lib/src/rendering/stack.dart:570-592 | packages/flutter/lib/src/widgets/overlay.dart:1109-1131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/stack.dart:570` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (23 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:279 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:279-301 | dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:302-324 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:302` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) dev/manual_tests/lib/focus.dart:171 — dev/manual_tests/lib/focus.dart:171-193 | dev/manual_tests/lib/hover.dart:57-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/manual_tests/lib/focus.dart:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:115 — examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:115-137 | examples/multiple_windows/lib/app/window_edit_dialog.dart:138-160 — before extracting anything, compare `examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart` and `examples/multiple_windows/lib/app/window_edit_dialog.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/multiple_windows/lib/app/dialog_window_edit_dialog.dart:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) packages/flutter/examples/api/lib/material/dialog/alert_dialog.0.dart:28 — packages/flutter/examples/api/lib/material/dialog/alert_dialog.0.dart:28-50 | packages/flutter/examples/api/lib/material/dialog/alert_dialog.1.dart:29-51 — before extracting anything, compare `packages/flutter/examples/api/lib/material/dialog/alert_dialog.0.dart` and `packages/flutter/examples/api/lib/material/dialog/alert_dialog.1.dart` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:200 — packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:200-222 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:234-256 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart` and `packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×7
  • Duplicated block (17 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1997 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1997-2013 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2074-2090 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2160-2176 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (17 lines × 3) packages/flutter/lib/src/material/elevated_button.dart:570 — packages/flutter/lib/src/material/elevated_button.dart:570-586 | packages/flutter/lib/src/material/filled_button.dart:588-604 | packages/flutter/lib/src/material/filled_button.dart:729-745 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/filled_button.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 3) packages/flutter/lib/src/material/elevated_button.dart:603 — packages/flutter/lib/src/material/elevated_button.dart:603-619 | packages/flutter/lib/src/material/outlined_button.dart:531-547 | packages/flutter/lib/src/material/text_button.dart:564-580 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 3) packages/flutter/lib/src/rendering/sliver.dart:2037 — packages/flutter/lib/src/rendering/sliver.dart:2037-2053 | packages/flutter/lib/src/rendering/sliver_persistent_header.dart:287-303 | packages/flutter/lib/src/widgets/sliver_resizing_header.dart:246-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 3) packages/flutter_tools/lib/src/artifacts.dart:530 — packages/flutter_tools/lib/src/artifacts.dart:530-546 | packages/flutter_tools/lib/src/artifacts.dart:582-598 | packages/flutter_tools/lib/src/artifacts.dart:630-646 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/artifacts.dart:530` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `mode` to `BuildMode?` in one and `BuildMode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 3) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:44 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:44-60 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.1.dart:39-55 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart:51-67 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart` and `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.1.dart:37` calls `Padding`, `symmetric` and `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:43` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 3) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:101 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:101-117 | packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart:110-126 | packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart:105-121 — before extracting anything, compare `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart` and `packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×7
  • Duplicated block (10 lines × 3) packages/flutter/lib/src/cupertino/date_picker.dart:2553 — packages/flutter/lib/src/cupertino/date_picker.dart:2553-2562 | packages/flutter/lib/src/cupertino/date_picker.dart:2626-2635 | packages/flutter/lib/src/cupertino/date_picker.dart:2695-2704 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:2553` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) packages/flutter/lib/src/material/menu_anchor.dart:4097 — packages/flutter/lib/src/material/menu_anchor.dart:4097-4106 | packages/flutter/lib/src/material/segmented_button.dart:1226-1236 | packages/flutter/lib/src/material/time_picker.dart:3876-3886 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/segmented_button.dart:1226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 3) packages/flutter/lib/src/services/text_editing_delta.dart:334 — packages/flutter/lib/src/services/text_editing_delta.dart:334-343 | packages/flutter/lib/src/services/text_editing_delta.dart:387-396 | packages/flutter/lib/src/services/text_editing_delta.dart:450-459 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/text_editing_delta.dart:334` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 3) dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:126 — dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:126-135 | dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:175-184 | dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:223-232 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) examples/multiple_windows/lib/app/window_settings_dialog.dart:337 — examples/multiple_windows/lib/app/window_settings_dialog.dart:337-346 | examples/multiple_windows/lib/app/window_settings_dialog.dart:368-377 | examples/multiple_windows/lib/app/window_settings_dialog.dart:399-408 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/multiple_windows/lib/app/window_settings_dialog.dart:337` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:54 — packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:54-63 | packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart:64-73 | packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart:84-93 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart` and `packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:27 — packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:27-36 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:29-38 | packages/flutter/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart:30-39 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart` and `packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×7
  • Recursive walk over a caller-supplied document has no depth cap packages/flutter/lib/src/services/message_codecs.dart:457 — `writeValue` is public and takes `Object ? value` from its caller, and it calls itself at line 457 (`writeValue`) with a piece of `value` (and at line 463) — and nowhere in `writeValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `writeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap engine/src/flutter/tools/engine_tool/lib/src/typed_json.dart:229 — `JsonObject` is public and takes `Map<String, Object ?> _object` from its caller, and it calls itself at line 229 (`JsonObject`) with a piece of `_object` — and nowhere in `JsonObject` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `JsonObject` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:46 — `unwrap` is not private and takes `Object o` from its caller, and it calls itself at line 46 with a piece of `o` (and at line 56) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `unwrap` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:80 — `wrap` is not private and takes `Object o` from its caller, and it calls itself at line 80 with a piece of `o` (and at line 91) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `wrap` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java:276 — `writeValue` is not private and takes `Object value` from its caller, and it calls itself at line 276 with a piece of `value` (and at line 283, line 284) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `writeValue` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java:485 — `fromJson` is not private and takes `JSONObject json` from its caller, and it calls itself at line 485 with a piece of `json` (and at line 519, line 522, line 568) — and nowhere in the walk is a depth or nesting counter compared with a bound, nor is the parser that builds the document given a nesting limit in this file. The walk therefore spends one stack frame (more through a lambda or a stream) per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes; javac turns no recursive call into a loop. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25). org.json, the W3C DOM, dom4j and StAX set no nesting limit of their own, Jackson before 2.15 none and 2.15+ 1,000 — on a cold JVM past the point the walk fails — and a `Map<String, Object>` tree is as deep as whatever built it. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (Exception e)` around the call does not stop it, and the request or the thread dies with it. Thread a depth argument through `fromJson` and reject the value past a fixed maximum, configure the parser's nesting limit (`StreamReadConstraints.maxNestingDepth`, SnakeYAML's `setNestingDepthLimit`), or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:345 — `writeValue` is public and takes `dynamic value` from its caller, and it calls itself at line 345 (`writeValue`) with a piece of `value` (and at line 351) — and nowhere in `writeValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `writeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×6
  • Edited copy of a member (41 corresponding lines) packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:264 — packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:264-304 | packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart:306-347 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) packages/flutter/lib/src/material/tooltip.dart:320 — packages/flutter/lib/src/material/tooltip.dart:320-381 | packages/flutter/lib/src/material/tooltip_theme.dart:250-290 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) packages/flutter_tools/lib/src/artifacts.dart:506 — packages/flutter_tools/lib/src/artifacts.dart:506-546 | packages/flutter_tools/lib/src/artifacts.dart:548-598 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) packages/flutter/lib/src/cupertino/nav_bar.dart:3112 — packages/flutter/lib/src/cupertino/nav_bar.dart:3112-3152 | packages/flutter/lib/src/cupertino/nav_bar.dart:3426-3466 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) dev/integration_tests/new_gallery/lib/pages/settings_list_item.dart:28 — dev/integration_tests/new_gallery/lib/pages/settings_list_item.dart:28-68 | dev/integration_tests/new_gallery/lib/pages/settings_list_item.dart:259-310 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (41 corresponding lines) packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart:93 — packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart:93-139 | packages/flutter/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart:101-141 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×6
  • Edited copies of one member (3 members, 15+ corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:145 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:145-159 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:171-187 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:249-265 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) packages/flutter/lib/src/cupertino/nav_bar.dart:1710 — packages/flutter/lib/src/cupertino/nav_bar.dart:1710-1726 | packages/flutter/lib/src/rendering/animated_size.dart:402-418 | packages/flutter/lib/src/rendering/shifted_box.dart:904-918 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) packages/flutter/lib/src/material/checkbox.dart:885 — packages/flutter/lib/src/material/checkbox.dart:885-899 | packages/flutter/lib/src/material/radio.dart:900-914 | packages/flutter/lib/src/material/switch.dart:2146-2160 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) packages/flutter_tools/lib/src/commands/build_apk.dart:23 — packages/flutter_tools/lib/src/commands/build_apk.dart:23-41 | packages/flutter_tools/lib/src/commands/build_appbundle.dart:28-47 | packages/flutter_tools/lib/src/commands/build_ios.dart:909-923 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) packages/flutter_test/lib/src/matchers.dart:2277 — packages/flutter_test/lib/src/matchers.dart:2277-2293 | packages/flutter_test/lib/src/matchers.dart:2321-2335 | packages/flutter_test/lib/src/matchers.dart:2359-2373 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart:27 — packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart:27-42 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.0.dart:27-42 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.1.dart:27-41 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×6
  • Edited copies of one member (4 members, 12+ corresponding lines) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:368 — engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:368-379 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:472-483 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:519-541 | engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:635-650 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) dev/devicelab/lib/framework/devices.dart:236 — dev/devicelab/lib/framework/devices.dart:236-248 | dev/devicelab/lib/framework/devices.dart:525-536 | dev/devicelab/lib/framework/devices.dart:952-964 | dev/devicelab/lib/framework/devices.dart:1556-1568 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/flutter/lib/src/rendering/shifted_box.dart:1203 — packages/flutter/lib/src/rendering/shifted_box.dart:1203-1214 | packages/flutter/lib/src/rendering/shifted_box.dart:1216-1227 | packages/flutter/lib/src/rendering/shifted_box.dart:1229-1240 | packages/flutter/lib/src/rendering/shifted_box.dart:1242-1253 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:4123 — packages/flutter/lib/src/rendering/proxy_box.dart:4123-4134 | packages/flutter/lib/src/rendering/proxy_box.dart:4136-4147 | packages/flutter/lib/src/rendering/proxy_box.dart:4149-4160 | packages/flutter/lib/src/rendering/proxy_box.dart:4162-4173 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/flutter/examples/api/lib/material/scaffold/scaffold.0.dart:30 — packages/flutter/examples/api/lib/material/scaffold/scaffold.0.dart:30-41 | packages/flutter/examples/api/lib/material/scaffold/scaffold.1.dart:30-42 | packages/flutter/examples/api/lib/widgets/navigator/navigator.restorable_push_replacement.0.dart:47-63 | packages/flutter/examples/api/lib/widgets/navigator/navigator_state.restorable_push_replacement.0.dart:47-63 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:183 — packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:183-197 | packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.1.dart:267-278 | packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.2.dart:159-172 | packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.3.dart:250-263 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×6
  • Outbound HTTP without resilience dev/bots/luci_resultdb.dart:54 — `HttpClient()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience dev/bots/prepare_package/archive_creator.dart:337 — `http.Client(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience engine/src/build/linux/sysroot_scripts/install-sysroot.py:135 — `urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience packages/flutter_tools/lib/src/cache.dart:249 — `HttpClient()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience packages/flutter_tools/lib/src/doctor.dart:192 — `HttpClient()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience packages/flutter_tools/lib/src/reporting/crash_reporting.dart:121 — `http.Client(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×5
  • Edited copy of a member (42 corresponding lines) packages/flutter/lib/src/rendering/flex.dart:571 — packages/flutter/lib/src/rendering/flex.dart:571-612 | packages/flutter/lib/src/rendering/wrap.dart:447-495 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) dev/manual_tests/lib/material_arc.dart:173 — dev/manual_tests/lib/material_arc.dart:173-214 | dev/manual_tests/lib/material_arc.dart:332-383 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) packages/flutter/examples/api/lib/material/chip/chip_attributes.avatar_box_constraints.0.dart:25 — packages/flutter/examples/api/lib/material/chip/chip_attributes.avatar_box_constraints.0.dart:25-66 | packages/flutter/examples/api/lib/material/chip/deletable_chip_attributes.delete_icon_box_constraints.0.dart:25-66 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_container_transition.dart:343 — dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_container_transition.dart:343-384 | dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_container_transition.dart:392-437 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:26 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:26-67 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart:26-74 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×5
  • Edited copy of a member (34 corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java:45 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java:45-84 | engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel2.java:58-91 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:101 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:101-134 | packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart:110-143 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) packages/flutter/examples/api/lib/material/tabs/tab_bar.onFocusChange.dart:30 — packages/flutter/examples/api/lib/material/tabs/tab_bar.onFocusChange.dart:30-78 | packages/flutter/examples/api/lib/material/tabs/tab_bar.onHover.dart:34-67 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) packages/flutter/examples/api/lib/widgets/transitions/positioned_transition.0.dart:44 — packages/flutter/examples/api/lib/widgets/transitions/positioned_transition.0.dart:44-82 | packages/flutter/examples/api/lib/widgets/transitions/relative_positioned_transition.0.dart:44-77 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart:57 — packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.0.dart:57-95 | packages/flutter/examples/api/lib/widgets/overscroll_indicator/glowing_overscroll_indicator.1.dart:57-90 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 13+ corresponding lines) packages/flutter/lib/src/material/banner_theme.dart:151 — packages/flutter/lib/src/material/banner_theme.dart:151-166 | packages/flutter/lib/src/material/bottom_app_bar_theme.dart:315-327 | packages/flutter/lib/src/material/carousel_theme.dart:144-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:5876 — packages/flutter/lib/src/material/input_decorator.dart:5876-5888 | packages/flutter/lib/src/material/input_decorator.dart:5890-5902 | packages/flutter/lib/src/material/input_decorator.dart:5904-5919 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) packages/flutter/lib/src/painting/gradient.dart:580 — packages/flutter/lib/src/painting/gradient.dart:580-592 | packages/flutter/lib/src/painting/gradient.dart:894-908 | packages/flutter/lib/src/painting/gradient.dart:1211-1224 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) dev/devicelab/lib/framework/devices.dart:552 — dev/devicelab/lib/framework/devices.dart:552-564 | dev/devicelab/lib/framework/devices.dart:983-995 | dev/devicelab/lib/framework/devices.dart:1576-1588 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java:488 — engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java:488-500 | engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java:538-556 | engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java:606-618 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 16+ corresponding lines) packages/flutter/lib/src/painting/gradient.dart:553 — packages/flutter/lib/src/painting/gradient.dart:553-568 | packages/flutter/lib/src/painting/gradient.dart:863-880 | packages/flutter/lib/src/painting/gradient.dart:1182-1198 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) engine/src/flutter/lib/ui/text.dart:3005 — engine/src/flutter/lib/ui/text.dart:3005-3020 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:88-106 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:1264-1282 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart:25 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart:25-40 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart:42-60 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/shader.dart:62-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) packages/flutter/examples/api/lib/material/selection_area/selection_area.0.dart:14 — packages/flutter/examples/api/lib/material/selection_area/selection_area.0.dart:14-29 | packages/flutter/examples/api/lib/widgets/selection_container/selection_container.0.dart:15-32 | packages/flutter/examples/api/lib/widgets/selection_container/selection_container_disabled.0.dart:14-33 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 16+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/drawer_demo.dart:232 — dev/integration_tests/flutter_gallery/lib/demo/material/drawer_demo.dart:232-249 | dev/integration_tests/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart:62-79 | packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.2.dart:82-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 8+ corresponding lines) packages/flutter/lib/src/material/material.dart:865 — packages/flutter/lib/src/material/material.dart:865-872 | packages/flutter/lib/src/widgets/basic.dart:1456-1464 | packages/flutter/lib/src/widgets/basic.dart:1548-1555 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java:71 — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java:71-80 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java:35-42 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMethodCodec.java:58-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:200 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:200-213 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:416-429 | packages/flutter/lib/src/painting/stadium_border.dart:270-277 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) dev/integration_tests/android_hardware_smoke_test/lib/main.dart:34 — dev/integration_tests/android_hardware_smoke_test/lib/main.dart:34-41 | dev/integration_tests/windowing_test/lib/main.dart:244-251 | packages/flutter/examples/api/lib/widgets/sliver/decorated_sliver.1.dart:15-24 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) dev/integration_tests/wide_gamut_test/lib/main.dart:168 — dev/integration_tests/wide_gamut_test/lib/main.dart:168-175 | examples/image_list/lib/main.dart:130-137 | packages/flutter/examples/api/lib/foundation/key/value_key.0.dart:16-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×5
  • Duplicated block (29 lines × 2) engine/src/flutter/lib/ui/semantics.dart:1521 — engine/src/flutter/lib/ui/semantics.dart:1521-1549 | engine/src/flutter/lib/web_ui/lib/semantics.dart:469-497 — before extracting anything, compare `engine/src/flutter/lib/ui/semantics.dart` and `engine/src/flutter/lib/web_ui/lib/semantics.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (29 lines × 2) packages/flutter/lib/src/cupertino/date_picker.dart:2774 — packages/flutter/lib/src/cupertino/date_picker.dart:2774-2802 | packages/flutter/lib/src/cupertino/date_picker.dart:2820-2848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:2774` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) packages/flutter/lib/src/services/raw_keyboard_ios.dart:227 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:227-255 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:231-259 — before extracting anything, compare `packages/flutter/lib/src/services/raw_keyboard_ios.dart` and `packages/flutter/lib/src/services/raw_keyboard_macos.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_ios.dart:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart:24 — packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart:24-52 | packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.3.dart:24-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.2.dart:24` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) packages/flutter/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart:69 — packages/flutter/examples/api/lib/services/keyboard_key/logical_keyboard_key.0.dart:69-97 | packages/flutter/examples/api/lib/services/keyboard_key/physical_keyboard_key.0.dart:70-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×5
  • Duplicated block (26 lines × 2) packages/flutter/lib/src/material/about.dart:446 — packages/flutter/lib/src/material/about.dart:446-471 | packages/flutter/lib/src/material/about.dart:528-553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) packages/flutter/lib/src/rendering/viewport.dart:1428 — packages/flutter/lib/src/rendering/viewport.dart:1428-1453 | packages/flutter/lib/src/widgets/single_child_scroll_view.dart:642-667 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (26 lines × 2) packages/flutter_tools/lib/src/commands/create.dart:1032 — packages/flutter_tools/lib/src/commands/create.dart:1032-1057 | packages/flutter_tools/lib/src/commands/create.dart:1120-1145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/create.dart:1032` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:84 — packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:84-109 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart:85-110 — before extracting anything, compare `packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart` and `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:84` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:109 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:109-134 | packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart:118-143 — before extracting anything, compare `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart` and `packages/flutter/examples/api/lib/rendering/growth_direction/growth_direction.0.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×5
  • Duplicated block (21–22 lines × 2) engine/src/flutter/lib/web_ui/dev/package_roller.dart:217 — engine/src/flutter/lib/web_ui/dev/package_roller.dart:217-237 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:264-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/dev/package_roller.dart:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21–22 lines × 2) packages/flutter/lib/src/material/menu_style.dart:349 — packages/flutter/lib/src/material/menu_style.dart:349-369 | packages/flutter/lib/src/material/search_bar_theme.dart:221-242 — before extracting anything, compare `packages/flutter/lib/src/material/menu_style.dart` and `packages/flutter/lib/src/material/search_bar_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/search_bar_theme.dart:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21–22 lines × 2) packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:62 — packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:62-83 | packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:141-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21–22 lines × 2) packages/flutter/lib/src/services/raw_keyboard_linux.dart:303 — packages/flutter/lib/src/services/raw_keyboard_linux.dart:303-323 | packages/flutter/lib/src/services/raw_keyboard_linux.dart:433-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_linux.dart:303` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21–22 lines × 2) packages/flutter/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart:46 — packages/flutter/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart:46-66 | packages/flutter/examples/api/lib/widgets/shortcuts/single_activator.0.dart:45-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×5
  • Duplicated block (19 lines × 3) engine/src/flutter/lib/web_ui/dev/package_roller.dart:230 — engine/src/flutter/lib/web_ui/dev/package_roller.dart:230-248 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:278-296 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:325-343 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/dev/package_roller.dart:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:208 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:208-226 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:384-402 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:475-493 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (19 lines × 3) packages/flutter/lib/src/cupertino/text_field.dart:1028 — packages/flutter/lib/src/cupertino/text_field.dart:1028-1046 | packages/flutter/lib/src/material/text_field.dart:1122-1140 | packages/flutter/lib/src/widgets/editable_text.dart:2523-2541 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/text_field.dart:1028` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 3) packages/flutter/lib/src/rendering/paragraph.dart:1919 — packages/flutter/lib/src/rendering/paragraph.dart:1919-1937 | packages/flutter/lib/src/rendering/paragraph.dart:1992-2010 | packages/flutter/lib/src/rendering/paragraph.dart:2907-2925 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (19 lines × 3) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:499 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:499-517 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:745-763 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:998-1016 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×5
  • Duplicated block (13–14 lines × 2) engine/src/flutter/lib/ui/painting.dart:8304 — engine/src/flutter/lib/ui/painting.dart:8304-8317 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:446-458 — before extracting anything, compare `engine/src/flutter/lib/ui/painting.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/ui/painting.dart:8304` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `blendMode` to `BlendMode` in one and `ui.BlendMode` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13–14 lines × 2) packages/flutter/lib/src/cupertino/nav_bar.dart:3139 — packages/flutter/lib/src/cupertino/nav_bar.dart:3139-3152 | packages/flutter/lib/src/cupertino/nav_bar.dart:3454-3466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/nav_bar.dart:3139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13–14 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1504 — packages/flutter/lib/src/rendering/editable.dart:1504-1516 | packages/flutter/lib/src/rendering/paragraph.dart:1455-1468 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/editable.dart:1504` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) packages/flutter/lib/src/rendering/flex.dart:1228 — packages/flutter/lib/src/rendering/flex.dart:1228-1241 | packages/flutter/lib/src/rendering/flex.dart:1266-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/flex.dart:1228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) dev/integration_tests/new_gallery/lib/studies/crane/fly_form.dart:45 — dev/integration_tests/new_gallery/lib/studies/crane/fly_form.dart:45-57 | dev/integration_tests/new_gallery/lib/studies/crane/sleep_form.dart:42-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/studies/crane/fly_form.dart:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) packages/flutter/lib/src/material/range_slider_parts.dart:528 — packages/flutter/lib/src/material/range_slider_parts.dart:528-538 | packages/flutter/lib/src/material/slider_parts.dart:333-343 | packages/flutter/lib/src/material/slider_parts.dart:467-477 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:528` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:49 — dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:49-59 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:62-72 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:75-85 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:56 — dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:56-66 | dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:98-108 | dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:140-150 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 3) packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:62 — packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:62-72 | packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart:94-104 | packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart:128-138 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart` and `packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) packages/flutter/examples/api/lib/widgets/animated_size/animated_size.0.dart:17 — packages/flutter/examples/api/lib/widgets/animated_size/animated_size.0.dart:17-27 | packages/flutter/examples/api/lib/widgets/implicit_animations/animated_positioned.0.dart:17-27 | packages/flutter/examples/api/lib/widgets/implicit_animations/sliver_animated_opacity.0.dart:17-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×5
  • Duplicated block (6 lines × 4) dev/bots/analyze.dart:913 — dev/bots/analyze.dart:913-918 | dev/bots/analyze.dart:921-926 | dev/bots/analyze.dart:929-934 | dev/bots/analyze.dart:937-942 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) packages/flutter/lib/src/gestures/drag_details.dart:88 — packages/flutter/lib/src/gestures/drag_details.dart:88-93 | packages/flutter/lib/src/gestures/drag_details.dart:175-180 | packages/flutter/lib/src/gestures/tap_and_drag.dart:220-225 | packages/flutter/lib/src/gestures/tap_and_drag.dart:331-336 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/drag_details.dart:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/gestures/tap_and_drag.dart:227` calls `add`, `IntProperty` and `packages/flutter/lib/src/gestures/drag_details.dart:95` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 4) packages/flutter/lib/src/rendering/flex.dart:829 — packages/flutter/lib/src/rendering/flex.dart:829-834 | packages/flutter/lib/src/rendering/flex.dart:836-841 | packages/flutter/lib/src/rendering/wrap.dart:573-578 | packages/flutter/lib/src/rendering/wrap.dart:580-585 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 4) dev/integration_tests/new_gallery/lib/feature_discovery/feature_discovery.dart:275 — dev/integration_tests/new_gallery/lib/feature_discovery/feature_discovery.dart:275-280 | dev/integration_tests/new_gallery/lib/feature_discovery/feature_discovery.dart:291-297 | dev/integration_tests/new_gallery/lib/feature_discovery/feature_discovery.dart:308-313 | dev/integration_tests/new_gallery/lib/feature_discovery/feature_discovery.dart:325-331 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/feature_discovery/feature_discovery.dart:275` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `duration` to `const Duration(milliseconds: 1000)` in one and `const Duration(milliseconds: 250)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 4) dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:53 — dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:53-58 | dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:100-105 | dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:288-293 | dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:336-341 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart` and `dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:283` calls `_CustomRangeThumbShape` and `dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:49` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×5
  • Duplicated block (5 lines × 3) dev/tools/gen_defaults/lib/range_slider_template.dart:66 — dev/tools/gen_defaults/lib/range_slider_template.dart:66-70 | dev/tools/gen_defaults/lib/slider_template.dart:81-85 | dev/tools/gen_defaults/lib/snackbar_template.dart:56-60 — before extracting anything, compare `dev/tools/gen_defaults/lib/range_slider_template.dart` and `dev/tools/gen_defaults/lib/slider_template.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/range_slider_template.dart:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 3) packages/flutter/lib/src/rendering/proxy_sliver.dart:95 — packages/flutter/lib/src/rendering/proxy_sliver.dart:95-99 | packages/flutter/lib/src/rendering/viewport.dart:1926-1931 | packages/flutter/lib/src/widgets/sliver_resizing_header.dart:232-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) packages/flutter/lib/src/rendering/proxy_sliver.dart:266 — packages/flutter/lib/src/rendering/proxy_sliver.dart:266-270 | packages/flutter/lib/src/widgets/basic.dart:7739-7743 | packages/flutter/lib/src/widgets/sliver.dart:1445-1449 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (5 lines × 3) packages/flutter/lib/src/widgets/basic.dart:2350 — packages/flutter/lib/src/widgets/basic.dart:2350-2354 | packages/flutter/lib/src/widgets/basic.dart:4036-4040 | packages/flutter/lib/src/widgets/implicit_animations.dart:912-916 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 3) packages/flutter/examples/api/lib/material/autocomplete/autocomplete.3.dart:77 — packages/flutter/examples/api/lib/material/autocomplete/autocomplete.3.dart:77-81 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.4.dart:96-100 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.4.dart:66-70 — before extracting anything, compare `packages/flutter/examples/api/lib/material/autocomplete/autocomplete.3.dart` and `packages/flutter/examples/api/lib/material/autocomplete/autocomplete.4.dart` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D5 · Coupling · Off the main sequence · ×5
  • Off the main sequence: git_repo_tools — git_repo_tools: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: fuchsia_remote_debug_protocol — fuchsia_remote_debug_protocol: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: flutter — flutter: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: engine_repo_tools — engine_repo_tools: abstractness 0.13, instability 0.00, distance 0.88 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
  • Off the main sequence: flutter_tools_core — flutter_tools_core: abstractness 0.23, instability 0.00, distance 0.77 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
D15 · Churn × Complexity Hotspots · Repeated repair · ×4
  • Repeated repair: engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:623 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is PlatformViewsController2.maybeApplyClipToSurfaceView at line 623), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “[Android] Fix HCPP frame synchronization when multiple frames run before a Choreographer traversal (#194591)”; “[Android] Fix use-after-free of SurfaceControl.Transaction in HCPP (#192969)”; “[Android] Fix the HCPP SurfaceControl transaction-list race and split the transaction entry points (#192606)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/flutter/lib/src/widgets/raw_tooltip.dart packages/flutter/lib/src/widgets/raw_tooltip.dart:97 — packages/flutter/lib/src/widgets/raw_tooltip.dart changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is TooltipPositionContext.== at line 97), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Reland "fix(widgets): dismiss open RawTooltip on Escape key (WCAG 1.4.13)" (#193192)”; “Revert: fix(widgets): dismiss open RawTooltip on Escape key (WCAG 1.4.13) (#193183)”; “fix(widgets): dismiss open RawTooltip on Escape key (WCAG 1.4.13) (#192966)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter/lib/src/widgets/raw_tooltip.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java:1507 — engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is FlutterJNI.computePlatformResolvedLocale at line 1507), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “[Android] Fix HCPP frame synchronization when multiple frames run before a Choreographer traversal (#194591)”; “[Android] Fix use-after-free of SurfaceControl.Transaction in HCPP (#192969)”; “[Android] Fix the HCPP SurfaceControl transaction-list race and split the transaction entry points (#192606)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/flutter_tools/lib/src/widget_preview/dtd_services.dart packages/flutter_tools/lib/src/widget_preview/dtd_services.dart:244 — packages/flutter_tools/lib/src/widget_preview/dtd_services.dart changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is WidgetPreviewDtdServices._waitForLspServiceHelper at line 244), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Reland "[flutter_tools] Fix DTD "Stream already subscribed" error and wait for analysis over DTD in widget preview" (#193658)”; “Revert: [flutter_tools] Fix DTD "Stream already subscribed" error and wait for analysis over DTD in widget preview (#193637)”; “[flutter_tools] Fix DTD "Stream already subscribed" error and wait for analysis over DTD in widget preview (#192930)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:42:38 +00:00' --until='2026-11-16 21:42:38 +00:00' --full-history --no-merges -- packages/flutter_tools/lib/src/widget_preview/dtd_services.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×4
  • Edited copy of a member (35 corresponding lines) engine/src/flutter/lib/ui/geometry.dart:1420 — engine/src/flutter/lib/ui/geometry.dart:1420-1454 | engine/src/flutter/lib/web_ui/lib/geometry.dart:655-691 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) packages/flutter/lib/src/widgets/text_selection.dart:755 — packages/flutter/lib/src/widgets/text_selection.dart:755-789 | packages/flutter/lib/src/widgets/text_selection.dart:925-959 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:62 — packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:62-99 | packages/flutter/lib/src/material/predictive_back_page_transitions_builder.dart:141-175 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) packages/flutter/examples/api/lib/material/tabs/tab_bar.3.dart:116 — packages/flutter/examples/api/lib/material/tabs/tab_bar.3.dart:116-150 | packages/flutter/examples/api/lib/material/tabs/tab_bar.3.dart:157-191 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×4
  • Edited copy of a member (49 corresponding lines) packages/flutter/lib/src/gestures/velocity_tracker.dart:347 — packages/flutter/lib/src/gestures/velocity_tracker.dart:347-397 | packages/flutter/lib/src/gestures/velocity_tracker.dart:420-468 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) packages/flutter/lib/src/material/filter_chip.dart:246 — packages/flutter/lib/src/material/filter_chip.dart:246-294 | packages/flutter/lib/src/material/input_chip.dart:215-264 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:234 — dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:234-282 | dev/integration_tests/new_gallery/lib/studies/shrine/backdrop.dart:214-262 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (49 corresponding lines) packages/flutter/examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart:26 — packages/flutter/examples/api/lib/cupertino/activity_indicator/cupertino_activity_indicator.0.dart:26-74 | packages/flutter/examples/api/lib/cupertino/activity_indicator/cupertino_linear_activity_indicator.0.dart:26-76 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 26+ corresponding lines) engine/src/flutter/lib/ui/semantics.dart:1617 — engine/src/flutter/lib/ui/semantics.dart:1617-1648 | engine/src/flutter/lib/web_ui/lib/semantics.dart:564-589 | engine/src/flutter/lib/web_ui/lib/semantics.dart:591-617 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 26+ corresponding lines) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:60 — packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:60-88 | packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:90-126 | packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:170-195 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 26+ corresponding lines) packages/flutter_tools/lib/src/base/logger.dart:453 — packages/flutter_tools/lib/src/base/logger.dart:453-481 | packages/flutter_tools/lib/src/base/logger.dart:483-508 | packages/flutter_tools/lib/src/base/logger.dart:510-539 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 26+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:19 — engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:19-44 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:46-74 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:115-145 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 33+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 33+ corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:2518 — packages/flutter/lib/src/cupertino/date_picker.dart:2518-2550 | packages/flutter/lib/src/cupertino/date_picker.dart:2577-2623 | packages/flutter/lib/src/cupertino/date_picker.dart:2650-2692 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 33+ corresponding lines) packages/flutter/lib/src/services/raw_keyboard_android.dart:267 — packages/flutter/lib/src/services/raw_keyboard_android.dart:267-304 | packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart:148-180 | packages/flutter/lib/src/services/raw_keyboard_windows.dart:176-210 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 33+ corresponding lines) packages/flutter/lib/src/material/toggle_buttons.dart:585 — packages/flutter/lib/src/material/toggle_buttons.dart:585-621 | packages/flutter/lib/src/material/toggle_buttons.dart:623-655 | packages/flutter/lib/src/material/toggle_buttons.dart:657-697 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 33+ corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:206 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:206-238 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:438-472 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2015-2048 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 23+ corresponding lines) packages/flutter/lib/src/rendering/sliver_group.dart:205 — packages/flutter/lib/src/rendering/sliver_group.dart:205-229 | packages/flutter/lib/src/rendering/viewport.dart:1878-1900 | packages/flutter/lib/src/rendering/viewport.dart:1902-1924 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) packages/flutter/lib/src/widgets/_window.dart:2038 — packages/flutter/lib/src/widgets/_window.dart:2038-2061 | packages/flutter/lib/src/widgets/framework.dart:5231-5253 | packages/flutter/lib/src/widgets/shared_app_data.dart:138-165 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:145 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:145-167 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:165-187 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:189-214 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 23+ corresponding lines) dev/manual_tests/lib/card_collection.dart:279 — dev/manual_tests/lib/card_collection.dart:279-301 | dev/manual_tests/lib/card_collection.dart:303-325 | dev/manual_tests/lib/card_collection.dart:327-349 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 18+ corresponding lines) packages/flutter/lib/src/material/filled_button.dart:620 — packages/flutter/lib/src/material/filled_button.dart:620-637 | packages/flutter/lib/src/material/filled_button.dart:761-778 | packages/flutter/lib/src/material/menu_anchor.dart:4110-4127 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) engine/src/flutter/lib/web_ui/lib/painting.dart:362 — engine/src/flutter/lib/web_ui/lib/painting.dart:362-379 | engine/src/flutter/lib/web_ui/lib/painting.dart:381-402 | engine/src/flutter/lib/web_ui/lib/painting.dart:404-423 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:170 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:170-187 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:217-238 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:241-262 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 18+ corresponding lines) packages/flutter_test/lib/src/binding.dart:1037 — packages/flutter_test/lib/src/binding.dart:1037-1056 | packages/flutter_test/lib/src/binding.dart:1058-1075 | packages/flutter_test/lib/src/binding.dart:1077-1094 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 9+ corresponding lines) packages/flutter/lib/src/services/text_editing_delta.dart:345 — packages/flutter/lib/src/services/text_editing_delta.dart:345-353 | packages/flutter/lib/src/services/text_editing_delta.dart:398-406 | packages/flutter/lib/src/services/text_editing_delta.dart:461-470 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) engine/src/flutter/lib/ui/compositing.dart:672 — engine/src/flutter/lib/ui/compositing.dart:672-680 | engine/src/flutter/lib/ui/compositing.dart:803-815 | engine/src/flutter/lib/ui/compositing.dart:870-889 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:103 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:103-111 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:113-123 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:125-133 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) examples/layers/rendering/src/sector_layout.dart:235 — examples/layers/rendering/src/sector_layout.dart:235-243 | packages/flutter/lib/src/rendering/object.dart:4644-4652 | packages/flutter/lib/src/widgets/overlay.dart:1573-1582 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 12+ corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:792 — packages/flutter/lib/src/cupertino/date_picker.dart:792-803 | packages/flutter/lib/src/cupertino/date_picker.dart:1399-1410 | packages/flutter/lib/src/cupertino/date_picker.dart:1836-1847 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) packages/flutter/lib/src/widgets/editable_text.dart:5459 — packages/flutter/lib/src/widgets/editable_text.dart:5459-5470 | packages/flutter/lib/src/widgets/editable_text.dart:5472-5483 | packages/flutter/lib/src/widgets/editable_text.dart:5485-5497 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) packages/flutter/lib/src/material/button_bar.dart:293 — packages/flutter/lib/src/material/button_bar.dart:293-305 | packages/flutter/lib/src/material/tabs.dart:410-421 | packages/flutter/lib/src/widgets/basic.dart:5525-5538 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) packages/flutter/examples/api/lib/material/switch/switch.3.dart:15 — packages/flutter/examples/api/lib/material/switch/switch.3.dart:15-28 | packages/flutter/examples/api/lib/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0.dart:15-26 | packages/flutter/examples/api/lib/widgets/sliver/decorated_sliver.0.dart:12-25 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 7+ corresponding lines) packages/flutter/lib/src/rendering/stack.dart:750 — packages/flutter/lib/src/rendering/stack.dart:750-757 | packages/flutter/lib/src/widgets/basic.dart:3237-3243 | packages/flutter/lib/src/widgets/basic.dart:4869-4876 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) packages/flutter/lib/src/material/input_decorator.dart:5817 — packages/flutter/lib/src/material/input_decorator.dart:5817-5823 | packages/flutter/lib/src/material/input_decorator.dart:5825-5831 | packages/flutter/lib/src/material/input_decorator.dart:5949-5955 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) packages/flutter/lib/src/cupertino/text_field.dart:1177 — packages/flutter/lib/src/cupertino/text_field.dart:1177-1183 | packages/flutter/lib/src/material/selectable_text.dart:578-584 | packages/flutter/lib/src/material/text_field.dart:1365-1373 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) packages/flutter/lib/src/cupertino/text_selection_toolbar.dart:1237 — packages/flutter/lib/src/cupertino/text_selection_toolbar.dart:1237-1246 | packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart:388-394 | packages/flutter/lib/src/rendering/table.dart:925-931 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 4+ corresponding lines) packages/flutter/lib/src/material/input_border.dart:200 — packages/flutter/lib/src/material/input_border.dart:200-203 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:106-109 | packages/flutter/lib/src/painting/stadium_border.dart:400-403 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) packages/flutter/lib/src/material/input_border.dart:418 — packages/flutter/lib/src/material/input_border.dart:418-422 | packages/flutter/lib/src/painting/circle_border.dart:80-83 | packages/flutter/lib/src/painting/stadium_border.dart:246-250 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) packages/flutter/lib/src/material/input_border.dart:205 — packages/flutter/lib/src/material/input_border.dart:205-208 | packages/flutter/lib/src/painting/box_border.dart:236-243 | packages/flutter/lib/src/painting/stadium_border.dart:262-265 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/dialog_demo.dart:38 — dev/integration_tests/new_gallery/lib/demos/material/dialog_demo.dart:38-44 | dev/integration_tests/new_gallery/lib/demos/material/menu_demo.dart:24-27 | dev/integration_tests/new_gallery/lib/demos/material/text_field_demo.dart:141-144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) packages/flutter/lib/src/cupertino/segmented_control.dart:793 — packages/flutter/lib/src/cupertino/segmented_control.dart:793-817 | packages/flutter/lib/src/material/segmented_button.dart:1034-1058 — before extracting anything, compare `packages/flutter/lib/src/cupertino/segmented_control.dart` and `packages/flutter/lib/src/material/segmented_button.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) packages/flutter/lib/src/material/carousel.dart:1588 — packages/flutter/lib/src/material/carousel.dart:1588-1612 | packages/flutter/lib/src/material/carousel.dart:1869-1893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart:132 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo.dart:132-156 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo.dart:172-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (25 lines × 2) packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:130 — packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:130-154 | packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.1.dart:206-230 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×4
  • Duplicated block (18 lines × 3) packages/flutter/lib/src/cupertino/text_field.dart:934 — packages/flutter/lib/src/cupertino/text_field.dart:934-951 | packages/flutter/lib/src/material/text_field.dart:1007-1024 | packages/flutter/lib/src/widgets/editable_text.dart:2438-2455 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (18 lines × 3) packages/flutter/lib/src/material/button_style.dart:621 — packages/flutter/lib/src/material/button_style.dart:621-638 | packages/flutter/lib/src/material/menu_style.dart:353-370 | packages/flutter/lib/src/material/search_bar_theme.dart:226-243 — before extracting anything, compare `packages/flutter/lib/src/material/button_style.dart` and `packages/flutter/lib/src/material/menu_style.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/button_style.dart:621` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/material/button_style.dart:641` calls `add` and `packages/flutter/lib/src/material/search_bar_theme.dart:244` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 3) packages/flutter/lib/src/rendering/paragraph.dart:2280 — packages/flutter/lib/src/rendering/paragraph.dart:2280-2297 | packages/flutter/lib/src/rendering/paragraph.dart:2487-2504 | packages/flutter/lib/src/rendering/paragraph.dart:2739-2756 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2280` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 3) packages/flutter/lib/src/semantics/semantics.dart:571 — packages/flutter/lib/src/semantics/semantics.dart:571-588 | packages/flutter/lib/src/semantics/semantics.dart:591-608 | packages/flutter/lib/src/semantics/semantics.dart:611-628 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×4
  • Duplicated block (16 lines × 3) engine/src/flutter/lib/web_ui/dev/package_roller.dart:208 — engine/src/flutter/lib/web_ui/dev/package_roller.dart:208-223 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:303-318 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:348-363 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (16 lines × 3) packages/flutter/lib/src/services/raw_keyboard_ios.dart:150 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:150-165 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:154-169 | packages/flutter/lib/src/services/raw_keyboard_windows.dart:112-127 — before extracting anything, compare `packages/flutter/lib/src/services/raw_keyboard_ios.dart` and `packages/flutter/lib/src/services/raw_keyboard_macos.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_ios.dart:150` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:69 — engine/src/flutter/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java:69-84 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/EventChannel.java:79-94 | engine/src/flutter/shell/platform/android/io/flutter/plugin/common/MethodChannel.java:77-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `codec` to `MessageCodec<T>` in one and `MethodCodec` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 3) packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:145 — packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:145-162 | packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:189-206 | packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:225-240 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/painting/linear_border/linear_border.0.dart:145` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×4
  • Duplicated block (13 lines × 3) packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:186 — packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:186-198 | packages/flutter/lib/src/material/dropdown_menu.dart:1684-1696 | packages/flutter/lib/src/material/list_tile.dart:1750-1762 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 3) packages/flutter/lib/src/cupertino/segmented_control.dart:856 — packages/flutter/lib/src/cupertino/segmented_control.dart:856-868 | REDACTED:1507-1519 | packages/flutter/lib/src/material/segmented_button.dart:1170-1182 — before extracting anything, compare `packages/flutter/lib/src/cupertino/segmented_control.dart` and `REDACTED` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/segmented_control.dart:856` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 3) packages/flutter/lib/src/gestures/events.dart:1060 — packages/flutter/lib/src/gestures/events.dart:1060-1072 | packages/flutter/lib/src/gestures/events.dart:1176-1188 | packages/flutter/lib/src/gestures/events.dart:1322-1334 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:72 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:72-84 | dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:106-118 | dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:158-170 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:156` calls `of` and `dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:71` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×4
  • Duplicated block (12–13 lines × 2) packages/flutter/lib/src/material/segmented_button.dart:1225 — packages/flutter/lib/src/material/segmented_button.dart:1225-1236 | packages/flutter/lib/src/material/time_picker.dart:3874-3886 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/segmented_button.dart:1225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12–13 lines × 2) packages/flutter/lib/src/widgets/container.dart:448 — packages/flutter/lib/src/widgets/container.dart:448-460 | packages/flutter/lib/src/widgets/implicit_animations.dart:721-732 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/container.dart:448` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) examples/multiple_windows/lib/app/main_window.dart:222 — examples/multiple_windows/lib/app/main_window.dart:222-233 | examples/multiple_windows/lib/app/main_window.dart:253-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/multiple_windows/lib/app/main_window.dart:222` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:42 — packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:42-53 | packages/flutter/examples/api/lib/material/search_anchor/search_anchor.4.dart:72-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/search_anchor/search_anchor.3.dart:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×4
  • Duplicated block (10–12 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1397 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1397-1406 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1455-1466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1397` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–12 lines × 2) packages/flutter/lib/src/material/icon_button.dart:1360 — packages/flutter/lib/src/material/icon_button.dart:1360-1371 | packages/flutter/lib/src/material/segmented_button.dart:1239-1248 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/icon_button.dart:1360` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–12 lines × 2) packages/flutter/lib/src/rendering/animated_size.dart:404 — packages/flutter/lib/src/rendering/animated_size.dart:404-415 | packages/flutter/lib/src/rendering/shifted_box.dart:1091-1100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10–12 lines × 2) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:980 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:980-991 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:436-445 — before extracting anything, compare `packages/flutter_tools/lib/src/commands/build_ios_framework.dart` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:980` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:151 — engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:151-161 | engine/src/flutter/tools/engine_tool/lib/src/commands/test_command.dart:41-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2616 — packages/flutter/lib/src/rendering/paragraph.dart:2616-2625 | packages/flutter/lib/src/rendering/paragraph.dart:2879-2889 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2879` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–11 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2627 — packages/flutter/lib/src/rendering/paragraph.dart:2627-2637 | packages/flutter/lib/src/rendering/paragraph.dart:2868-2877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2627` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–11 lines × 2) dev/manual_tests/lib/overlay_geometry.dart:169 — dev/manual_tests/lib/overlay_geometry.dart:169-178 | dev/manual_tests/lib/page_view.dart:33-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/manual_tests/lib/overlay_geometry.dart:169` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×4
  • Duplicated block (10 lines × 5) packages/flutter/lib/src/gestures/events.dart:1068 — packages/flutter/lib/src/gestures/events.dart:1068-1077 | packages/flutter/lib/src/gestures/events.dart:1184-1193 | packages/flutter/lib/src/gestures/events.dart:1330-1339 | packages/flutter/lib/src/gestures/events.dart:1703-1712 | packages/flutter/lib/src/gestures/events.dart:2491-2500 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 5) packages/flutter/lib/src/material/date_picker_theme.dart:1162 — packages/flutter/lib/src/material/date_picker_theme.dart:1162-1171 | packages/flutter/lib/src/material/date_picker_theme.dart:1233-1242 | packages/flutter/lib/src/material/date_picker_theme.dart:1353-1362 | packages/flutter/lib/src/material/date_picker_theme.dart:1420-1429 | packages/flutter/lib/src/material/icon_button.dart:1373-1382 — before extracting anything, compare `packages/flutter/lib/src/material/date_picker_theme.dart` and `packages/flutter/lib/src/material/icon_button.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/date_picker_theme.dart:1162` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 5) packages/flutter/lib/src/material/elevated_button.dart:608 — packages/flutter/lib/src/material/elevated_button.dart:608-617 | packages/flutter/lib/src/material/outlined_button.dart:536-545 | packages/flutter/lib/src/material/radio.dart:949-959 | packages/flutter/lib/src/material/switch.dart:2227-2237 | packages/flutter/lib/src/material/text_button.dart:569-578 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/radio.dart:949` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/switch.dart:2226` calls `contains` and `packages/flutter/lib/src/material/elevated_button.dart:607` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 5) examples/hello_world/macos/Runner/MainFlutterWindow.swift:9 — examples/hello_world/macos/Runner/MainFlutterWindow.swift:9-18 | examples/image_list/macos/Runner/MainFlutterWindow.swift:9-18 | examples/layers/macos/Runner/MainFlutterWindow.swift:9-18 | packages/flutter/examples/api/macos/Runner/MainFlutterWindow.swift:9-18 | packages/flutter_tools/templates/app/macos.tmpl/Runner/MainFlutterWindow.swift:5-14 — before extracting anything, compare `examples/hello_world/macos/Runner/MainFlutterWindow.swift` and `examples/image_list/macos/Runner/MainFlutterWindow.swift` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×4
  • Duplicated block (8–9 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:1952 — engine/src/flutter/lib/ui/platform_dispatcher.dart:1952-1959 | engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:2027-2035 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) packages/flutter/lib/src/cupertino/checkbox.dart:595 — packages/flutter/lib/src/cupertino/checkbox.dart:595-602 | packages/flutter/lib/src/material/checkbox.dart:740-748 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/checkbox.dart:595` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2185 — packages/flutter/lib/src/rendering/paragraph.dart:2185-2192 | packages/flutter/lib/src/rendering/paragraph.dart:2371-2379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2371` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8–9 lines × 2) packages/flutter/lib/src/material/navigation_bar_theme.dart:219 — packages/flutter/lib/src/material/navigation_bar_theme.dart:219-227 | packages/flutter/lib/src/material/navigation_drawer_theme.dart:199-206 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/navigation_bar_theme.dart:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/material/navigation_drawer_theme.dart:207` calls `add` and `packages/flutter/lib/src/material/navigation_bar_theme.dart:227` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 27+ corresponding lines) packages/flutter/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart:40 — packages/flutter/examples/api/lib/widgets/shortcuts/logical_key_set.0.dart:40-66 | packages/flutter/examples/api/lib/widgets/shortcuts/shortcuts.0.dart:44-78 | packages/flutter/examples/api/lib/widgets/shortcuts/single_activator.0.dart:40-66 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 27+ corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/divider_demo.dart:37 — dev/integration_tests/new_gallery/lib/demos/material/divider_demo.dart:37-63 | dev/integration_tests/new_gallery/lib/demos/material/divider_demo.dart:71-103 | packages/flutter/examples/api/lib/material/divider/vertical_divider.0.dart:28-60 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 27+ corresponding lines) dev/integration_tests/new_gallery/lib/studies/crane/eat_form.dart:44 — dev/integration_tests/new_gallery/lib/studies/crane/eat_form.dart:44-75 | dev/integration_tests/new_gallery/lib/studies/crane/fly_form.dart:45-76 | dev/integration_tests/new_gallery/lib/studies/crane/sleep_form.dart:42-68 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 27+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:104 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:104-136 | dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:76-102 | dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:113-146 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
AC4 · Keyboard semantics · Link used as a button (placeholder href) · ×3
  • Link used as a button (placeholder href) dev/snippets/config/skeletons/dartpad-sample.html:5 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) dev/snippets/config/skeletons/sample.html:5 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
  • Link used as a button (placeholder href) dev/snippets/config/skeletons/snippet.html:5 — An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×3
  • Focus outline removed in CSS without a :focus replacement dev/docs/assets/snippets.css:45 — `.snippet-buttons button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement dev/docs/assets/snippets.css:98 — `.anchor-button :focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement dev/docs/assets/snippets.css:128 — `.copy-button :focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×3
  • Edited copy of a member (44 corresponding lines) packages/flutter/lib/src/rendering/sliver_fill.dart:190 — packages/flutter/lib/src/rendering/sliver_fill.dart:190-233 | packages/flutter/lib/src/rendering/sliver_fill.dart:261-323 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) packages/flutter/lib/src/material/range_slider.dart:899 — packages/flutter/lib/src/material/range_slider.dart:899-942 | packages/flutter/lib/src/material/slider.dart:1162-1211 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (44 corresponding lines) packages/flutter/lib/src/cupertino/switch.dart:1257 — packages/flutter/lib/src/cupertino/switch.dart:1257-1300 | packages/flutter/lib/src/material/switch.dart:1732-1782 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×3
  • Edited copy of a member (32 corresponding lines) packages/flutter/lib/src/rendering/flex.dart:228 — packages/flutter/lib/src/rendering/flex.dart:228-265 | packages/flutter/lib/src/rendering/wrap.dart:96-127 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:22 — dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:22-54 | dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MotionEventCodec.java:20-51 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) packages/flutter_test/lib/src/controller.dart:2644 — packages/flutter_test/lib/src/controller.dart:2644-2675 | packages/flutter_test/lib/src/widget_tester.dart:605-636 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 25+ corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:458 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:458-485 | packages/flutter/lib/src/painting/stadium_border.dart:155-179 | packages/flutter/lib/src/painting/stadium_border.dart:333-357 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 25+ corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:487 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:487-514 | packages/flutter/lib/src/painting/stadium_border.dart:181-205 | packages/flutter/lib/src/painting/stadium_border.dart:359-383 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 25+ corresponding lines) dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:33 — dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:33-59 | dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:61-85 | dev/integration_tests/new_gallery/lib/feature_discovery/animation.dart:87-111 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 21+ corresponding lines) packages/flutter/lib/src/widgets/_window_win32.dart:1541 — packages/flutter/lib/src/widgets/_window_win32.dart:1541-1561 | packages/flutter/lib/src/widgets/_window_win32.dart:1568-1591 | packages/flutter/lib/src/widgets/_window_win32.dart:1675-1700 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) packages/flutter/lib/src/services/text_editing_delta.dart:323 — packages/flutter/lib/src/services/text_editing_delta.dart:323-343 | packages/flutter/lib/src/services/text_editing_delta.dart:376-396 | packages/flutter/lib/src/services/text_editing_delta.dart:439-459 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 21+ corresponding lines) dev/integration_tests/new_gallery/lib/studies/rally/tabs/accounts.dart:17 — dev/integration_tests/new_gallery/lib/studies/rally/tabs/accounts.dart:17-37 | dev/integration_tests/new_gallery/lib/studies/rally/tabs/bills.dart:22-47 | dev/integration_tests/new_gallery/lib/studies/rally/tabs/budgets.dart:21-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×3
  • Edited copy of a member (47 corresponding lines) dev/tools/gen_defaults/lib/navigation_rail_template.dart:16 — dev/tools/gen_defaults/lib/navigation_rail_template.dart:16-62 | dev/tools/gen_defaults/lib/progress_indicator_template.dart:15-77 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) packages/flutter/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart:33 — packages/flutter/examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart:33-80 | packages/flutter/examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart:37-83 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (47 corresponding lines) packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.1.dart:57 — packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.1.dart:57-103 | packages/flutter/examples/api/lib/material/progress_indicator/linear_progress_indicator.1.dart:55-101 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 14+ corresponding lines) engine/src/flutter/lib/ui/compositing.dart:687 — engine/src/flutter/lib/ui/compositing.dart:687-708 | engine/src/flutter/lib/ui/compositing.dart:723-736 | engine/src/flutter/lib/ui/compositing.dart:748-766 | engine/src/flutter/lib/ui/compositing.dart:778-791 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 14+ corresponding lines) packages/flutter/lib/src/material/checkbox.dart:864 — packages/flutter/lib/src/material/checkbox.dart:864-878 | packages/flutter/lib/src/material/checkbox.dart:959-976 | packages/flutter/lib/src/material/checkbox.dart:978-995 | packages/flutter/lib/src/material/icon_button.dart:1470-1483 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 14+ corresponding lines) packages/flutter/examples/api/lib/material/scrollbar/scrollbar.0.dart:28 — packages/flutter/examples/api/lib/material/scrollbar/scrollbar.0.dart:28-42 | packages/flutter/examples/api/lib/material/scrollbar/scrollbar.1.dart:35-51 | packages/flutter/examples/api/lib/widgets/scrollbar/raw_scrollbar.1.dart:28-41 | packages/flutter/examples/api/lib/widgets/scrollbar/raw_scrollbar.2.dart:41-57 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×3
  • Edited copies of one member (4 members, 18+ corresponding lines) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:792 — packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:792-809 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:881-900 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:962-980 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1033-1052 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 18+ corresponding lines) packages/flutter/lib/src/widgets/_window_macos.dart:88 — packages/flutter/lib/src/widgets/_window_macos.dart:88-105 | packages/flutter/lib/src/widgets/_window_macos.dart:107-126 | packages/flutter/lib/src/widgets/_window_macos.dart:128-147 | packages/flutter/lib/src/widgets/_window_macos.dart:149-168 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 18+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:157 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:157-174 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:241-258 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/path.dart:752-769 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/path.dart:771-788 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×3
  • Duplicated block (39 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1463 — packages/flutter/lib/src/material/range_slider_parts.dart:1463-1501 | packages/flutter/lib/src/material/slider_parts.dart:1389-1427 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (39 lines × 2) packages/flutter/lib/src/cupertino/switch.dart:1337 — packages/flutter/lib/src/cupertino/switch.dart:1337-1375 | packages/flutter/lib/src/material/switch.dart:1822-1860 — `packages/flutter/lib/src/cupertino/switch.dart` and `packages/flutter/lib/src/material/switch.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 10 separate duplicated blocks between them, totalling at least 157 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/switch.dart:1337` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (39 lines × 2) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:73 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:73-111 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart:80-118 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart` and `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×3
  • Duplicated block (30 lines × 2) packages/flutter/lib/src/rendering/editable.dart:1412 — packages/flutter/lib/src/rendering/editable.dart:1412-1441 | packages/flutter/lib/src/rendering/paragraph.dart:1361-1390 — before extracting anything, compare `packages/flutter/lib/src/rendering/editable.dart` and `packages/flutter/lib/src/rendering/paragraph.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/editable.dart:1412` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 2) engine/src/flutter/lib/ui/platform_dispatcher.dart:1539 — engine/src/flutter/lib/ui/platform_dispatcher.dart:1539-1568 | engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1554-1583 — before extracting anything, compare `engine/src/flutter/lib/ui/platform_dispatcher.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) packages/flutter/examples/api/lib/material/popup_menu/popup_menu.0.dart:33 — packages/flutter/examples/api/lib/material/popup_menu/popup_menu.0.dart:33-62 | packages/flutter/examples/api/lib/material/popup_menu/popup_menu.1.dart:36-65 — before extracting anything, compare `packages/flutter/examples/api/lib/material/popup_menu/popup_menu.0.dart` and `packages/flutter/examples/api/lib/material/popup_menu/popup_menu.1.dart` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×3
  • Duplicated block (21 lines × 3) dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:128 — dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:128-149 | dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:153-173 | dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:183-203 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (21 lines × 3) packages/flutter/lib/src/widgets/_window_win32.dart:534 — packages/flutter/lib/src/widgets/_window_win32.dart:534-554 | packages/flutter/lib/src/widgets/_window_win32.dart:756-776 | packages/flutter/lib/src/widgets/_window_win32.dart:1415-1435 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_window_win32.dart:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/widgets/_window_win32.dart:1436` calls `close` and `packages/flutter/lib/src/widgets/_window_win32.dart:555` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21 lines × 3) dev/integration_tests/android_engine_test/lib/hcpp/platform_view_main.dart:45 — dev/integration_tests/android_engine_test/lib/hcpp/platform_view_main.dart:45-65 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:101-121 | dev/integration_tests/android_engine_test/lib/hcpp/tap_color_change_main.dart:52-72 — before extracting anything, compare `dev/integration_tests/android_engine_test/lib/hcpp/platform_view_main.dart` and `dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×3
  • Duplicated block (19–21 lines × 2) dev/integration_tests/new_gallery/lib/pages/home.dart:881 — dev/integration_tests/new_gallery/lib/pages/home.dart:881-899 | packages/flutter/lib/src/widgets/page_view.dart:616-636 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19–21 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2113 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2113-2133 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2203-2221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–21 lines × 2) packages/flutter/lib/src/material/tooltip.dart:338 — packages/flutter/lib/src/material/tooltip.dart:338-358 | packages/flutter/lib/src/material/tooltip_theme.dart:253-271 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/tooltip.dart:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×3
  • Duplicated block (16 lines × 4) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:142 — engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:142-157 | engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:218-233 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:407-422 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:194-209 — `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) packages/flutter/lib/src/cupertino/app.dart:599 — packages/flutter/lib/src/cupertino/app.dart:599-614 | packages/flutter/lib/src/cupertino/app.dart:635-650 | packages/flutter/lib/src/material/app.dart:1093-1108 | packages/flutter/lib/src/material/app.dart:1129-1144 — `packages/flutter/lib/src/cupertino/app.dart` and `packages/flutter/lib/src/material/app.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 42 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/app.dart:599` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 4) packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:106 — packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.0.dart:106-121 | packages/flutter/examples/api/lib/widgets/sliver/pinned_header_sliver.1.dart:194-209 | packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart:92-107 | packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart:112-127 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/sliver/sliver_floating_header.0.dart` and `packages/flutter/examples/api/lib/widgets/sliver/sliver_resizing_header.0.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×3
  • Duplicated block (9–10 lines × 2) packages/flutter/lib/src/cupertino/desktop_text_selection.dart:168 — packages/flutter/lib/src/cupertino/desktop_text_selection.dart:168-177 | packages/flutter/lib/src/material/desktop_text_selection.dart:185-193 — `packages/flutter/lib/src/cupertino/desktop_text_selection.dart` and `packages/flutter/lib/src/material/desktop_text_selection.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 47 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/cupertino/desktop_text_selection.dart:167` calls `debugCheckHasMediaQuery` and `packages/flutter/lib/src/material/desktop_text_selection.dart:183` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9–10 lines × 2) dev/integration_tests/android_views/lib/motion_events_page.dart:134 — dev/integration_tests/android_views/lib/motion_events_page.dart:134-142 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:114-123 — before extracting anything, compare `dev/integration_tests/android_views/lib/motion_events_page.dart` and `dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_views/lib/motion_events_page.dart:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) packages/flutter/examples/api/lib/widgets/heroes/hero.1.dart:54 — packages/flutter/examples/api/lib/widgets/heroes/hero.1.dart:54-62 | packages/flutter/examples/api/lib/widgets/heroes/hero.1.dart:86-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/heroes/hero.1.dart:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×3
  • Duplicated block (5 lines × 5) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1824 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1824-1828 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1839-1844 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1887-1893 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1912-1917 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1957-1962 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1887` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1965` calls `blur`, `pushBackdropFilter` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1847` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 5) packages/flutter_tools/lib/src/build_system/targets/ios.dart:643 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:643-647 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:367-371 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:393-397 | packages/flutter_tools/lib/src/build_system/targets/web.dart:71-75 | packages/flutter_tools/lib/src/build_system/targets/web.dart:1581-1585 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/ios.dart` and `packages/flutter_tools/lib/src/build_system/targets/macos.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/web.dart:1581` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 5) packages/flutter/lib/src/cupertino/icon_theme_data.dart:60 — packages/flutter/lib/src/cupertino/icon_theme_data.dart:60-64 | packages/flutter/lib/src/material/tabs.dart:226-230 | packages/flutter/lib/src/semantics/semantics.dart:7325-7329 | packages/flutter/lib/src/semantics/semantics.dart:7374-7378 | packages/flutter/lib/src/widgets/scroll_view.dart:1806-1810 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/widgets/scroll_view.dart:1813` calls `_computeActualChildCount`, `max` and `packages/flutter/lib/src/semantics/semantics.dart:7330` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×3
  • Duplicated block (33 lines × 2) dev/tools/gen_keycodes/lib/testing_key_codes_cc_gen.dart:21 — dev/tools/gen_keycodes/lib/testing_key_codes_cc_gen.dart:21-53 | dev/tools/gen_keycodes/lib/testing_key_codes_java_gen.dart:31-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (33 lines × 2) packages/flutter/examples/api/lib/material/segmented_button/segmented_button.0.dart:54 — packages/flutter/examples/api/lib/material/segmented_button/segmented_button.0.dart:54-86 | packages/flutter/examples/api/lib/material/segmented_button/segmented_button.1.dart:45-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/segmented_button/segmented_button.0.dart:54` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (33 lines × 2) packages/flutter/examples/api/lib/widgets/page_view/page_view.1.dart:41 — packages/flutter/examples/api/lib/widgets/page_view/page_view.1.dart:41-73 | packages/flutter/examples/api/lib/widgets/scroll_view/list_view.1.dart:40-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/page_view/page_view.1.dart:41` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/examples/api/lib/widgets/page_view/page_view.1.dart:38` calls `AppBar`, `Text` and `packages/flutter/examples/api/lib/widgets/scroll_view/list_view.1.dart:37` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×3
  • Duplicated block (32 lines × 2) packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart:36 — packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart:36-67 | packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.1.dart:61-92 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart` and `packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.1.dart` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (32 lines × 2) packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:54 — packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:54-85 | packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart:120-151 — before extracting anything, compare `packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart` and `packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.2.dart` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (32 lines × 2) dev/integration_tests/ios_platform_view_tests/lib/main.dart:242 — dev/integration_tests/ios_platform_view_tests/lib/main.dart:242-273 | dev/integration_tests/ios_platform_view_tests/lib/main.dart:288-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · SemanticsFlags.hasConflictingFlags (cyclomatic 41) · ×2
  • SemanticsFlags.hasConflictingFlags (cyclomatic 41) engine/src/flutter/lib/ui/semantics.dart:1650 — SemanticsFlags.hasConflictingFlags has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.hasConflictingFlags (cyclomatic 41) engine/src/flutter/lib/web_ui/lib/semantics.dart:591 — SemanticsFlags.hasConflictingFlags has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SemanticsFlags.hasRepeatedFlags (cyclomatic 40) · ×2
  • SemanticsFlags.hasRepeatedFlags (cyclomatic 40) engine/src/flutter/lib/ui/semantics.dart:1617 — SemanticsFlags.hasRepeatedFlags has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.hasRepeatedFlags (cyclomatic 40) engine/src/flutter/lib/web_ui/lib/semantics.dart:564 — SemanticsFlags.hasRepeatedFlags has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SemanticsFlags.toStrings (cyclomatic 33) · ×2
  • SemanticsFlags.toStrings (cyclomatic 33) engine/src/flutter/lib/ui/semantics.dart:1579 — SemanticsFlags.toStrings has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • SemanticsFlags.toStrings (cyclomatic 33) engine/src/flutter/lib/web_ui/lib/semantics.dart:527 — SemanticsFlags.toStrings has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SemanticsFlags.== (cyclomatic 27) · ×2
  • SemanticsFlags.== (cyclomatic 27) engine/src/flutter/lib/ui/semantics.dart:1521 — SemanticsFlags.== has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.== (cyclomatic 27) engine/src/flutter/lib/web_ui/lib/semantics.dart:469 — SemanticsFlags.== has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LocaleInfo.fromString (cyclomatic 19) · ×2
  • LocaleInfo.fromString (cyclomatic 19) dev/tools/localization/localizations_utils.dart:31 — LocaleInfo.fromString has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • LocaleInfo.fromString (cyclomatic 19) packages/flutter_tools/lib/src/localizations/localizations_utils.dart:30 — LocaleInfo.fromString has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsFlags.merge (cyclomatic 18) · ×2
  • SemanticsFlags.merge (cyclomatic 18) engine/src/flutter/lib/ui/semantics.dart:1436 — SemanticsFlags.merge has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.merge (cyclomatic 18) engine/src/flutter/lib/web_ui/lib/semantics.dart:386 — SemanticsFlags.merge has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D17 · Explicit Debt · HackComment · ×2
  • HackComment packages/flutter_tools/lib/src/web/web_runner.dart:18 — // Hack to hide web imports for google3. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/flutter_test/lib/src/binding.dart:2585 — /// Hack to extract the [ZoneDelegate] for [Zone.root]. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · SemanticsFlags.hasConflictingFlags (cognitive 40) · ×2
  • SemanticsFlags.hasConflictingFlags (cognitive 40) engine/src/flutter/lib/ui/semantics.dart:1650 — SemanticsFlags.hasConflictingFlags has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 40. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.hasConflictingFlags (cognitive 40) engine/src/flutter/lib/web_ui/lib/semantics.dart:591 — SemanticsFlags.hasConflictingFlags has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 40. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SemanticsFlags.hasRepeatedFlags (cognitive 39) · ×2
  • SemanticsFlags.hasRepeatedFlags (cognitive 39) engine/src/flutter/lib/ui/semantics.dart:1617 — SemanticsFlags.hasRepeatedFlags has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 39. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.hasRepeatedFlags (cognitive 39) engine/src/flutter/lib/web_ui/lib/semantics.dart:564 — SemanticsFlags.hasRepeatedFlags has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 39. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SemanticsFlags.toStrings (cognitive 32) · ×2
  • SemanticsFlags.toStrings (cognitive 32) engine/src/flutter/lib/ui/semantics.dart:1579 — SemanticsFlags.toStrings has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • SemanticsFlags.toStrings (cognitive 32) engine/src/flutter/lib/web_ui/lib/semantics.dart:527 — SemanticsFlags.toStrings has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SemanticsFlags.== (cognitive 26) · ×2
  • SemanticsFlags.== (cognitive 26) engine/src/flutter/lib/ui/semantics.dart:1521 — SemanticsFlags.== has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 26. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.== (cognitive 26) engine/src/flutter/lib/web_ui/lib/semantics.dart:469 — SemanticsFlags.== has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 26. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LocaleInfo.fromString (cognitive 23) · ×2
  • LocaleInfo.fromString (cognitive 23) dev/tools/localization/localizations_utils.dart:31 — LocaleInfo.fromString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (8 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocaleInfo.fromString (cognitive 23) packages/flutter_tools/lib/src/localizations/localizations_utils.dart:30 — LocaleInfo.fromString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (8 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsFlags.merge (cognitive 17) · ×2
  • SemanticsFlags.merge (cognitive 17) engine/src/flutter/lib/ui/semantics.dart:1436 — SemanticsFlags.merge has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • SemanticsFlags.merge (cognitive 17) engine/src/flutter/lib/web_ui/lib/semantics.dart:386 — SemanticsFlags.merge has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D4 · Code Duplication · Near-duplicate member pair (47 shared lines) · ×2
  • Near-duplicate member pair (47 shared lines) packages/flutter/lib/src/material/checkbox.dart:472 — packages/flutter/lib/src/material/checkbox.dart:472-647 | packages/flutter/lib/src/material/radio.dart:663-794 — These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (47 shared lines) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527-717 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:74-208 — These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (46 shared lines) · ×2
  • Near-duplicate member pair (46 shared lines) packages/flutter/lib/src/cupertino/app.dart:578 — packages/flutter/lib/src/cupertino/app.dart:578-650 | packages/flutter/lib/src/material/app.dart:1070-1144 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (46 shared lines) packages/flutter/lib/src/cupertino/date_picker.dart:1667 — packages/flutter/lib/src/cupertino/date_picker.dart:1667-1774 | packages/flutter/lib/src/cupertino/date_picker.dart:2023-2117 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (53 corresponding lines) · ×2
  • Edited copy of a member (53 corresponding lines) packages/flutter/lib/src/widgets/gesture_detector.dart:1779 — packages/flutter/lib/src/widgets/gesture_detector.dart:1779-1837 | packages/flutter/lib/src/widgets/gesture_detector.dart:1839-1895 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (53 corresponding lines) packages/flutter/lib/src/material/selectable_text.dart:465 — packages/flutter/lib/src/material/selectable_text.dart:465-517 | packages/flutter/lib/src/semantics/semantics.dart:2808-2875 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (7 members, 50+ identical tokens) packages/flutter/lib/src/material/carousel.dart:1588 — packages/flutter/lib/src/material/carousel.dart:1588-1612 | packages/flutter/lib/src/material/carousel.dart:1869-1893 | packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:344-364 | packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:427-447 | packages/flutter/lib/src/widgets/nested_scroll_view.dart:583-607 | packages/flutter/lib/src/widgets/page_view.dart:301-321 | packages/flutter/lib/src/widgets/page_view.dart:523-543 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) packages/flutter/examples/api/lib/material/app/app.0.dart:36 — packages/flutter/examples/api/lib/material/app/app.0.dart:36-94 | packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:47-109 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart:48-110 | packages/flutter/examples/api/lib/material/expansion_tile/expansion_tile.2.dart:37-88 | packages/flutter/examples/api/lib/material/popup_menu/popup_menu.2.dart:44-135 | packages/flutter/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.2.dart:42-97 | packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.1.dart:47-111 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Edited copy of a member (78 corresponding lines) · ×2
  • Edited copy of a member (78 corresponding lines) packages/flutter/lib/src/painting/star_border.dart:202 — packages/flutter/lib/src/painting/star_border.dart:202-281 | packages/flutter/lib/src/painting/star_border.dart:283-360 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (78 corresponding lines) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:817 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:817-905 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:274-351 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 51+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 51+ corresponding lines) packages/flutter/lib/src/material/chip_theme.dart:641 — packages/flutter/lib/src/material/chip_theme.dart:641-691 | packages/flutter/lib/src/material/list_tile_theme.dart:291-348 | packages/flutter/lib/src/material/time_picker_theme.dart:494-569 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 51 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 51+ corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:1437 — packages/flutter/lib/src/cupertino/date_picker.dart:1437-1495 | packages/flutter/lib/src/cupertino/date_picker.dart:1497-1547 | packages/flutter/lib/src/cupertino/date_picker.dart:1865-1915 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 51 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×2
  • Edited copy of a member (65 corresponding lines) engine/src/flutter/lib/ui/painting.dart:8296 — engine/src/flutter/lib/ui/painting.dart:8296-8361 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:437-501 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (65 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/shopping_cart.dart:172 — dev/integration_tests/flutter_gallery/lib/demo/shrine/shopping_cart.dart:172-236 | dev/integration_tests/new_gallery/lib/studies/shrine/shopping_cart.dart:230-321 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×2
  • Edited copy of a member (56 corresponding lines) packages/flutter/lib/src/cupertino/desktop_text_selection.dart:160 — packages/flutter/lib/src/cupertino/desktop_text_selection.dart:160-215 | packages/flutter/lib/src/cupertino/text_selection.dart:251-322 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (56 corresponding lines) packages/flutter/lib/src/cupertino/date_picker.dart:1549 — packages/flutter/lib/src/cupertino/date_picker.dart:1549-1605 | packages/flutter/lib/src/cupertino/date_picker.dart:1917-1972 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (59 corresponding lines) · ×2
  • Edited copy of a member (59 corresponding lines) packages/flutter_tools/lib/src/resident_runner.dart:372 — packages/flutter_tools/lib/src/resident_runner.dart:372-431 | packages/flutter_tools/lib/src/resident_runner.dart:433-491 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (59 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:154 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:154-212 | dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:166-231 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×2
  • Edited copy of a member (50 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/android.dart:45 — packages/flutter_tools/lib/src/build_system/targets/android.dart:45-94 | packages/flutter_tools/lib/src/build_system/targets/common.dart:58-107 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) packages/flutter_tools/lib/src/migrations/xcode_script_build_phase_migration.dart:17 — packages/flutter_tools/lib/src/migrations/xcode_script_build_phase_migration.dart:17-66 | packages/flutter_tools/lib/src/migrations/xcode_thin_binary_build_phase_input_paths_migration.dart:18-74 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×2
  • Edited copy of a member (58 corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:2203 — packages/flutter/lib/src/rendering/proxy_box.dart:2203-2261 | packages/flutter/lib/src/rendering/proxy_box.dart:2309-2366 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (58 corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/chip_demo.dart:80 — dev/integration_tests/new_gallery/lib/demos/material/chip_demo.dart:80-137 | dev/integration_tests/new_gallery/lib/demos/material/chip_demo.dart:172-237 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (54 corresponding lines) · ×2
  • Edited copy of a member (54 corresponding lines) packages/flutter/lib/src/material/progress_indicator.dart:593 — packages/flutter/lib/src/material/progress_indicator.dart:593-646 | packages/flutter/lib/src/material/progress_indicator.dart:1122-1188 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (54 corresponding lines) packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:34 — packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.0.dart:34-87 | packages/flutter/examples/api/lib/widgets/autocomplete/raw_autocomplete.1.dart:61-121 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 23+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 23+ corresponding lines) packages/flutter/lib/src/material/floating_action_button.dart:613 — packages/flutter/lib/src/material/floating_action_button.dart:613-639 | packages/flutter/lib/src/material/material_button.dart:428-459 | packages/flutter/lib/src/material/toggle_buttons.dart:865-902 | packages/flutter/lib/src/material/toggle_buttons_theme.dart:227-249 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 23+ corresponding lines) dev/integration_tests/ios_app_with_extensions/lib/main.dart:66 — dev/integration_tests/ios_app_with_extensions/lib/main.dart:66-111 | engine/src/flutter/examples/glfw/main.dart:82-127 | packages/flutter/examples/api/lib/material/scaffold/scaffold_messenger.of.1.dart:34-59 | packages/flutter/examples/api/lib/widgets/restoration/restoration_mixin.0.dart:70-92 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×2
  • Edited copy of a member (46 corresponding lines) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:148 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:148-195 | packages/flutter_test/lib/src/accessibility.dart:141-186 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1128 — packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1128-1173 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1190-1235 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 31+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 31+ corresponding lines) packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:242 — packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:242-295 | packages/flutter/lib/src/material/popup_menu_theme.dart:220-250 | packages/flutter/lib/src/material/snack_bar_theme.dart:306-346 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 31+ corresponding lines) packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart:28 — packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart:28-59 | packages/flutter/examples/api/lib/material/scaffold/scaffold.of.1.dart:23-62 | packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart:28-58 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/linux.dart:50 — packages/flutter_tools/lib/src/build_system/targets/linux.dart:50-87 | packages/flutter_tools/lib/src/build_system/targets/windows.dart:59-99 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (38 corresponding lines) packages/flutter/examples/api/lib/widgets/page_view/page_view.1.dart:35 — packages/flutter/examples/api/lib/widgets/page_view/page_view.1.dart:35-73 | packages/flutter/examples/api/lib/widgets/scroll_view/list_view.1.dart:35-72 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 17+ corresponding lines) packages/flutter/lib/src/widgets/widget_inspector.dart:2386 — packages/flutter/lib/src/widgets/widget_inspector.dart:2386-2402 | packages/flutter/lib/src/widgets/widget_inspector.dart:2404-2420 | packages/flutter/lib/src/widgets/widget_inspector.dart:2422-2445 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:311 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:311-327 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:329-345 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:549-578 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 19+ corresponding lines) dev/snippets/lib/src/analysis.dart:151 — dev/snippets/lib/src/analysis.dart:151-173 | dev/snippets/lib/src/analysis.dart:175-193 | dev/snippets/lib/src/analysis.dart:247-269 | dev/snippets/lib/src/analysis.dart:303-325 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 19+ corresponding lines) packages/flutter/lib/src/widgets/focus_traversal.dart:944 — packages/flutter/lib/src/widgets/focus_traversal.dart:944-962 | packages/flutter/lib/src/widgets/focus_traversal.dart:966-984 | packages/flutter/lib/src/widgets/focus_traversal.dart:1011-1029 | packages/flutter/lib/src/widgets/focus_traversal.dart:1034-1052 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 22+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 22+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:237 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:237-258 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:289-313 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:401-422 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:453-477 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 22+ corresponding lines) packages/flutter/lib/src/rendering/layer.dart:1656 — packages/flutter/lib/src/rendering/layer.dart:1656-1677 | packages/flutter/lib/src/rendering/layer.dart:1742-1763 | packages/flutter/lib/src/rendering/layer.dart:1831-1852 | packages/flutter/lib/src/rendering/layer.dart:1917-1938 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 20+ corresponding lines) packages/flutter/lib/src/material/navigation_bar_theme.dart:192 — packages/flutter/lib/src/material/navigation_bar_theme.dart:192-213 | packages/flutter/lib/src/material/navigation_drawer_theme.dart:174-193 | packages/flutter/lib/src/material/popup_menu_theme.dart:196-218 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) packages/flutter/lib/src/widgets/binding.dart:1218 — packages/flutter/lib/src/widgets/binding.dart:1218-1240 | packages/flutter/lib/src/widgets/binding.dart:1375-1394 | packages/flutter/lib/src/widgets/binding.dart:1396-1415 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 11+ corresponding lines) packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart:104 — packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart:104-114 | packages/flutter/lib/src/services/raw_keyboard_ios.dart:148-165 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:152-169 | packages/flutter/lib/src/services/raw_keyboard_windows.dart:110-127 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) packages/flutter/lib/src/rendering/flex.dart:1460 — packages/flutter/lib/src/rendering/flex.dart:1460-1470 | packages/flutter/lib/src/rendering/proxy_box.dart:1564-1574 | packages/flutter/lib/src/rendering/shifted_box.dart:994-1004 | packages/flutter/lib/src/widgets/overlay.dart:1596-1606 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 15+ corresponding lines) packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:272 — packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:272-290 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:369-383 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:412-426 | packages/flutter_tools/lib/src/runner/options/option_descriptor.dart:461-479 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 15+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:221 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:221-235 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:270-287 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:385-399 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:434-451 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 9+ corresponding lines) dev/flutter_analyzer_plugin/lib/src/rules/golden_test_tags.dart:37 — dev/flutter_analyzer_plugin/lib/src/rules/golden_test_tags.dart:37-46 | dev/flutter_analyzer_plugin/lib/src/rules/no_bad_imports_in_flutter.dart:35-43 | dev/flutter_analyzer_plugin/lib/src/rules/no_test_imports.dart:39-47 | dev/flutter_analyzer_plugin/lib/src/rules/skip_test_comments.dart:35-44 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 9+ corresponding lines) packages/flutter_tools/lib/src/base/error_handling_io.dart:414 — packages/flutter_tools/lib/src/base/error_handling_io.dart:414-425 | packages/flutter_tools/lib/src/base/error_handling_io.dart:427-438 | packages/flutter_tools/lib/src/base/error_handling_io.dart:599-607 | packages/flutter_tools/lib/src/base/error_handling_io.dart:740-748 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 11+ corresponding lines) packages/flutter/lib/src/rendering/layer.dart:1644 — packages/flutter/lib/src/rendering/layer.dart:1644-1654 | packages/flutter/lib/src/rendering/layer.dart:1730-1740 | packages/flutter/lib/src/rendering/layer.dart:1819-1829 | packages/flutter/lib/src/rendering/layer.dart:1905-1915 | packages/flutter/lib/src/rendering/layer.dart:2094-2105 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 11+ corresponding lines) packages/flutter/examples/api/lib/material/floating_action_button_location/standard_fab_location.0.dart:38 — packages/flutter/examples/api/lib/material/floating_action_button_location/standard_fab_location.0.dart:38-51 | packages/flutter/examples/api/lib/widgets/navigator/navigator.restorable_push.0.dart:42-52 | packages/flutter/examples/api/lib/widgets/navigator/navigator.restorable_push_and_remove_until.0.dart:45-59 | packages/flutter/examples/api/lib/widgets/navigator/navigator_state.restorable_push.0.dart:42-52 | packages/flutter/examples/api/lib/widgets/navigator/navigator_state.restorable_push_and_remove_until.0.dart:45-58 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 8+ corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:120 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:120-127 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:334-341 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:586-594 | packages/flutter/lib/src/painting/stadium_border.dart:414-422 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 8+ corresponding lines) packages/flutter/lib/src/painting/rounded_rectangle_border.dart:111 — packages/flutter/lib/src/painting/rounded_rectangle_border.dart:111-118 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:325-332 | packages/flutter/lib/src/painting/rounded_rectangle_border.dart:576-584 | packages/flutter/lib/src/painting/stadium_border.dart:405-412 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×2
  • Duplicated block (45 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:1945 — packages/flutter/lib/src/rendering/paragraph.dart:1945-1989 | packages/flutter/lib/src/rendering/paragraph.dart:2982-3026 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:1945` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (45 lines × 2) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:1186 — engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java:1186-1230 | engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java:507-551 — before extracting anything, compare `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java` and `engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController2.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 197 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×2
  • Duplicated block (42 lines × 2) packages/flutter/lib/src/material/button_style.dart:624 — packages/flutter/lib/src/material/button_style.dart:624-665 | packages/flutter/lib/src/material/menu_style.dart:356-397 — before extracting anything, compare `packages/flutter/lib/src/material/button_style.dart` and `packages/flutter/lib/src/material/menu_style.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/button_style.dart:624` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (42 lines × 2) examples/multiple_windows/lib/app/popup_button.dart:35 — examples/multiple_windows/lib/app/popup_button.dart:35-76 | examples/multiple_windows/lib/app/tooltip_button.dart:35-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×2
  • Duplicated block (40 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1595 — packages/flutter/lib/src/material/range_slider_parts.dart:1595-1634 | packages/flutter/lib/src/material/slider_parts.dart:918-957 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (40 lines × 2) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:444 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:444-483 | packages/flutter_test/lib/src/accessibility.dart:379-418 — before extracting anything, compare `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart` and `packages/flutter_test/lib/src/accessibility.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:444` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×2
  • Duplicated block (38–39 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:1004 — packages/flutter/lib/src/cupertino/text_field.dart:1004-1041 | packages/flutter/lib/src/material/text_field.dart:1097-1135 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/text_field.dart:1004` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (38–39 lines × 2) packages/flutter/lib/src/widgets/gesture_detector.dart:1787 — packages/flutter/lib/src/widgets/gesture_detector.dart:1787-1825 | packages/flutter/lib/src/widgets/gesture_detector.dart:1846-1883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/gesture_detector.dart:1787` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×2
  • Duplicated block (38 lines × 2) engine/src/flutter/lib/ui/window.dart:1021 — engine/src/flutter/lib/ui/window.dart:1021-1058 | engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:100-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (38 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:16 — dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart:16-53 | dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart:18-55 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart` and `dev/integration_tests/new_gallery/lib/demos/reference/transformations_demo_board.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×2
  • Duplicated block (34 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2422 — packages/flutter/lib/src/rendering/paragraph.dart:2422-2455 | packages/flutter/lib/src/rendering/paragraph.dart:2674-2707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2422` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (34 lines × 2) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:152 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:152-185 | packages/flutter_test/lib/src/accessibility.dart:145-178 — before extracting anything, compare `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart` and `packages/flutter_test/lib/src/accessibility.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 112 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:152` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×2
  • Duplicated block (31 lines × 2) packages/flutter/lib/src/widgets/implicit_animations.dart:2122 — packages/flutter/lib/src/widgets/implicit_animations.dart:2122-2152 | packages/flutter/lib/src/widgets/text.dart:219-249 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (31 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:426 — dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart:426-456 | dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart:583-613 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart` and `dev/integration_tests/new_gallery/lib/studies/shrine/expanding_bottom_sheet.dart` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 139 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–30 lines × 2) · ×2
  • Duplicated block (29–30 lines × 2) packages/flutter_tools/lib/src/build_system/targets/ios.dart:117 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:117-145 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:326-355 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/ios.dart` and `packages/flutter_tools/lib/src/build_system/targets/macos.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/ios.dart:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29–30 lines × 2) packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:39 — packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:39-67 | packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart:45-74 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart` and `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart:39` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–26 lines × 2) · ×2
  • Duplicated block (23–26 lines × 2) packages/flutter/lib/src/gestures/velocity_tracker.dart:347 — packages/flutter/lib/src/gestures/velocity_tracker.dart:347-372 | packages/flutter/lib/src/gestures/velocity_tracker.dart:420-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/velocity_tracker.dart:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23–26 lines × 2) dev/integration_tests/android_engine_test/lib/hcpp/platform_view_clear_hidden.dart:38 — dev/integration_tests/android_engine_test/lib/hcpp/platform_view_clear_hidden.dart:38-60 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlay_layer_cleared.dart:66-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlay_layer_cleared.dart:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×2
  • Duplicated block (25 lines × 3) packages/flutter/lib/src/material/slider_parts.dart:805 — packages/flutter/lib/src/material/slider_parts.dart:805-829 | packages/flutter/lib/src/material/slider_parts.dart:1287-1311 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:263-287 — before extracting anything, compare `packages/flutter/lib/src/material/slider_parts.dart` and `packages/flutter/lib/src/material/slider_value_indicator_shape.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/slider_parts.dart:805` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (25 lines × 3) packages/flutter/lib/src/material/toggle_buttons.dart:597 — packages/flutter/lib/src/material/toggle_buttons.dart:597-621 | packages/flutter/lib/src/material/toggle_buttons.dart:631-655 | packages/flutter/lib/src/material/toggle_buttons.dart:673-697 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/toggle_buttons.dart:597` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) packages/flutter/lib/src/material/dialog.dart:930 — packages/flutter/lib/src/material/dialog.dart:930-952 | packages/flutter/lib/src/material/dialog.dart:1360-1381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/dialog.dart:930` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22–23 lines × 2) packages/flutter_tools/lib/src/resident_runner.dart:382 — packages/flutter_tools/lib/src/resident_runner.dart:382-403 | packages/flutter_tools/lib/src/resident_runner.dart:436-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21 lines × 4) · ×2
  • Duplicated block (21 lines × 4) packages/flutter/lib/src/material/date_picker_theme.dart:1153 — packages/flutter/lib/src/material/date_picker_theme.dart:1153-1173 | packages/flutter/lib/src/material/date_picker_theme.dart:1224-1244 | packages/flutter/lib/src/material/date_picker_theme.dart:1344-1364 | packages/flutter/lib/src/material/date_picker_theme.dart:1411-1431 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/date_picker_theme.dart:1153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 4) dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:71 — dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:71-91 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:73-93 | dev/integration_tests/android_engine_test/lib/platform_view/hide_show_hide_main.dart:79-99 | dev/integration_tests/android_engine_test/lib/platform_view/hybrid_composition_platform_view_main.dart:38-58 — before extracting anything, compare `dev/integration_tests/android_engine_test/lib/platform_view/hide_show_hide_main.dart` and `dev/integration_tests/android_engine_test/lib/platform_view/hybrid_composition_platform_view_main.dart` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1214 — packages/flutter/lib/src/material/range_slider_parts.dart:1214-1234 | packages/flutter/lib/src/material/slider_parts.dart:1013-1032 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1214` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20–21 lines × 2) packages/flutter/lib/src/widgets/text.dart:766 — packages/flutter/lib/src/widgets/text.dart:766-786 | packages/flutter/lib/src/widgets/text.dart:791-810 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) dev/devicelab/lib/framework/devices.dart:791 — dev/devicelab/lib/framework/devices.dart:791-808 | dev/devicelab/lib/framework/devices.dart:1104-1122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/devicelab/lib/framework/devices.dart:791` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) packages/flutter/lib/src/material/app_bar.dart:1025 — packages/flutter/lib/src/material/app_bar.dart:1025-1043 | packages/flutter/lib/src/material/app_bar.dart:1120-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/app_bar.dart:1025` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×2
  • Duplicated block (16–19 lines × 2) packages/flutter/lib/src/rendering/sliver_clip.dart:93 — packages/flutter/lib/src/rendering/sliver_clip.dart:93-108 | packages/flutter/lib/src/rendering/sliver_clip.dart:224-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/sliver_clip.dart:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–19 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:19 — engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:19-34 | engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart:18-36 — before extracting anything, compare `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart` and `engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart:38` calls `build`, `layout`, `ParagraphConstraints` and `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:35` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) packages/flutter/lib/src/material/button_style.dart:672 — packages/flutter/lib/src/material/button_style.dart:672-688 | packages/flutter/lib/src/material/menu_style.dart:396-413 — before extracting anything, compare `packages/flutter/lib/src/material/button_style.dart` and `packages/flutter/lib/src/material/menu_style.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/button_style.dart:672` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17–18 lines × 2) packages/flutter_tools/lib/src/build_system/targets/android.dart:58 — packages/flutter_tools/lib/src/build_system/targets/android.dart:58-75 | packages/flutter_tools/lib/src/build_system/targets/ios.dart:673-689 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/android.dart:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:221 — engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:221-236 | engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:283-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:221` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–17 lines × 2) packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.1.dart:54 — packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.1.dart:54-70 | packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.4.dart:45-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/app_bar/sliver_app_bar.1.dart:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×2
  • Duplicated block (16 lines × 5) packages/flutter/lib/src/material/range_slider_parts.dart:1445 — packages/flutter/lib/src/material/range_slider_parts.dart:1445-1460 | packages/flutter/lib/src/material/range_slider_parts.dart:1578-1593 | packages/flutter/lib/src/material/slider_parts.dart:901-916 | packages/flutter/lib/src/material/slider_parts.dart:1371-1386 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:431-446 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1445` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 5) packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:39 — packages/flutter/examples/api/lib/widgets/animated_grid/animated_grid.0.dart:39-54 | packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart:42-57 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list.0.dart:39-54 | packages/flutter/examples/api/lib/widgets/animated_list/animated_list_separated.0.dart:41-56 | packages/flutter/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart:42-57 — `packages/flutter/examples/api/lib/widgets/animated_grid/sliver_animated_grid.0.dart` and `packages/flutter/examples/api/lib/widgets/animated_list/sliver_animated_list.0.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 46 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×2
  • Duplicated block (15–16 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1231 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1231-1245 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1368-1383 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1491-1505 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 3) packages/flutter/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart:37 — packages/flutter/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart:37-52 | packages/flutter/examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart:35-50 | packages/flutter/examples/api/lib/cupertino/picker/cupertino_picker.0.dart:44-58 — before extracting anything, compare `packages/flutter/examples/api/lib/cupertino/date_picker/cupertino_date_picker.0.dart` and `packages/flutter/examples/api/lib/cupertino/date_picker/cupertino_timer_picker.0.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×2
  • Duplicated block (14–16 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1088 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1088-1101 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1122-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1088` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14–16 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:1104 — packages/flutter/lib/src/material/range_slider_parts.dart:1104-1119 | packages/flutter/lib/src/material/slider_parts.dart:1156-1169 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) engine/src/flutter/lib/web_ui/dev/package_roller.dart:212 — engine/src/flutter/lib/web_ui/dev/package_roller.dart:212-226 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:259-273 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:307-321 | engine/src/flutter/lib/web_ui/dev/package_roller.dart:352-366 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 4) packages/flutter/lib/src/material/checkbox_theme.dart:232 — packages/flutter/lib/src/material/checkbox_theme.dart:232-246 | packages/flutter/lib/src/material/chip_theme.dart:564-578 | packages/flutter/lib/src/material/radio_theme.dart:136-150 | packages/flutter/lib/src/material/search_view_theme.dart:227-241 — before extracting anything, compare `packages/flutter/lib/src/material/checkbox_theme.dart` and `packages/flutter/lib/src/material/radio_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×2
  • Duplicated block (15 lines × 3) packages/flutter/lib/src/cupertino/date_picker.dart:1261 — packages/flutter/lib/src/cupertino/date_picker.dart:1261-1275 | packages/flutter/lib/src/cupertino/date_picker.dart:1717-1731 | packages/flutter/lib/src/cupertino/date_picker.dart:2056-2070 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:63 — packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:63-77 | packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:92-106 | packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:122-136 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart:63` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:528 — packages/flutter/lib/src/material/range_slider_parts.dart:528-541 | packages/flutter/lib/src/material/slider_parts.dart:333-347 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:528` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14–15 lines × 2) packages/flutter/lib/src/rendering/flex.dart:948 — packages/flutter/lib/src/rendering/flex.dart:948-962 | packages/flutter/lib/src/rendering/flex.dart:1021-1034 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/flex.dart:948` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×2
  • Duplicated block (14 lines × 3) dev/devicelab/lib/tasks/gallery.dart:204 — dev/devicelab/lib/tasks/gallery.dart:204-217 | dev/devicelab/lib/tasks/gallery.dart:356-369 | dev/devicelab/lib/tasks/perf_tests.dart:1516-1529 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (14 lines × 3) packages/flutter/lib/src/material/elevated_button.dart:547 — packages/flutter/lib/src/material/elevated_button.dart:547-560 | packages/flutter/lib/src/material/outlined_button.dart:489-502 | packages/flutter/lib/src/material/text_button.dart:522-535 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×2
  • Duplicated block (13–14 lines × 3) packages/flutter/lib/src/material/range_slider_parts.dart:1626 — packages/flutter/lib/src/material/range_slider_parts.dart:1626-1639 | packages/flutter/lib/src/material/slider_parts.dart:949-962 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:479-491 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 3) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:861 — packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:861-873 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:942-955 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1094-1106 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:861` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×2
  • Duplicated block (10–14 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:1724 — packages/flutter/lib/src/rendering/paragraph.dart:1724-1733 | packages/flutter/lib/src/rendering/paragraph.dart:1781-1794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:1724` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–14 lines × 2) packages/flutter_tools/lib/src/build_system/targets/web.dart:288 — packages/flutter_tools/lib/src/build_system/targets/web.dart:288-301 | packages/flutter_tools/lib/src/build_system/targets/web.dart:559-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/web.dart:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×2
  • Duplicated block (13 lines × 4) packages/flutter/lib/src/material/elevated_button.dart:491 — packages/flutter/lib/src/material/elevated_button.dart:491-503 | packages/flutter/lib/src/material/filled_button.dart:509-521 | packages/flutter/lib/src/material/outlined_button.dart:438-450 | packages/flutter/lib/src/material/text_button.dart:471-483 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/filled_button.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/elevated_button.dart:491` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 4) packages/flutter/lib/src/material/elevated_button.dart:605 — packages/flutter/lib/src/material/elevated_button.dart:605-617 | packages/flutter/lib/src/material/outlined_button.dart:533-545 | packages/flutter/lib/src/material/radio.dart:946-958 | packages/flutter/lib/src/material/text_button.dart:566-578 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:185 — packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:185-196 | packages/flutter/lib/src/material/dropdown_menu.dart:1683-1694 | packages/flutter/lib/src/material/list_tile.dart:1749-1760 | packages/flutter/lib/src/rendering/table.dart:1452-1463 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/slotted_render_object_widget/slotted_multi_child_render_object_widget_mixin.0.dart:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) packages/flutter/lib/src/widgets/_window_linux.dart:117 — packages/flutter/lib/src/widgets/_window_linux.dart:117-128 | packages/flutter/lib/src/widgets/_window_linux.dart:143-154 | packages/flutter/lib/src/widgets/_window_linux.dart:168-179 | packages/flutter/lib/src/widgets/_window_linux.dart:193-204 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/_window_linux.dart:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×2
  • Duplicated block (11–12 lines × 3) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:285 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:285-296 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:324-334 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:343-353 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:285` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 3) packages/flutter/lib/src/widgets/scroll_view.dart:552 — packages/flutter/lib/src/widgets/scroll_view.dart:552-562 | packages/flutter/lib/src/widgets/single_child_scroll_view.dart:285-296 | packages/flutter/lib/src/widgets/two_dimensional_scroll_view.dart:223-234 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/scroll_view.dart:552` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×2
  • Duplicated block (9 lines × 5) packages/flutter/lib/src/material/menu_anchor.dart:4153 — packages/flutter/lib/src/material/menu_anchor.dart:4153-4161 | packages/flutter/lib/src/material/segmented_button.dart:1250-1258 | packages/flutter/lib/src/material/switch.dart:2279-2287 | packages/flutter/lib/src/material/tabs.dart:2911-2919 | packages/flutter/lib/src/material/tabs.dart:2922-2930 — before extracting anything, compare `packages/flutter/lib/src/material/switch.dart` and `packages/flutter/lib/src/material/tabs.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 5) packages/flutter/lib/src/cupertino/search_field.dart:445 — packages/flutter/lib/src/cupertino/search_field.dart:445-453 | packages/flutter/lib/src/cupertino/text_field.dart:1164-1172 | packages/flutter/lib/src/cupertino/text_form_field_row.dart:317-325 | packages/flutter/lib/src/material/text_field.dart:1352-1360 | packages/flutter/lib/src/material/text_form_field.dart:370-378 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/cupertino/text_field.dart:1161` calls `addListener` and `packages/flutter/lib/src/cupertino/search_field.dart:442` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×2
  • Duplicated block (7–9 lines × 2) packages/flutter_tools/lib/src/build_system/targets/android.dart:45 — packages/flutter_tools/lib/src/build_system/targets/android.dart:45-53 | packages/flutter_tools/lib/src/build_system/targets/ios.dart:652-658 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/android.dart:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–9 lines × 2) packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart:47 — packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart:47-53 | packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart:48-56 — before extracting anything, compare `packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart` and `packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.0.dart:54` calls `BottomNavigationBarItem`, `Icon` and `packages/flutter/examples/api/lib/material/bottom_navigation_bar/bottom_navigation_bar.1.dart:56` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) packages/flutter/lib/src/material/button.dart:538 — packages/flutter/lib/src/material/button.dart:538-545 | packages/flutter/lib/src/material/button_style_button.dart:726-733 | packages/flutter/lib/src/material/time_picker.dart:930-937 | packages/flutter/lib/src/material/toggle_buttons.dart:1694-1701 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/alert.dart:15 — engine/src/flutter/lib/web_ui/lib/src/engine/semantics/alert.dart:15-22 | engine/src/flutter/lib/web_ui/lib/src/engine/semantics/alert.dart:35-42 | engine/src/flutter/lib/web_ui/lib/src/engine/semantics/list.dart:14-21 | engine/src/flutter/lib/web_ui/lib/src/engine/semantics/scrollable.dart:18-28 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×2
  • Duplicated block (7–8 lines × 3) dev/flutter_analyzer_plugin/lib/src/rules/golden_test_tags.dart:37 — dev/flutter_analyzer_plugin/lib/src/rules/golden_test_tags.dart:37-44 | dev/flutter_analyzer_plugin/lib/src/rules/no_bad_imports_in_flutter.dart:35-41 | dev/flutter_analyzer_plugin/lib/src/rules/no_test_imports.dart:39-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `dev/flutter_analyzer_plugin/lib/src/rules/golden_test_tags.dart:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 3) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:479 — engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:479-485 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:726-733 | engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:978-984 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:726` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:485` calls `putBoolean` and `engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java:733` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×2
  • Duplicated block (15–17 lines × 2) dev/tools/gen_defaults/lib/icon_button_template.dart:98 — dev/tools/gen_defaults/lib/icon_button_template.dart:98-114 | dev/tools/gen_defaults/lib/icon_button_template.dart:135-149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/icon_button_template.dart:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15–17 lines × 2) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:151 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:151-165 | packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart:166-182 — before extracting anything, compare `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart` and `packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) packages/flutter/lib/src/material/checkbox.dart:962 — packages/flutter/lib/src/material/checkbox.dart:962-968 | packages/flutter/lib/src/material/icon_button.dart:1472-1479 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox.dart:962` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/material/checkbox.dart:969` calls `contains` and `packages/flutter/lib/src/material/icon_button.dart:1480` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7–8 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:640 — packages/flutter/lib/src/material/range_slider_parts.dart:640-646 | packages/flutter/lib/src/material/range_slider_parts.dart:1066-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×2
  • Duplicated block (8 lines × 5) packages/flutter/lib/src/material/range_slider_parts.dart:1499 — packages/flutter/lib/src/material/range_slider_parts.dart:1499-1506 | packages/flutter/lib/src/material/range_slider_parts.dart:1637-1644 | packages/flutter/lib/src/material/slider_parts.dart:960-967 | packages/flutter/lib/src/material/slider_parts.dart:1425-1432 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:489-496 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1499` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) packages/flutter_test/lib/src/event_simulation.dart:311 — packages/flutter_test/lib/src/event_simulation.dart:311-318 | packages/flutter_test/lib/src/event_simulation.dart:442-449 | packages/flutter_test/lib/src/event_simulation.dart:480-487 | packages/flutter_test/lib/src/event_simulation.dart:524-531 | packages/flutter_test/lib/src/event_simulation.dart:591-598 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_test/lib/src/event_simulation.dart:311` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×2
  • Duplicated block (6 lines × 5) packages/flutter/lib/src/gestures/long_press.dart:132 — packages/flutter/lib/src/gestures/long_press.dart:132-137 | packages/flutter/lib/src/gestures/multitap.dart:754-759 | packages/flutter/lib/src/gestures/tap.dart:48-53 | packages/flutter/lib/src/gestures/tap_and_drag.dart:107-112 | packages/flutter/lib/src/gestures/tap_and_drag.dart:160-165 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/long_press.dart:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/gestures/multitap.dart:760` calls `add`, `IntProperty` and `packages/flutter/lib/src/gestures/long_press.dart:138` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 5) packages/flutter/examples/api/lib/material/chip/chip_attributes.avatar_box_constraints.0.dart:14 — packages/flutter/examples/api/lib/material/chip/chip_attributes.avatar_box_constraints.0.dart:14-19 | packages/flutter/examples/api/lib/material/chip/chip_attributes.chip_animation_style.0.dart:14-19 | packages/flutter/examples/api/lib/material/chip/deletable_chip_attributes.delete_icon_box_constraints.0.dart:14-19 | packages/flutter/examples/api/lib/material/segmented_button/segmented_button.1.dart:16-21 | packages/flutter/examples/api/lib/widgets/image/image.error_builder.0.dart:14-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×2
  • Duplicated block (5 lines × 4) packages/flutter/lib/src/rendering/proxy_box.dart:3891 — packages/flutter/lib/src/rendering/proxy_box.dart:3891-3895 | packages/flutter/lib/src/rendering/proxy_sliver.dart:357-361 | packages/flutter/lib/src/widgets/basic.dart:3664-3668 | packages/flutter/lib/src/widgets/sliver.dart:1489-1493 — before extracting anything, compare `packages/flutter/lib/src/rendering/proxy_box.dart` and `packages/flutter/lib/src/rendering/proxy_sliver.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:143 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:143-147 | engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart:215-219 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:373-377 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart:379-383 — before extracting anything, compare `engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/shaders.dart` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×2
  • Edited copy of a member (40 corresponding lines) dev/integration_tests/android_views/lib/motion_events_page.dart:134 — dev/integration_tests/android_views/lib/motion_events_page.dart:134-174 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:114-153 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (40 corresponding lines) packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:136 — packages/flutter/examples/api/lib/painting/axis_direction/axis_direction.0.dart:136-175 | packages/flutter/examples/api/lib/rendering/scroll_direction/scroll_direction.0.dart:149-193 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×2
  • Edited copy of a member (43 corresponding lines) packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:125 — packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.0.dart:125-167 | packages/flutter/examples/api/lib/widgets/raw_menu_anchor/raw_menu_anchor.1.dart:201-247 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) packages/flutter/examples/api/lib/cupertino/magnifier/cupertino_magnifier.0.dart:35 — packages/flutter/examples/api/lib/cupertino/magnifier/cupertino_magnifier.0.dart:35-78 | packages/flutter/examples/api/lib/widgets/magnifier/magnifier.0.dart:20-62 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 17+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart:60 — dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart:60-76 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart:78-94 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart:96-112 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_text_field_demo.dart:114-131 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 17+ corresponding lines) packages/flutter_test/lib/src/recording_canvas.dart:337 — packages/flutter_test/lib/src/recording_canvas.dart:337-353 | packages/flutter_test/lib/src/recording_canvas.dart:355-372 | packages/flutter_test/lib/src/recording_canvas.dart:374-391 | packages/flutter_test/lib/src/recording_canvas.dart:393-410 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×2
  • Duplicated block (25–26 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:246 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:246-271 | dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:263-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:288` calls `Semantics` and `dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:272` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (25–26 lines × 2) packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.1.dart:78 — packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.1.dart:78-103 | packages/flutter/examples/api/lib/material/progress_indicator/linear_progress_indicator.1.dart:77-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/progress_indicator/circular_progress_indicator.1.dart:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
IC1 · Incompleteness & stubs · Hollow method · ×2
  • Hollow method — returns a constant without doing the work packages/flutter/lib/src/material/about.dart:1200 — `_defaultApplicationVersion` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work packages/flutter/lib/src/material/about.dart:1205 — `_defaultApplicationIcon` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×2
  • Owned disposable field is never released packages/flutter_tools/lib/src/desktop_device.dart:387 — `DesktopLogReader` carries a disposal duty — it declares its own release — and it creates `_inputController` itself (line 387, `StreamController.broadcast`), which makes that instance its own. Nothing in the class releases it — no `_inputController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController.broadcast` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_inputController.close();` in `dispose()` before `super.dispose()`.
  • Owned disposable field is never released packages/flutter_tools/lib/src/proxied_devices/devices.dart:505 — `_ProxiedLogReader` carries a disposal duty — it declares its own release — and it creates `_logLinesStreamController` itself (line 505, `StreamController`), which makes that instance its own. Nothing in the class releases it — no `_logLinesStreamController.close()`, no tear-off of it, on any path — nothing elsewhere in the library releases it through another instance, and it is never handed on as a value (passed positionally, returned, stored, collected), so no other owner can be ending it. Passing it as a named argument does not: a widget or animation never disposes a controller it was given. On what was read, `StreamController` outlives the object that made it — its listeners, and through them this object and everything it references, stay reachable, and a ticker, timer or subscription keeps calling into a disposed object. Release it where the duty is discharged: `_logLinesStreamController.close();` in `dispose()` before `super.dispose()`.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the function that made it · ×2
  • Disposable created and abandoned in the function that made it packages/flutter_tools/bin/podhelper.rb:101 — `Dir.new` is called here without a block, so it hands back an open descriptor the caller must close — and its first and only use reads `.each_child` through it and drops it. Nothing closes it: it stays open until the garbage collector happens to finalize it, which is one leaked descriptor per call (a child process too, for `IO.popen`), `Errno::EMFILE` under load, and for a written file data that is not flushed when the program next reads it. Use the block form, which closes on every path including a raise (`Dir.new(…) { |io| … }`), or the one-call reader/writer (`File.read`, `File.write`, `File.foreach`).
  • Disposable created and abandoned in the function that made it packages/flutter_tools/bin/podhelper.rb:171 — `Dir.new` is called here without a block, so it hands back an open descriptor the caller must close — and its first and only use reads `.each_child` through it and drops it. Nothing closes it: it stays open until the garbage collector happens to finalize it, which is one leaked descriptor per call (a child process too, for `IO.popen`), `Errno::EMFILE` under load, and for a written file data that is not flushed when the program next reads it. Use the block form, which closes on every path including a raise (`Dir.new(…) { |io| … }`), or the one-call reader/writer (`File.read`, `File.write`, `File.foreach`).
X2 · Cancellation propagation · Async function without AbortSignal · ×2
  • Async function without AbortSignal: _loadWasmEntrypoint engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js:153 — `_loadWasmEntrypoint` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getResponse engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js:85 — `getResponse` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.8 · ×1
  • Low contrast colour pair in CSS (3.8:1) dev/docs/assets/snippets.css:145 — `.dark-theme .snippet-buttons button` sets color: rgb(149, 149, 149) on background-color: #133e59 — 3.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
C2 · Access Controls · No authorization · ×1
  • No authorization packages/flutter_tools/lib/src/isolated/web_asset_server.dart:249 — This repository serves requests — an HTTP server (HttpServer.bindSecure) (packages/flutter_tools/lib/src/isolated/web_asset_server.dart:249) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
D1 · Cyclomatic Complexity · CreateCommand.runCommand (cyclomatic 89) · ×1
  • CreateCommand.runCommand (cyclomatic 89) packages/flutter_tools/lib/src/commands/create.dart:404 — CreateCommand.runCommand has cyclomatic complexity 89 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextStyle.lerp (cyclomatic 86) · ×1
  • TextStyle.lerp (cyclomatic 86) packages/flutter/lib/src/painting/text_style.dart:1124 — TextStyle.lerp has cyclomatic complexity 86 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ThemeData.== (cyclomatic 85) · ×1
  • ThemeData.== (cyclomatic 85) packages/flutter/lib/src/material/theme_data.dart:2089 — ThemeData.== has cyclomatic complexity 85 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SemanticsAnnotationsMixin.describeSemanticsConfiguration (cyclomatic 80) · ×1
  • SemanticsAnnotationsMixin.describeSemanticsConfiguration (cyclomatic 80) packages/flutter/lib/src/rendering/object.dart:4945 — SemanticsAnnotationsMixin.describeSemanticsConfiguration has cyclomatic complexity 80 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RenderCustomPaint._updateSemanticsChild (cyclomatic 75) · ×1
  • RenderCustomPaint._updateSemanticsChild (cyclomatic 75) packages/flutter/lib/src/rendering/custom_paint.dart:891 — RenderCustomPaint._updateSemanticsChild has cyclomatic complexity 75 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextTreeRenderer._debugRender (cyclomatic 74) · ×1
  • TextTreeRenderer._debugRender (cyclomatic 74) packages/flutter/lib/src/foundation/diagnostics.dart:1143 — TextTreeRenderer._debugRender has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _InputDecoratorState.build (cyclomatic 61) · ×1
  • _InputDecoratorState.build (cyclomatic 61) packages/flutter/lib/src/material/input_decorator.dart:2311 — _InputDecoratorState.build has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InputDecoration.== (cyclomatic 61) · ×1
  • InputDecoration.== (cyclomatic 61) packages/flutter/lib/src/material/input_decorator.dart:4083 — InputDecoration.== has cyclomatic complexity 61 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GestureDetector.build (cyclomatic 58) · ×1
  • GestureDetector.build (cyclomatic 58) packages/flutter/lib/src/widgets/gesture_detector.dart:1049 — GestureDetector.build has cyclomatic complexity 58 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TextSelectionGestureDetectorBuilder.onDragSelectionUpdate (cyclomatic 58) · ×1
  • TextSelectionGestureDetectorBuilder.onDragSelectionUpdate (cyclomatic 58) packages/flutter/lib/src/widgets/text_selection.dart:3185 — TextSelectionGestureDetectorBuilder.onDragSelectionUpdate has cyclomatic complexity 58 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · InputDecoration.toString (cyclomatic 55) · ×1
  • InputDecoration.toString (cyclomatic 55) packages/flutter/lib/src/material/input_decorator.dart:4217 — InputDecoration.toString has cyclomatic complexity 55 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ThemeData.ThemeData (cyclomatic 55) · ×1
  • ThemeData.ThemeData (cyclomatic 55) packages/flutter/lib/src/material/theme_data.dart:221 — ThemeData.ThemeData has cyclomatic complexity 55 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RenderRangeSlider.paint (cyclomatic 54) · ×1
  • _RenderRangeSlider.paint (cyclomatic 54) packages/flutter/lib/src/material/range_slider.dart:1518 — _RenderRangeSlider.paint has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AccessibilityBridge.updateSemantics (cyclomatic 54) · ×1
  • AccessibilityBridge.updateSemantics (cyclomatic 54) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:1533 — AccessibilityBridge.updateSemantics has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ColorScheme.== (cyclomatic 53) · ×1
  • ColorScheme.== (cyclomatic 53) packages/flutter/lib/src/material/color_scheme.dart:1340 — ColorScheme.== has cyclomatic complexity 53 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Parser.parseIntoTree (cyclomatic 53) · ×1
  • Parser.parseIntoTree (cyclomatic 53) packages/flutter_tools/lib/src/localizations/message_parser.dart:396 — Parser.parseIntoTree has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsOwner.sendSemanticsUpdate (cyclomatic 49) · ×1
  • SemanticsOwner.sendSemanticsUpdate (cyclomatic 49) packages/flutter/lib/src/semantics/semantics.dart:5103 — SemanticsOwner.sendSemanticsUpdate has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManifestAssetBundle.build (cyclomatic 49) · ×1
  • ManifestAssetBundle.build (cyclomatic 49) packages/flutter_tools/lib/src/asset.dart:316 — ManifestAssetBundle.build has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsObject._getEngineSemanticsRole (cyclomatic 49) · ×1
  • SemanticsObject._getEngineSemanticsRole (cyclomatic 49) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:2266 — SemanticsObject._getEngineSemanticsRole has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary (cyclomatic 47) · ×1
  • _SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary (cyclomatic 47) packages/flutter/lib/src/rendering/paragraph.dart:2040 — _SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary (cyclomatic 47) · ×1
  • _SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary (cyclomatic 47) packages/flutter/lib/src/rendering/paragraph.dart:2218 — _SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · EditableTextState.didUpdateWidget (cyclomatic 47) · ×1
  • EditableTextState.didUpdateWidget (cyclomatic 47) packages/flutter/lib/src/widgets/editable_text.dart:3485 — EditableTextState.didUpdateWidget has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NavigatorState._flushHistoryUpdates (cyclomatic 46) · ×1
  • NavigatorState._flushHistoryUpdates (cyclomatic 46) packages/flutter/lib/src/widgets/navigator.dart:4438 — NavigatorState._flushHistoryUpdates has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterLoader.ensureInitializationComplete (cyclomatic 46) · ×1
  • FlutterLoader.ensureInitializationComplete (cyclomatic 46) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java:318 — FlutterLoader.ensureInitializationComplete has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary (cyclomatic 45) · ×1
  • _SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary (cyclomatic 45) packages/flutter/lib/src/rendering/paragraph.dart:2403 — _SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary (cyclomatic 45) · ×1
  • _SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary (cyclomatic 45) packages/flutter/lib/src/rendering/paragraph.dart:2655 — _SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · DatePickerThemeData.== (cyclomatic 43) · ×1
  • DatePickerThemeData.== (cyclomatic 43) packages/flutter/lib/src/material/date_picker_theme.dart:742 — DatePickerThemeData.== has cyclomatic complexity 43 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TerminalHandler._commonTerminalInputHandler (cyclomatic 43) · ×1
  • TerminalHandler._commonTerminalInputHandler (cyclomatic 43) packages/flutter_tools/lib/src/resident_runner.dart:1822 — TerminalHandler._commonTerminalInputHandler has cyclomatic complexity 43 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticsObject.updateSelf (cyclomatic 43) · ×1
  • SemanticsObject.updateSelf (cyclomatic 43) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:1870 — SemanticsObject.updateSelf has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _TextFieldState.build (cyclomatic 42) · ×1
  • _TextFieldState.build (cyclomatic 42) packages/flutter/lib/src/material/text_field.dart:1528 — _TextFieldState.build has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InputDecorationThemeData.== (cyclomatic 41) · ×1
  • InputDecorationThemeData.== (cyclomatic 41) packages/flutter/lib/src/material/input_decorator.dart:5553 — InputDecorationThemeData.== has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _SelectableTextContainerDelegate._adjustSelection (cyclomatic 41) · ×1
  • _SelectableTextContainerDelegate._adjustSelection (cyclomatic 41) packages/flutter/lib/src/widgets/text.dart:1135 — _SelectableTextContainerDelegate._adjustSelection has cyclomatic complexity 41 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · RollFallbackFontsCommand._generateFallbackFontData (cyclomatic 41) · ×1
  • RollFallbackFontsCommand._generateFallbackFontData (cyclomatic 41) engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart:62 — RollFallbackFontsCommand._generateFallbackFontData has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _MergeableMaterialState.didUpdateWidget (cyclomatic 40) · ×1
  • _MergeableMaterialState.didUpdateWidget (cyclomatic 40) packages/flutter/lib/src/material/mergeable_material.dart:279 — _MergeableMaterialState.didUpdateWidget has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PipelineOwner.flushSemantics (cyclomatic 40) · ×1
  • PipelineOwner.flushSemantics (cyclomatic 40) packages/flutter/lib/src/rendering/object.dart:1452 — PipelineOwner.flushSemantics has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _AppBarState.build (cyclomatic 39) · ×1
  • _AppBarState.build (cyclomatic 39) packages/flutter/lib/src/material/app_bar.dart:901 — _AppBarState.build has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SliderThemeData.== (cyclomatic 39) · ×1
  • SliderThemeData.== (cyclomatic 39) packages/flutter/lib/src/material/slider_theme.dart:868 — SliderThemeData.== has cyclomatic complexity 39 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Template.render (cyclomatic 39) · ×1
  • Template.render (cyclomatic 39) packages/flutter_tools/lib/src/template.dart:223 — Template.render has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderDecoration.performLayout (cyclomatic 38) · ×1
  • _RenderDecoration.performLayout (cyclomatic 38) packages/flutter/lib/src/material/input_decorator.dart:1381 — _RenderDecoration.performLayout has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AccessibilityBridge.performAction (cyclomatic 38) · ×1
  • AccessibilityBridge.performAction (cyclomatic 38) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:948 — AccessibilityBridge.performAction has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SnippetChecker._extractSnippets (cyclomatic 37) · ×1
  • _SnippetChecker._extractSnippets (cyclomatic 37) dev/bots/analyze_snippet_code.dart:615 — _SnippetChecker._extractSnippets has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DataTable.build (cyclomatic 37) · ×1
  • DataTable.build (cyclomatic 37) packages/flutter/lib/src/material/data_table.dart:1034 — DataTable.build has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _LocalizedShortcutLabeler._getModifierLabel (cyclomatic 37) · ×1
  • _LocalizedShortcutLabeler._getModifierLabel (cyclomatic 37) packages/flutter/lib/src/material/menu_anchor.dart:2663 — _LocalizedShortcutLabeler._getModifierLabel has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticsData.== (cyclomatic 37) · ×1
  • SemanticsData.== (cyclomatic 37) packages/flutter/lib/src/semantics/semantics.dart:1577 — SemanticsData.== has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · NavigatorState._updatePages (cyclomatic 37) · ×1
  • NavigatorState._updatePages (cyclomatic 37) packages/flutter/lib/src/widgets/navigator.dart:4146 — NavigatorState._updatePages has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CachedArtifacts._getHostArtifactPath (cyclomatic 37) · ×1
  • CachedArtifacts._getHostArtifactPath (cyclomatic 37) packages/flutter_tools/lib/src/artifacts.dart:715 — CachedArtifacts._getHostArtifactPath has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CachedLocalEngineArtifacts.getArtifactPath (cyclomatic 37) · ×1
  • CachedLocalEngineArtifacts.getArtifactPath (cyclomatic 37) packages/flutter_tools/lib/src/artifacts.dart:1076 — CachedLocalEngineArtifacts.getArtifactPath has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EnginePlatformDispatcher._sendPlatformMessage (cyclomatic 37) · ×1
  • EnginePlatformDispatcher._sendPlatformMessage (cyclomatic 37) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:474 — EnginePlatformDispatcher._sendPlatformMessage has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _SnippetChecker._processBlock (cyclomatic 36) · ×1
  • _SnippetChecker._processBlock (cyclomatic 36) dev/bots/analyze_snippet_code.dart:776 — _SnippetChecker._processBlock has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AOTSnapshotter.build (cyclomatic 36) · ×1
  • AOTSnapshotter.build (cyclomatic 36) packages/flutter_tools/lib/src/base/build.dart:114 — AOTSnapshotter.build has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KernelSnapshot.build (cyclomatic 36) · ×1
  • KernelSnapshot.build (cyclomatic 36) packages/flutter_tools/lib/src/build_system/targets/common.dart:182 — KernelSnapshot.build has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DebuggingOptions.getIOSLaunchArguments (cyclomatic 36) · ×1
  • DebuggingOptions.getIOSLaunchArguments (cyclomatic 36) packages/flutter_tools/lib/src/device.dart:1274 — DebuggingOptions.getIOSLaunchArguments has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextLayout.addLine (cyclomatic 36) · ×1
  • TextLayout.addLine (cyclomatic 36) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:222 — TextLayout.addLine has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SliverAppBarDelegate.shouldRebuild (cyclomatic 35) · ×1
  • _SliverAppBarDelegate.shouldRebuild (cyclomatic 35) packages/flutter/lib/src/material/app_bar.dart:1430 — _SliverAppBarDelegate.shouldRebuild has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _DropdownButtonState.build (cyclomatic 35) · ×1
  • _DropdownButtonState.build (cyclomatic 35) packages/flutter/lib/src/material/dropdown.dart:1560 — _DropdownButtonState.build has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextInput._handleTextInputInvocation (cyclomatic 35) · ×1
  • TextInput._handleTextInputInvocation (cyclomatic 35) packages/flutter/lib/src/services/text_input.dart:2186 — TextInput._handleTextInputInvocation has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Element.updateChildren (cyclomatic 35) · ×1
  • Element.updateChildren (cyclomatic 35) packages/flutter/lib/src/widgets/framework.dart:4112 — Element.updateChildren has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextSelectionGestureDetectorBuilder.onDragSelectionStart (cyclomatic 35) · ×1
  • TextSelectionGestureDetectorBuilder.onDragSelectionStart (cyclomatic 35) packages/flutter/lib/src/widgets/text_selection.dart:3093 — TextSelectionGestureDetectorBuilder.onDragSelectionStart has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FlutterTextUtils.getOffsetAfter (cyclomatic 34) · ×1
  • FlutterTextUtils.getOffsetAfter (cyclomatic 34) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java:197 — FlutterTextUtils.getOffsetAfter has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterTextUtils.getOffsetBefore (cyclomatic 34) · ×1
  • FlutterTextUtils.getOffsetBefore (cyclomatic 34) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java:57 — FlutterTextUtils.getOffsetBefore has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ScaffoldLayout.performLayout (cyclomatic 33) · ×1
  • _ScaffoldLayout.performLayout (cyclomatic 33) packages/flutter/lib/src/material/scaffold.dart:1023 — _ScaffoldLayout.performLayout has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SnackBarState.build (cyclomatic 33) · ×1
  • _SnackBarState.build (cyclomatic 33) packages/flutter/lib/src/material/snack_bar.dart:621 — _SnackBarState.build has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Doctor.diagnose (cyclomatic 33) · ×1
  • Doctor.diagnose (cyclomatic 33) packages/flutter_tools/lib/src/doctor.dart:295 — Doctor.diagnose has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResidentWebRunner.restart (cyclomatic 33) · ×1
  • ResidentWebRunner.restart (cyclomatic 33) packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:424 — ResidentWebRunner.restart has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderSliverWeightedCarousel.performLayout (cyclomatic 32) · ×1
  • _RenderSliverWeightedCarousel.performLayout (cyclomatic 32) packages/flutter/lib/src/material/carousel.dart:1292 — _RenderSliverWeightedCarousel.performLayout has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderOverflowBar.performLayout (cyclomatic 32) · ×1
  • _RenderOverflowBar.performLayout (cyclomatic 32) packages/flutter/lib/src/widgets/overflow_bar.dart:493 — _RenderOverflowBar.performLayout has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConfigCommand.runCommand (cyclomatic 32) · ×1
  • ConfigCommand.runCommand (cyclomatic 32) packages/flutter_tools/lib/src/commands/config.dart:192 — ConfigCommand.runCommand has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KernelCompiler.compile (cyclomatic 32) · ×1
  • KernelCompiler.compile (cyclomatic 32) packages/flutter_tools/lib/src/compile.dart:285 — KernelCompiler.compile has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Message._inferPlaceholders (cyclomatic 32) · ×1
  • Message._inferPlaceholders (cyclomatic 32) packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart:556 — Message._inferPlaceholders has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderListTile._computeSizes (cyclomatic 31) · ×1
  • _RenderListTile._computeSizes (cyclomatic 31) packages/flutter/lib/src/material/list_tile.dart:1551 — _RenderListTile._computeSizes has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderSliverList.performLayout (cyclomatic 31) · ×1
  • RenderSliverList.performLayout (cyclomatic 31) packages/flutter/lib/src/rendering/sliver_list.dart:45 — RenderSliverList.performLayout has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderTable.assembleSemanticsNode (cyclomatic 31) · ×1
  • RenderTable.assembleSemanticsNode (cyclomatic 31) packages/flutter/lib/src/rendering/table.dart:619 — RenderTable.assembleSemanticsNode has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RawKeyboard._synchronizeModifiers (cyclomatic 31) · ×1
  • RawKeyboard._synchronizeModifiers (cyclomatic 31) packages/flutter/lib/src/services/raw_keyboard.dart:985 — RawKeyboard._synchronizeModifiers has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SelectableRegionState._startNewMouseSelectionGesture (cyclomatic 31) · ×1
  • SelectableRegionState._startNewMouseSelectionGesture (cyclomatic 31) packages/flutter/lib/src/widgets/selectable_region.dart:745 — SelectableRegionState._startNewMouseSelectionGesture has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _SelectableTextContainerDelegate._handleSelectParagraph (cyclomatic 31) · ×1
  • _SelectableTextContainerDelegate._handleSelectParagraph (cyclomatic 31) packages/flutter/lib/src/widgets/text.dart:1020 — _SelectableTextContainerDelegate._handleSelectParagraph has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextSelectionGestureDetectorBuilder.onSingleTapUp (cyclomatic 31) · ×1
  • TextSelectionGestureDetectorBuilder.onSingleTapUp (cyclomatic 31) packages/flutter/lib/src/widgets/text_selection.dart:2623 — TextSelectionGestureDetectorBuilder.onSingleTapUp has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser.lexIntoTokens (cyclomatic 31) · ×1
  • Parser.lexIntoTokens (cyclomatic 31) packages/flutter_tools/lib/src/localizations/message_parser.dart:235 — Parser.lexIntoTokens has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DatePickerDialogState.build (cyclomatic 30) · ×1
  • _DatePickerDialogState.build (cyclomatic 30) packages/flutter/lib/src/material/date_picker.dart:563 — _DatePickerDialogState.build has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderSlider.paint (cyclomatic 30) · ×1
  • _RenderSlider.paint (cyclomatic 30) packages/flutter/lib/src/material/slider.dart:1728 — _RenderSlider.paint has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderSliverFixedExtentBoxAdaptor.performLayout (cyclomatic 30) · ×1
  • RenderSliverFixedExtentBoxAdaptor.performLayout (cyclomatic 30) packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:337 — RenderSliverFixedExtentBoxAdaptor.performLayout has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderViewportBase.getOffsetToReveal (cyclomatic 30) · ×1
  • RenderViewportBase.getOffsetToReveal (cyclomatic 30) packages/flutter/lib/src/rendering/viewport.dart:1053 — RenderViewportBase.getOffsetToReveal has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticsNode._isDifferentFromCurrentSemanticAnnotation (cyclomatic 30) · ×1
  • SemanticsNode._isDifferentFromCurrentSemanticAnnotation (cyclomatic 30) packages/flutter/lib/src/semantics/semantics.dart:3476 — SemanticsNode._isDifferentFromCurrentSemanticAnnotation has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · 1.onMethodCall (cyclomatic 30) · ×1
  • 1.onMethodCall (cyclomatic 30) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java:39 — 1.onMethodCall has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SnippetDartdocParser.parseComment (cyclomatic 29) · ×1
  • SnippetDartdocParser.parseComment (cyclomatic 29) dev/snippets/lib/src/snippet_parser.dart:199 — SnippetDartdocParser.parseComment has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RefreshIndicatorState._handleScrollNotification (cyclomatic 29) · ×1
  • RefreshIndicatorState._handleScrollNotification (cyclomatic 29) packages/flutter/lib/src/material/refresh_indicator.dart:421 — RefreshIndicatorState._handleScrollNotification has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SwitchPainter.paint (cyclomatic 29) · ×1
  • _SwitchPainter.paint (cyclomatic 29) packages/flutter/lib/src/material/switch.dart:1510 — _SwitchPainter.paint has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SelectableRegionState._handleMouseDragUpdate (cyclomatic 29) · ×1
  • SelectableRegionState._handleMouseDragUpdate (cyclomatic 29) packages/flutter/lib/src/widgets/selectable_region.dart:831 — SelectableRegionState._handleMouseDragUpdate has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · VMServiceFlutterDriver.connect (cyclomatic 29) · ×1
  • VMServiceFlutterDriver.connect (cyclomatic 29) packages/flutter_driver/lib/src/driver/vmservice_driver.dart:32 — VMServiceFlutterDriver.connect has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LocalizationsGenerator._generateMethod (cyclomatic 29) · ×1
  • LocalizationsGenerator._generateMethod (cyclomatic 29) packages/flutter_tools/lib/src/localizations/gen_l10n.dart:1260 — LocalizationsGenerator._generateMethod has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextLayout.getBoxesForRange (cyclomatic 29) · ×1
  • TextLayout.getBoxesForRange (cyclomatic 29) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:627 — TextLayout.getBoxesForRange has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextLayout.getPositionForOffset (cyclomatic 29) · ×1
  • TextLayout.getPositionForOffset (cyclomatic 29) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:814 — TextLayout.getPositionForOffset has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ButtonStyle.== (cyclomatic 28) · ×1
  • ButtonStyle.== (cyclomatic 28) packages/flutter/lib/src/material/button_style.dart:557 — ButtonStyle.== has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _Decoration.== (cyclomatic 28) · ×1
  • _Decoration.== (cyclomatic 28) packages/flutter/lib/src/material/input_decorator.dart:642 — _Decoration.== has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Border.paint (cyclomatic 28) · ×1
  • Border.paint (cyclomatic 28) packages/flutter/lib/src/painting/box_border.dart:620 — Border.paint has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextStyle.== (cyclomatic 28) · ×1
  • TextStyle.== (cyclomatic 28) packages/flutter/lib/src/painting/text_style.dart:1491 — TextStyle.== has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BoxConstraints.debugAssertIsValid (cyclomatic 28) · ×1
  • BoxConstraints.debugAssertIsValid (cyclomatic 28) packages/flutter/lib/src/rendering/box.dart:547 — BoxConstraints.debugAssertIsValid has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaQueryData.== (cyclomatic 28) · ×1
  • MediaQueryData.== (cyclomatic 28) packages/flutter/lib/src/widgets/media_query.dart:1201 — MediaQueryData.== has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: MediaQuery.updateShouldNotifyDependent (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DevFS.updateBundle (cyclomatic 28) · ×1
  • DevFS.updateBundle (cyclomatic 28) packages/flutter_tools/lib/src/devfs.dart:686 — DevFS.updateBundle has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DebuggingOptions._getAndroidEngineConfig (cyclomatic 28) · ×1
  • DebuggingOptions._getAndroidEngineConfig (cyclomatic 28) packages/flutter_tools/lib/src/device.dart:1432 — DebuggingOptions._getAndroidEngineConfig has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardConverter._handleEvent (cyclomatic 28) · ×1
  • KeyboardConverter._handleEvent (cyclomatic 28) engine/src/flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart:403 — KeyboardConverter._handleEvent has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PointerDataConverter.convert (cyclomatic 28) · ×1
  • PointerDataConverter.convert (cyclomatic 28) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:235 — PointerDataConverter.convert has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterShellArgs.fromIntent (cyclomatic 28) · ×1
  • FlutterShellArgs.fromIntent (cyclomatic 28) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java:93 — FlutterShellArgs.fromIntent has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CupertinoTextFieldState.build (cyclomatic 27) · ×1
  • _CupertinoTextFieldState.build (cyclomatic 27) packages/flutter/lib/src/cupertino/text_field.dart:1444 — _CupertinoTextFieldState.build has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RenderDecoration._layout (cyclomatic 27) · ×1
  • _RenderDecoration._layout (cyclomatic 27) packages/flutter/lib/src/material/input_decorator.dart:953 — _RenderDecoration._layout has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _TimePickerModel.updateShouldNotifyDependent (cyclomatic 27) · ×1
  • _TimePickerModel.updateShouldNotifyDependent (cyclomatic 27) packages/flutter/lib/src/material/time_picker.dart:165 — _TimePickerModel.updateShouldNotifyDependent has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TimePickerThemeData.== (cyclomatic 27) · ×1
  • TimePickerThemeData.== (cyclomatic 27) packages/flutter/lib/src/material/time_picker_theme.dart:459 — TimePickerThemeData.== has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BorderRadiusGeometry.toString (cyclomatic 27) · ×1
  • BorderRadiusGeometry.toString (cyclomatic 27) packages/flutter/lib/src/painting/border_radius.dart:223 — BorderRadiusGeometry.toString has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsNode.getSemanticsData (cyclomatic 27) · ×1
  • SemanticsNode.getSemanticsData (cyclomatic 27) packages/flutter/lib/src/semantics/semantics.dart:3940 — SemanticsNode.getSemanticsData has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · EditableTextState._handleContextMenuOnScroll (cyclomatic 27) · ×1
  • EditableTextState._handleContextMenuOnScroll (cyclomatic 27) packages/flutter/lib/src/widgets/editable_text.dart:4396 — EditableTextState._handleContextMenuOnScroll has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _HighlightModeManager.handleKeyMessage (cyclomatic 27) · ×1
  • _HighlightModeManager.handleKeyMessage (cyclomatic 27) packages/flutter/lib/src/widgets/focus_manager.dart:2219 — _HighlightModeManager.handleKeyMessage has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BuildOwner.finalizeTree (cyclomatic 27) · ×1
  • BuildOwner.finalizeTree (cyclomatic 27) packages/flutter/lib/src/widgets/framework.dart:3366 — BuildOwner.finalizeTree has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SliverReorderableListState._dragUpdateItems (cyclomatic 27) · ×1
  • SliverReorderableListState._dragUpdateItems (cyclomatic 27) packages/flutter/lib/src/widgets/reorderable_list.dart:1044 — SliverReorderableListState._dragUpdateItems has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiSelectableSelectionContainerDelegate._adjustSelection (cyclomatic 27) · ×1
  • MultiSelectableSelectionContainerDelegate._adjustSelection (cyclomatic 27) packages/flutter/lib/src/widgets/selectable_region.dart:3340 — MultiSelectableSelectionContainerDelegate._adjustSelection has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DesktopDevice._computeEnvironment (cyclomatic 27) · ×1
  • DesktopDevice._computeEnvironment (cyclomatic 27) packages/flutter_tools/lib/src/desktop_device.dart:257 — DesktopDevice._computeEnvironment has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CupertinoDatePickerDateTimeState.build (cyclomatic 26) · ×1
  • _CupertinoDatePickerDateTimeState.build (cyclomatic 26) packages/flutter/lib/src/cupertino/date_picker.dart:1209 — _CupertinoDatePickerDateTimeState.build has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChipThemeData.== (cyclomatic 26) · ×1
  • ChipThemeData.== (cyclomatic 26) packages/flutter/lib/src/material/chip_theme.dart:607 — ChipThemeData.== has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _DropdownMenuState.build (cyclomatic 26) · ×1
  • _DropdownMenuState.build (cyclomatic 26) packages/flutter/lib/src/material/dropdown_menu.dart:1140 — _DropdownMenuState.build has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RailDestinationState.build (cyclomatic 26) · ×1
  • _RailDestinationState.build (cyclomatic 26) packages/flutter/lib/src/material/navigation_rail.dart:699 — _RailDestinationState.build has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SliderState._buildMaterialSlider (cyclomatic 26) · ×1
  • _SliderState._buildMaterialSlider (cyclomatic 26) packages/flutter/lib/src/material/slider.dart:831 — _SliderState._buildMaterialSlider has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextStyle.compareTo (cyclomatic 26) · ×1
  • TextStyle.compareTo (cyclomatic 26) packages/flutter/lib/src/painting/text_style.dart:1450 — TextStyle.compareTo has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RenderTable.performLayout (cyclomatic 26) · ×1
  • RenderTable.performLayout (cyclomatic 26) packages/flutter/lib/src/rendering/table.dart:1322 — RenderTable.performLayout has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DirectionalFocusTraversalPolicyMixin._popPolicyDataIfNeeded (cyclomatic 26) · ×1
  • DirectionalFocusTraversalPolicyMixin._popPolicyDataIfNeeded (cyclomatic 26) packages/flutter/lib/src/widgets/focus_traversal.dart:1122 — DirectionalFocusTraversalPolicyMixin._popPolicyDataIfNeeded has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DaemonDomain.getSupportedPlatforms (cyclomatic 26) · ×1
  • DaemonDomain.getSupportedPlatforms (cyclomatic 26) packages/flutter_tools/lib/src/commands/daemon.dart:608 — DaemonDomain.getSupportedPlatforms has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToolDependencies.bootstrap (cyclomatic 26) · ×1
  • ToolDependencies.bootstrap (cyclomatic 26) packages/flutter_tools/lib/src/context/tool_dependencies.dart:167 — ToolDependencies.bootstrap has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SwiftPackageManagerIntegrationMigration.migrate (cyclomatic 26) · ×1
  • SwiftPackageManagerIntegrationMigration.migrate (cyclomatic 26) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:148 — SwiftPackageManagerIntegrationMigration.migrate has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StandardMessageCodec.writeValue (cyclomatic 26) · ×1
  • StandardMessageCodec.writeValue (cyclomatic 26) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java:219 — StandardMessageCodec.writeValue has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AccessibilityBridge.predictCursorMovement (cyclomatic 26) · ×1
  • AccessibilityBridge.predictCursorMovement (cyclomatic 26) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:1224 — AccessibilityBridge.predictCursorMovement has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LongPressGestureRecognizer.isPointerAllowed (cyclomatic 25) · ×1
  • LongPressGestureRecognizer.isPointerAllowed (cyclomatic 25) packages/flutter/lib/src/gestures/long_press.dart:601 — LongPressGestureRecognizer.isPointerAllowed has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AlertDialog.build (cyclomatic 25) · ×1
  • AlertDialog.build (cyclomatic 25) packages/flutter/lib/src/material/dialog.dart:764 — AlertDialog.build has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ListTileThemeData.== (cyclomatic 25) · ×1
  • ListTileThemeData.== (cyclomatic 25) packages/flutter/lib/src/material/list_tile_theme.dart:258 — ListTileThemeData.== has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _LocalizedShortcutLabeler.getShortcutLabel (cyclomatic 25) · ×1
  • _LocalizedShortcutLabeler.getShortcutLabel (cyclomatic 25) packages/flutter/lib/src/material/menu_anchor.dart:2526 — _LocalizedShortcutLabeler.getShortcutLabel has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderObject.layout (cyclomatic 25) · ×1
  • RenderObject.layout (cyclomatic 25) packages/flutter/lib/src/rendering/object.dart:2793 — RenderObject.layout has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditableTextState.build (cyclomatic 25) · ×1
  • EditableTextState.build (cyclomatic 25) packages/flutter/lib/src/widgets/editable_text.dart:5877 — EditableTextState.build has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FocusTraversalPolicy._moveFocus (cyclomatic 25) · ×1
  • FocusTraversalPolicy._moveFocus (cyclomatic 25) packages/flutter/lib/src/widgets/focus_traversal.dart:575 — FocusTraversalPolicy._moveFocus has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _BuildIOSSubCommand.runCommand (cyclomatic 25) · ×1
  • _BuildIOSSubCommand.runCommand (cyclomatic 25) packages/flutter_tools/lib/src/commands/build_ios.dart:976 — _BuildIOSSubCommand.runCommand has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultResidentCompiler._compile (cyclomatic 25) · ×1
  • DefaultResidentCompiler._compile (cyclomatic 25) packages/flutter_tools/lib/src/compile.dart:952 — DefaultResidentCompiler._compile has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WebAssetServer.handleRequest (cyclomatic 25) · ×1
  • WebAssetServer.handleRequest (cyclomatic 25) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:438 — WebAssetServer.handleRequest has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterCommandRunner.runCommand (cyclomatic 25) · ×1
  • FlutterCommandRunner.runCommand (cyclomatic 25) packages/flutter_tools/lib/src/runner/flutter_command_runner.dart:547 — FlutterCommandRunner.runCommand has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextStyle.toString (cyclomatic 25) · ×1
  • TextStyle.toString (cyclomatic 25) engine/src/flutter/lib/ui/text.dart:1900 — TextStyle.toString has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FeltConfig.fromFile (cyclomatic 25) · ×1
  • FeltConfig.fromFile (cyclomatic 25) engine/src/flutter/lib/web_ui/dev/felt_config.dart:121 — FeltConfig.fromFile has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsObject.updateChildren (cyclomatic 25) · ×1
  • SemanticsObject.updateChildren (cyclomatic 25) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:2097 — SemanticsObject.updateChildren has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SemanticsObject._createSemanticRole (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _CupertinoButtonState.build (cyclomatic 24) · ×1
  • _CupertinoButtonState.build (cyclomatic 24) packages/flutter/lib/src/cupertino/button.dart:459 — _CupertinoButtonState.build has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LicenseEntryWithLineBreaks.paragraphs (cyclomatic 24) · ×1
  • LicenseEntryWithLineBreaks.paragraphs (cyclomatic 24) packages/flutter/lib/src/foundation/licenses.dart:152 — LicenseEntryWithLineBreaks.paragraphs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DragGestureRecognizer.handleEvent (cyclomatic 24) · ×1
  • DragGestureRecognizer.handleEvent (cyclomatic 24) packages/flutter/lib/src/gestures/monodrag.dart:653 — DragGestureRecognizer.handleEvent has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FloatingActionButtonThemeData.== (cyclomatic 24) · ×1
  • FloatingActionButtonThemeData.== (cyclomatic 24) packages/flutter/lib/src/material/floating_action_button_theme.dart:278 — FloatingActionButtonThemeData.== has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ListTile.build (cyclomatic 24) · ×1
  • ListTile.build (cyclomatic 24) packages/flutter/lib/src/material/list_tile.dart:811 — ListTile.build has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _TabBarState.build (cyclomatic 24) · ×1
  • _TabBarState.build (cyclomatic 24) packages/flutter/lib/src/material/tabs.dart:1954 — _TabBarState.build has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BorderDirectional.paint (cyclomatic 24) · ×1
  • BorderDirectional.paint (cyclomatic 24) packages/flutter/lib/src/painting/box_border.dart:1000 — BorderDirectional.paint has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderCustomPaint._updateSemanticsChildren (cyclomatic 24) · ×1
  • RenderCustomPaint._updateSemanticsChildren (cyclomatic 24) packages/flutter/lib/src/rendering/custom_paint.dart:729 — RenderCustomPaint._updateSemanticsChildren has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderSliverMainAxisGroup.performLayout (cyclomatic 24) · ×1
  • RenderSliverMainAxisGroup.performLayout (cyclomatic 24) packages/flutter/lib/src/rendering/sliver_group.dart:272 — RenderSliverMainAxisGroup.performLayout has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SemanticsNode._replaceChildren (cyclomatic 24) · ×1
  • SemanticsNode._replaceChildren (cyclomatic 24) packages/flutter/lib/src/semantics/semantics.dart:3101 — SemanticsNode._replaceChildren has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SemanticsConfiguration.isCompatibleWith (cyclomatic 24) · ×1
  • SemanticsConfiguration.isCompatibleWith (cyclomatic 24) packages/flutter/lib/src/semantics/semantics.dart:6993 — SemanticsConfiguration.isCompatibleWith has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _WidgetsAppState.build (cyclomatic 24) · ×1
  • _WidgetsAppState.build (cyclomatic 24) packages/flutter/lib/src/widgets/app.dart:1702 — _WidgetsAppState.build has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ScrollableSelectionContainerDelegate._jumpToEdge (cyclomatic 24) · ×1
  • _ScrollableSelectionContainerDelegate._jumpToEdge (cyclomatic 24) packages/flutter/lib/src/widgets/scrollable.dart:1426 — _ScrollableSelectionContainerDelegate._jumpToEdge has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnalyzeCommand.runCommand (cyclomatic 24) · ×1
  • AnalyzeCommand.runCommand (cyclomatic 24) packages/flutter_tools/lib/src/commands/analyze.dart:237 — AnalyzeCommand.runCommand has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdatePackagesCommand.runCommand (cyclomatic 24) · ×1
  • UpdatePackagesCommand.runCommand (cyclomatic 24) packages/flutter_tools/lib/src/commands/update_packages.dart:144 — UpdatePackagesCommand.runCommand has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterCommand.getBuildInfo (cyclomatic 24) · ×1
  • FlutterCommand.getBuildInfo (cyclomatic 24) packages/flutter_tools/lib/src/runner/flutter_command.dart:608 — FlutterCommand.getBuildInfo has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ModuleTest.call (cyclomatic 24) · ×1
  • _ModuleTest.call (cyclomatic 24) dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:44 — _ModuleTest.call has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EngineTextStyle.== (cyclomatic 24) · ×1
  • EngineTextStyle.== (cyclomatic 24) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:513 — EngineTextStyle.== has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _Visitor.visitAnnotation (cyclomatic 23) · ×1
  • _Visitor.visitAnnotation (cyclomatic 23) dev/flutter_analyzer_plugin/lib/src/rules/deprecation_syntax.dart:83 — _Visitor.visitAnnotation has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderButtonBarRow.performLayout (cyclomatic 23) · ×1
  • _RenderButtonBarRow.performLayout (cyclomatic 23) packages/flutter/lib/src/material/button_bar.dart:380 — _RenderButtonBarRow.performLayout has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _LinearProgressIndicatorPainter.paint (cyclomatic 23) · ×1
  • _LinearProgressIndicatorPainter.paint (cyclomatic 23) packages/flutter/lib/src/material/progress_indicator.dart:210 — _LinearProgressIndicatorPainter.paint has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _IndicatorPainter._applyElasticEffect (cyclomatic 23) · ×1
  • _IndicatorPainter._applyElasticEffect (cyclomatic 23) packages/flutter/lib/src/material/tabs.dart:682 — _IndicatorPainter._applyElasticEffect has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RenderObjectSemantics.updateChildren (cyclomatic 23) · ×1
  • _RenderObjectSemantics.updateChildren (cyclomatic 23) packages/flutter/lib/src/rendering/object.dart:5793 — _RenderObjectSemantics.updateChildren has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextEditingDelta.fromJSON (cyclomatic 23) · ×1
  • TextEditingDelta.fromJSON (cyclomatic 23) packages/flutter/lib/src/services/text_editing_delta.dart:62 — TextEditingDelta.fromJSON has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WindowPositioner.placeWindow (cyclomatic 23) · ×1
  • WindowPositioner.placeWindow (cyclomatic 23) packages/flutter/lib/src/widgets/_window_positioner.dart:377 — WindowPositioner.placeWindow has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppLifecycleListener.didChangeAppLifecycleState (cyclomatic 23) · ×1
  • AppLifecycleListener.didChangeAppLifecycleState (cyclomatic 23) packages/flutter/lib/src/widgets/app_lifecycle_listener.dart:213 — AppLifecycleListener.didChangeAppLifecycleState has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ModalBarrier.build (cyclomatic 23) · ×1
  • ModalBarrier.build (cyclomatic 23) packages/flutter/lib/src/widgets/modal_barrier.dart:203 — ModalBarrier.build has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · _SemanticsDebuggerPainter.getMessage (cyclomatic 23) · ×1
  • _SemanticsDebuggerPainter.getMessage (cyclomatic 23) packages/flutter/lib/src/widgets/semantics_debugger.dart:223 — _SemanticsDebuggerPainter.getMessage has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DriveCommand.runCommand (cyclomatic 23) · ×1
  • DriveCommand.runCommand (cyclomatic 23) packages/flutter_tools/lib/src/commands/drive.dart:323 — DriveCommand.runCommand has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomDeviceAppSession._getEngineOptions (cyclomatic 23) · ×1
  • CustomDeviceAppSession._getEngineOptions (cyclomatic 23) packages/flutter_tools/lib/src/custom_devices/custom_device.dart:267 — CustomDeviceAppSession._getEngineOptions has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MDnsVmServiceDiscovery._doPollingVmService (cyclomatic 23) · ×1
  • MDnsVmServiceDiscovery._doPollingVmService (cyclomatic 23) packages/flutter_tools/lib/src/mdns_discovery.dart:299 — MDnsVmServiceDiscovery._doPollingVmService has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GalleryTransitionTest.call (cyclomatic 23) · ×1
  • GalleryTransitionTest.call (cyclomatic 23) dev/devicelab/lib/tasks/gallery.dart:106 — GalleryTransitionTest.call has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlatformViewEmbedder._updateDomForNewComposition (cyclomatic 23) · ×1
  • PlatformViewEmbedder._updateDomForNewComposition (cyclomatic 23) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:459 — PlatformViewEmbedder._updateDomForNewComposition has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EngineImage.toByteData (cyclomatic 23) · ×1
  • EngineImage.toByteData (cyclomatic 23) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/image.dart:134 — EngineImage.toByteData has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebTextStyle.== (cyclomatic 23) · ×1
  • WebTextStyle.== (cyclomatic 23) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:297 — WebTextStyle.== has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _CupertinoListTileState.build (cyclomatic 22) · ×1
  • _CupertinoListTileState.build (cyclomatic 22) packages/flutter/lib/src/cupertino/list_tile.dart:274 — _CupertinoListTileState.build has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DebugViewMetricsOverride.toJson (cyclomatic 22) · ×1
  • DebugViewMetricsOverride.toJson (cyclomatic 22) packages/flutter/lib/src/foundation/debug.dart:644 — DebugViewMetricsOverride.toJson has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _PrefixedStringBuilder._wordWrapLine (cyclomatic 22) · ×1
  • _PrefixedStringBuilder._wordWrapLine (cyclomatic 22) packages/flutter/lib/src/foundation/diagnostics.dart:863 — _PrefixedStringBuilder._wordWrapLine has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderBox.debugAssertDoesMeetConstraints (cyclomatic 22) · ×1
  • RenderBox.debugAssertDoesMeetConstraints (cyclomatic 22) packages/flutter/lib/src/rendering/box.dart:2565 — RenderBox.debugAssertDoesMeetConstraints has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderListWheelViewport.performLayout (cyclomatic 22) · ×1
  • RenderListWheelViewport.performLayout (cyclomatic 22) packages/flutter/lib/src/rendering/list_wheel_viewport.dart:652 — RenderListWheelViewport.performLayout has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionStartEdgeByTextBoundary (cyclomatic 22) · ×1
  • _SelectableFragment._updateSelectionStartEdgeByTextBoundary (cyclomatic 22) packages/flutter/lib/src/rendering/paragraph.dart:1711 — _SelectableFragment._updateSelectionStartEdgeByTextBoundary has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionEndEdgeByTextBoundary (cyclomatic 22) · ×1
  • _SelectableFragment._updateSelectionEndEdgeByTextBoundary (cyclomatic 22) packages/flutter/lib/src/rendering/paragraph.dart:1810 — _SelectableFragment._updateSelectionEndEdgeByTextBoundary has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderTable._computeColumnWidths (cyclomatic 22) · ×1
  • RenderTable._computeColumnWidths (cyclomatic 22) packages/flutter/lib/src/rendering/table.dart:1064 — RenderTable._computeColumnWidths has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextInputConfiguration.== (cyclomatic 22) · ×1
  • TextInputConfiguration.== (cyclomatic 22) packages/flutter/lib/src/services/text_input.dart:843 — TextInputConfiguration.== has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _DismissibleState._handleDragUpdate (cyclomatic 22) · ×1
  • _DismissibleState._handleDragUpdate (cyclomatic 22) packages/flutter/lib/src/widgets/dismissible.dart:383 — _DismissibleState._handleDragUpdate has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditableTextState.didChangeDependencies (cyclomatic 22) · ×1
  • EditableTextState.didChangeDependencies (cyclomatic 22) packages/flutter/lib/src/widgets/editable_text.dart:3400 — EditableTextState.didChangeDependencies has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BuildWebCommand.runCommand (cyclomatic 22) · ×1
  • BuildWebCommand.runCommand (cyclomatic 22) packages/flutter_tools/lib/src/commands/build_web.dart:51 — BuildWebCommand.runCommand has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomDevicesAddCommand.runInteractivelySsh (cyclomatic 22) · ×1
  • CustomDevicesAddCommand.runInteractivelySsh (cyclomatic 22) packages/flutter_tools/lib/src/commands/custom_devices.dart:463 — CustomDevicesAddCommand.runInteractivelySsh has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RunCommand.runCommand (cyclomatic 22) · ×1
  • RunCommand.runCommand (cyclomatic 22) packages/flutter_tools/lib/src/commands/run.dart:731 — RunCommand.runCommand has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LLDBInitMigration._isSchemeMigrated (cyclomatic 22) · ×1
  • LLDBInitMigration._isSchemeMigrated (cyclomatic 22) packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:88 — LLDBInitMigration._isSchemeMigrated has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WebTextStyle.toString (cyclomatic 22) · ×1
  • WebTextStyle.toString (cyclomatic 22) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:375 — WebTextStyle.toString has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyEmbedderResponder.handleEventImpl (cyclomatic 22) · ×1
  • KeyEmbedderResponder.handleEventImpl (cyclomatic 22) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/KeyEmbedderResponder.java:275 — KeyEmbedderResponder.handleEventImpl has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextInputPlugin.inputTypeFromTextInputType (cyclomatic 22) · ×1
  • TextInputPlugin.inputTypeFromTextInputType (cyclomatic 22) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java:247 — TextInputPlugin.inputTypeFromTextInputType has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AccessibilityBridge.createAccessibilityNodeInfo (cyclomatic 22) · ×1
  • AccessibilityBridge.createAccessibilityNodeInfo (cyclomatic 22) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:781 — AccessibilityBridge.createAccessibilityNodeInfo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _TaskRunner.run (cyclomatic 21) · ×1
  • _TaskRunner.run (cyclomatic 21) dev/devicelab/lib/framework/framework.dart:165 — _TaskRunner.run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ButtonStyleState.build (cyclomatic 21) · ×1
  • _ButtonStyleState.build (cyclomatic 21) packages/flutter/lib/src/material/button_style_button.dart:374 — _ButtonStyleState.build has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SubmenuButtonState.build (cyclomatic 21) · ×1
  • _SubmenuButtonState.build (cyclomatic 21) packages/flutter/lib/src/material/menu_anchor.dart:2112 — _SubmenuButtonState.build has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScaffoldState.build (cyclomatic 21) · ×1
  • ScaffoldState.build (cyclomatic 21) packages/flutter/lib/src/material/scaffold.dart:3007 — ScaffoldState.build has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SelectToggleButtonRenderObject.paint (cyclomatic 21) · ×1
  • _SelectToggleButtonRenderObject.paint (cyclomatic 21) packages/flutter/lib/src/material/toggle_buttons.dart:1327 — _SelectToggleButtonRenderObject.paint has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResizeImage.loadImage (cyclomatic 21) · ×1
  • ResizeImage.loadImage (cyclomatic 21) packages/flutter/lib/src/painting/image_provider.dart:1415 — ResizeImage.loadImage has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinearBorder.paint (cyclomatic 21) · ×1
  • LinearBorder.paint (cyclomatic 21) packages/flutter/lib/src/painting/linear_border.dart:265 — LinearBorder.paint has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderTable.setFlatChildren (cyclomatic 21) · ×1
  • RenderTable.setFlatChildren (cyclomatic 21) packages/flutter/lib/src/rendering/table.dart:797 — RenderTable.setFlatChildren has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RawKeyEvent.fromMessage (cyclomatic 21) · ×1
  • RawKeyEvent.fromMessage (cyclomatic 21) packages/flutter/lib/src/services/raw_keyboard.dart:378 — RawKeyEvent.fromMessage has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UpdateTextSelectionAction.invoke (cyclomatic 21) · ×1
  • _UpdateTextSelectionAction.invoke (cyclomatic 21) packages/flutter/lib/src/widgets/editable_text.dart:6707 — _UpdateTextSelectionAction.invoke has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SelectableRegionState._handleMouseTapUp (cyclomatic 21) · ×1
  • SelectableRegionState._handleMouseTapUp (cyclomatic 21) packages/flutter/lib/src/widgets/selectable_region.dart:942 — SelectableRegionState._handleMouseTapUp has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SourceVisitor.visitPattern (cyclomatic 21) · ×1
  • SourceVisitor.visitPattern (cyclomatic 21) packages/flutter_tools/lib/src/build_system/source.dart:79 — SourceVisitor.visitPattern has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlockUpstream.determine (cyclomatic 21) · ×1
  • FlockUpstream.determine (cyclomatic 21) packages/flutter_tools/lib/src/flock_version.dart:119 — FlockUpstream.determine has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterDevice.connect (cyclomatic 21) · ×1
  • FlutterDevice.connect (cyclomatic 21) packages/flutter_tools/lib/src/resident_runner.dart:143 — FlutterDevice.connect has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MobileSemanticsEnabler.tryEnableSemantics (cyclomatic 21) · ×1
  • MobileSemanticsEnabler.tryEnableSemantics (cyclomatic 21) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics_helper.dart:397 — MobileSemanticsEnabler.tryEnableSemantics has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AndroidTouchProcessor.addPointerForIndex (cyclomatic 21) · ×1
  • AndroidTouchProcessor.addPointerForIndex (cyclomatic 21) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java:305 — AndroidTouchProcessor.addPointerForIndex has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FlutterView.onApplyWindowInsets (cyclomatic 21) · ×1
  • FlutterView.onApplyWindowInsets (cyclomatic 21) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java:735 — FlutterView.onApplyWindowInsets has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · load (cyclomatic 21) · ×1
  • load (cyclomatic 21) engine/src/flutter/lib/web_ui/flutter_js/src/loader.js:85 — load has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterLocalFileComparator._fuzzyCompareWeb (cyclomatic 20) · ×1
  • FlutterLocalFileComparator._fuzzyCompareWeb (cyclomatic 20) packages/flutter_goldens/lib/flutter_goldens.dart:728 — FlutterLocalFileComparator._fuzzyCompareWeb has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CatmullRomCurve.validateControlPoints (cyclomatic 20) · ×1
  • CatmullRomCurve.validateControlPoints (cyclomatic 20) packages/flutter/lib/src/animation/curves.dart:1042 — CatmullRomCurve.validateControlPoints has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _MenuLayoutDelegate._positionChild (cyclomatic 20) · ×1
  • _MenuLayoutDelegate._positionChild (cyclomatic 20) packages/flutter/lib/src/cupertino/menu_anchor.dart:1285 — _MenuLayoutDelegate._positionChild has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ForcePressGestureRecognizer.handleEvent (cyclomatic 20) · ×1
  • ForcePressGestureRecognizer.handleEvent (cyclomatic 20) packages/flutter/lib/src/gestures/force_press.dart:235 — ForcePressGestureRecognizer.handleEvent has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppBarThemeData.== (cyclomatic 20) · ×1
  • AppBarThemeData.== (cyclomatic 20) packages/flutter/lib/src/material/app_bar_theme.dart:565 — AppBarThemeData.== has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _CheckboxState.build (cyclomatic 20) · ×1
  • _CheckboxState.build (cyclomatic 20) packages/flutter/lib/src/material/checkbox.dart:472 — _CheckboxState.build has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _DayItemState.build (cyclomatic 20) · ×1
  • _DayItemState.build (cyclomatic 20) packages/flutter/lib/src/material/date_picker.dart:2849 — _DayItemState.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _FlexibleSpaceBarState.build (cyclomatic 20) · ×1
  • _FlexibleSpaceBarState.build (cyclomatic 20) packages/flutter/lib/src/material/flexible_space_bar.dart:224 — _FlexibleSpaceBarState.build has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _InkResponseState.build (cyclomatic 20) · ×1
  • _InkResponseState.build (cyclomatic 20) packages/flutter/lib/src/material/ink_well.dart:1337 — _InkResponseState.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _MenuLayout._positionChild (cyclomatic 20) · ×1
  • _MenuLayout._positionChild (cyclomatic 20) packages/flutter/lib/src/material/menu_anchor.dart:3442 — _MenuLayout._positionChild has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _NavigationRailState.build (cyclomatic 20) · ×1
  • _NavigationRailState.build (cyclomatic 20) packages/flutter/lib/src/material/navigation_rail.dart:445 — _NavigationRailState.build has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _MaterialSwitchState.build (cyclomatic 20) · ×1
  • _MaterialSwitchState.build (cyclomatic 20) packages/flutter/lib/src/material/switch.dart:907 — _MaterialSwitchState.build has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TabBarThemeData.== (cyclomatic 20) · ×1
  • TabBarThemeData.== (cyclomatic 20) packages/flutter/lib/src/material/tab_bar_theme.dart:522 — TabBarThemeData.== has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MatrixUtils.matrixEquals (cyclomatic 20) · ×1
  • MatrixUtils.matrixEquals (cyclomatic 20) packages/flutter/lib/src/painting/matrix_utils.dart:136 — MatrixUtils.matrixEquals has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TextStyle.apply (cyclomatic 20) · ×1
  • TextStyle.apply (cyclomatic 20) packages/flutter/lib/src/painting/text_style.dart:942 — TextStyle.apply has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BoxConstraints.lerp (cyclomatic 20) · ×1
  • BoxConstraints.lerp (cyclomatic 20) packages/flutter/lib/src/rendering/box.dart:476 — BoxConstraints.lerp has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RenderEditable.calculateBoundedFloatingCursorOffset (cyclomatic 20) · ×1
  • RenderEditable.calculateBoundedFloatingCursorOffset (cyclomatic 20) packages/flutter/lib/src/rendering/editable.dart:2450 — RenderEditable.calculateBoundedFloatingCursorOffset has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RenderFlex._debugCheckConstraints (cyclomatic 20) · ×1
  • RenderFlex._debugCheckConstraints (cyclomatic 20) packages/flutter/lib/src/rendering/flex.dart:1094 — RenderFlex._debugCheckConstraints has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsConfiguration.absorb (cyclomatic 20) · ×1
  • SemanticsConfiguration.absorb (cyclomatic 20) packages/flutter/lib/src/semantics/semantics.dart:7049 — SemanticsConfiguration.absorb has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · StandardMessageCodec.writeValue (cyclomatic 20) · ×1
  • StandardMessageCodec.writeValue (cyclomatic 20) packages/flutter/lib/src/services/message_codecs.dart:349 — StandardMessageCodec.writeValue has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EditableTextState._finalizeEditing (cyclomatic 20) · ×1
  • EditableTextState._finalizeEditing (cyclomatic 20) packages/flutter/lib/src/widgets/editable_text.dart:3965 — EditableTextState._finalizeEditing has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AssembleCommand.runCommand (cyclomatic 20) · ×1
  • AssembleCommand.runCommand (cyclomatic 20) packages/flutter_tools/lib/src/commands/assemble.dart:397 — AssembleCommand.runCommand has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PackagesGetCommand.runCommand (cyclomatic 20) · ×1
  • PackagesGetCommand.runCommand (cyclomatic 20) packages/flutter_tools/lib/src/commands/packages.dart:337 — PackagesGetCommand.runCommand has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ResidentWebRunner.run (cyclomatic 20) · ×1
  • ResidentWebRunner.run (cyclomatic 20) packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:231 — ResidentWebRunner.run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnalysisOptionsMigration.migrate (cyclomatic 20) · ×1
  • AnalysisOptionsMigration.migrate (cyclomatic 20) packages/flutter_tools/lib/src/migrations/analysis_options_migration.dart:25 — AnalysisOptionsMigration.migrate has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextWrapper.breakLines (cyclomatic 20) · ×1
  • TextWrapper.breakLines (cyclomatic 20) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/wrapper.dart:52 — TextWrapper.breakLines has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · 1.onMethodCall (cyclomatic 20) · ×1
  • 1.onMethodCall (cyclomatic 20) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java:59 — 1.onMethodCall has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Autofill.translateAutofillHint (cyclomatic 39) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KeyEmbedderResponder.synchronizePressingKey (cyclomatic 20) · ×1
  • KeyEmbedderResponder.synchronizePressingKey (cyclomatic 20) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/KeyEmbedderResponder.java:136 — KeyEmbedderResponder.synchronizePressingKey has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GpuContext.createTexture (cyclomatic 19) · ×1
  • GpuContext.createTexture (cyclomatic 19) engine/src/flutter/lib/gpu/lib/src/context.dart:186 — GpuContext.createTexture has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CupertinoListSection.build (cyclomatic 19) · ×1
  • CupertinoListSection.build (cyclomatic 19) packages/flutter/lib/src/cupertino/list_section.dart:392 — CupertinoListSection.build has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LeastSquaresSolver.solve (cyclomatic 19) · ×1
  • LeastSquaresSolver.solve (cyclomatic 19) packages/flutter/lib/src/gestures/lsq_solver.dart:103 — LeastSquaresSolver.solve has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · _SliverAppBarDelegate.build (cyclomatic 19) · ×1
  • _SliverAppBarDelegate.build (cyclomatic 19) packages/flutter/lib/src/material/app_bar.dart:1358 — _SliverAppBarDelegate.build has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _DateRangePickerDialogState.build (cyclomatic 19) · ×1
  • _DateRangePickerDialogState.build (cyclomatic 19) packages/flutter/lib/src/material/date_picker.dart:1610 — _DateRangePickerDialogState.build has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _InkResponseState.updateHighlight (cyclomatic 19) · ×1
  • _InkResponseState.updateHighlight (cyclomatic 19) packages/flutter/lib/src/material/ink_well.dart:1004 — _InkResponseState.updateHighlight has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SubmenuDirectionalFocusAction.invoke (cyclomatic 19) · ×1
  • _SubmenuDirectionalFocusAction.invoke (cyclomatic 19) packages/flutter/lib/src/material/menu_anchor.dart:2383 — _SubmenuDirectionalFocusAction.invoke has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProgressIndicatorThemeData.== (cyclomatic 19) · ×1
  • ProgressIndicatorThemeData.== (cyclomatic 19) packages/flutter/lib/src/material/progress_indicator_theme.dart:250 — ProgressIndicatorThemeData.== has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RefreshIndicatorState.build (cyclomatic 19) · ×1
  • RefreshIndicatorState.build (cyclomatic 19) packages/flutter/lib/src/material/refresh_indicator.dart:615 — RefreshIndicatorState.build has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScaffoldState._buildBottomSheet (cyclomatic 19) · ×1
  • ScaffoldState._buildBottomSheet (cyclomatic 19) packages/flutter/lib/src/material/scaffold.dart:2451 — ScaffoldState._buildBottomSheet has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SegmentedButtonDefaultsM3.style (cyclomatic 19) · ×1
  • _SegmentedButtonDefaultsM3.style (cyclomatic 19) packages/flutter/lib/src/material/segmented_button.dart:1198 — _SegmentedButtonDefaultsM3.style has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToggleButtons.build (cyclomatic 19) · ×1
  • ToggleButtons.build (cyclomatic 19) packages/flutter/lib/src/material/toggle_buttons.dart:699 — ToggleButtons.build has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ImageCache.putIfAbsent (cyclomatic 19) · ×1
  • ImageCache.putIfAbsent (cyclomatic 19) packages/flutter/lib/src/painting/image_cache.dart:310 — ImageCache.putIfAbsent has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RenderObjectSemantics.markNeedsUpdate (cyclomatic 19) · ×1
  • _RenderObjectSemantics.markNeedsUpdate (cyclomatic 19) packages/flutter/lib/src/rendering/object.dart:6536 — _RenderObjectSemantics.markNeedsUpdate has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DirectionalFocusTraversalPolicyMixin._findNextFocusInDirection (cyclomatic 19) · ×1
  • DirectionalFocusTraversalPolicyMixin._findNextFocusInDirection (cyclomatic 19) packages/flutter/lib/src/widgets/focus_traversal.dart:811 — DirectionalFocusTraversalPolicyMixin._findNextFocusInDirection has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeroController._maybeStartHeroTransition (cyclomatic 19) · ×1
  • HeroController._maybeStartHeroTransition (cyclomatic 19) packages/flutter/lib/src/widgets/heroes.dart:905 — HeroController._maybeStartHeroTransition has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiSelectableSelectionContainerDelegate.getSelectionGeometry (cyclomatic 19) · ×1
  • MultiSelectableSelectionContainerDelegate.getSelectionGeometry (cyclomatic 19) packages/flutter/lib/src/widgets/selectable_region.dart:2648 — MultiSelectableSelectionContainerDelegate.getSelectionGeometry has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiSelectableSelectionContainerDelegate._handleSelectBoundary (cyclomatic 19) · ×1
  • MultiSelectableSelectionContainerDelegate._handleSelectBoundary (cyclomatic 19) packages/flutter/lib/src/widgets/selectable_region.dart:2988 — MultiSelectableSelectionContainerDelegate._handleSelectBoundary has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiSelectableSelectionContainerDelegate._initSelection (cyclomatic 19) · ×1
  • MultiSelectableSelectionContainerDelegate._initSelection (cyclomatic 19) packages/flutter/lib/src/widgets/selectable_region.dart:3257 — MultiSelectableSelectionContainerDelegate._initSelection has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextSelectionGestureDetectorBuilder.onTapDown (cyclomatic 19) · ×1
  • TextSelectionGestureDetectorBuilder.onTapDown (cyclomatic 19) packages/flutter/lib/src/widgets/text_selection.dart:2467 — TextSelectionGestureDetectorBuilder.onTapDown has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnalyzeOnce.analyze (cyclomatic 19) · ×1
  • AnalyzeOnce.analyze (cyclomatic 19) packages/flutter_tools/lib/src/commands/analyze_once.dart:25 — AnalyzeOnce.analyze has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IdeConfigCommand._handleTemplateUpdate (cyclomatic 19) · ×1
  • IdeConfigCommand._handleTemplateUpdate (cyclomatic 19) packages/flutter_tools/lib/src/commands/ide_config.dart:127 — IdeConfigCommand._handleTemplateUpdate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunCommandBase.createDebuggingOptions (cyclomatic 19) · ×1
  • RunCommandBase.createDebuggingOptions (cyclomatic 19) packages/flutter_tools/lib/src/commands/run.dart:152 — RunCommandBase.createDebuggingOptions has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ResidentWebRunner.attach (cyclomatic 19) · ×1
  • ResidentWebRunner.attach (cyclomatic 19) packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:792 — ResidentWebRunner.attach has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalizationsGenerator._generateCode (cyclomatic 19) · ×1
  • LocalizationsGenerator._generateCode (cyclomatic 19) packages/flutter_tools/lib/src/localizations/gen_l10n.dart:1120 — LocalizationsGenerator._generateCode has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChannelBuffers.handleMessage (cyclomatic 19) · ×1
  • ChannelBuffers.handleMessage (cyclomatic 19) engine/src/flutter/lib/ui/channel_buffers.dart:432 — ChannelBuffers.handleMessage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextEditingDeltaState.inferDeltaState (cyclomatic 19) · ×1
  • TextEditingDeltaState.inferDeltaState (cyclomatic 19) engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:821 — TextEditingDeltaState.inferDeltaState has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlatformPlugin.setSystemChromeSystemUIOverlayStyle (cyclomatic 19) · ×1
  • PlatformPlugin.setSystemChromeSystemUIOverlayStyle (cyclomatic 19) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java:486 — PlatformPlugin.setSystemChromeSystemUIOverlayStyle has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SnippetChecker._analyze (cyclomatic 18) · ×1
  • _SnippetChecker._analyze (cyclomatic 18) dev/bots/analyze_snippet_code.dart:1057 — _SnippetChecker._analyze has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CupertinoDatePicker._getColumnWidth (cyclomatic 18) · ×1
  • CupertinoDatePicker._getColumnWidth (cyclomatic 18) packages/flutter/lib/src/cupertino/date_picker.dart:546 — CupertinoDatePicker._getColumnWidth has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · _SegmentedControlState.build (cyclomatic 18) · ×1
  • _SegmentedControlState.build (cyclomatic 18) REDACTED:848 — _SegmentedControlState.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SwitchPainter.paint (cyclomatic 18) · ×1
  • _SwitchPainter.paint (cyclomatic 18) packages/flutter/lib/src/cupertino/switch.dart:1101 — _SwitchPainter.paint has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DiagnosticsProperty.toJsonMap (cyclomatic 18) · ×1
  • DiagnosticsProperty.toJsonMap (cyclomatic 18) packages/flutter/lib/src/foundation/diagnostics.dart:2636 — DiagnosticsProperty.toJsonMap has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GestureBinding._handlePointerEventImmediately (cyclomatic 18) · ×1
  • GestureBinding._handlePointerEventImmediately (cyclomatic 18) packages/flutter/lib/src/gestures/binding.dart:407 — GestureBinding._handlePointerEventImmediately has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _RawChipState.build (cyclomatic 18) · ×1
  • _RawChipState.build (cyclomatic 18) packages/flutter/lib/src/material/chip.dart:1326 — _RawChipState.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DataTableThemeData.== (cyclomatic 18) · ×1
  • DataTableThemeData.== (cyclomatic 18) packages/flutter/lib/src/material/data_table_theme.dart:232 — DataTableThemeData.== has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SnackBarThemeData.== (cyclomatic 18) · ×1
  • SnackBarThemeData.== (cyclomatic 18) packages/flutter/lib/src/material/snack_bar_theme.dart:280 — SnackBarThemeData.== has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TextTheme.== (cyclomatic 18) · ×1
  • TextTheme.== (cyclomatic 18) packages/flutter/lib/src/material/text_theme.dart:715 — TextTheme.== has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _TimePickerDialogState.build (cyclomatic 18) · ×1
  • _TimePickerDialogState.build (cyclomatic 18) packages/flutter/lib/src/material/time_picker.dart:2584 — _TimePickerDialogState.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _TimePickerState.build (cyclomatic 18) · ×1
  • _TimePickerState.build (cyclomatic 18) packages/flutter/lib/src/material/time_picker.dart:2985 — _TimePickerState.build has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ToggleButtonsThemeData.== (cyclomatic 18) · ×1
  • ToggleButtonsThemeData.== (cyclomatic 18) packages/flutter/lib/src/material/toggle_buttons_theme.dart:201 — ToggleButtonsThemeData.== has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TooltipThemeData.== (cyclomatic 18) · ×1
  • TooltipThemeData.== (cyclomatic 18) packages/flutter/lib/src/material/tooltip_theme.dart:224 — TooltipThemeData.== has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RenderParagraph.assembleSemanticsNode (cyclomatic 18) · ×1
  • RenderParagraph.assembleSemanticsNode (cyclomatic 18) packages/flutter/lib/src/rendering/paragraph.dart:1361 — RenderParagraph.assembleSemanticsNode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderSliverGrid.performLayout (cyclomatic 18) · ×1
  • RenderSliverGrid.performLayout (cyclomatic 18) packages/flutter/lib/src/rendering/sliver_grid.dart:592 — RenderSliverGrid.performLayout has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SemanticsNode._addToUpdate (cyclomatic 18) · ×1
  • SemanticsNode._addToUpdate (cyclomatic 18) packages/flutter/lib/src/semantics/semantics.dart:4257 — SemanticsNode._addToUpdate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _DismissibleState.build (cyclomatic 18) · ×1
  • _DismissibleState.build (cyclomatic 18) packages/flutter/lib/src/widgets/dismissible.dart:607 — _DismissibleState.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditableTextState._handleSelectionChanged (cyclomatic 18) · ×1
  • EditableTextState._handleSelectionChanged (cyclomatic 18) packages/flutter/lib/src/widgets/editable_text.dart:4545 — EditableTextState._handleSelectionChanged has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SliverMultiBoxAdaptorElement.performRebuild (cyclomatic 18) · ×1
  • SliverMultiBoxAdaptorElement.performRebuild (cyclomatic 18) packages/flutter/lib/src/widgets/sliver.dart:971 — SliverMultiBoxAdaptorElement.performRebuild has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _TreeSliverState.toggleNode (cyclomatic 18) · ×1
  • _TreeSliverState.toggleNode (cyclomatic 18) packages/flutter/lib/src/widgets/sliver_tree.dart:851 — _TreeSliverState.toggleNode has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _TextSelectionGestureDetectorState.build (cyclomatic 18) · ×1
  • _TextSelectionGestureDetectorState.build (cyclomatic 18) packages/flutter/lib/src/widgets/text_selection.dart:3698 — _TextSelectionGestureDetectorState.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WidgetInspectorService._getLayoutExplorerNode (cyclomatic 18) · ×1
  • WidgetInspectorService._getLayoutExplorerNode (cyclomatic 18) packages/flutter/lib/src/widgets/widget_inspector.dart:2274 — WidgetInspectorService._getLayoutExplorerNode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChannelCommand._listChannels (cyclomatic 18) · ×1
  • ChannelCommand._listChannels (cyclomatic 18) packages/flutter_tools/lib/src/commands/channel.dart:82 — ChannelCommand._listChannels has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReleaseAssetServer.handle (cyclomatic 18) · ×1
  • ReleaseAssetServer.handle (cyclomatic 18) packages/flutter_tools/lib/src/isolated/release_asset_server.dart:72 — ReleaseAssetServer.handle has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebAssetServer._resolveDartFile (cyclomatic 18) · ×1
  • WebAssetServer._resolveDartFile (cyclomatic 18) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:708 — WebAssetServer._resolveDartFile has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LspPreviewDetector._fileAddedOrUpdated (cyclomatic 18) · ×1
  • LspPreviewDetector._fileAddedOrUpdated (cyclomatic 18) packages/flutter_tools/lib/src/widget_preview/lsp_preview_detector.dart:184 — LspPreviewDetector._fileAddedOrUpdated has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IosProject.containsWatchCompanion (cyclomatic 18) · ×1
  • IosProject.containsWatchCompanion (cyclomatic 18) packages/flutter_tools/lib/src/xcode_project.dart:1003 — IosProject.containsWatchCompanion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChannelBuffers.handleMessage (cyclomatic 18) · ×1
  • ChannelBuffers.handleMessage (cyclomatic 18) engine/src/flutter/lib/web_ui/lib/channel_buffers.dart:173 — ChannelBuffers.handleMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FallbackFontService._findFontsForComponents (cyclomatic 18) · ×1
  • FallbackFontService._findFontsForComponents (cyclomatic 18) engine/src/flutter/lib/web_ui/lib/src/engine/font_fallback_service.dart:276 — FallbackFontService._findFontsForComponents has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DeepLinkJsonFromManifestTaskHelper.createAppLinkSettings (cyclomatic 18) · ×1
  • DeepLinkJsonFromManifestTaskHelper.createAppLinkSettings (cyclomatic 18) packages/flutter_tools/gradle/src/main/kotlin/tasks/DeepLinkJsonFromManifestTaskHelper.kt:56 — DeepLinkJsonFromManifestTaskHelper.createAppLinkSettings has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Build.fromJson (cyclomatic 17) · ×1
  • Build.fromJson (cyclomatic 17) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:172 — Build.fromJson has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _LargeTitleNavigationBarSliverDelegate.build (cyclomatic 17) · ×1
  • _LargeTitleNavigationBarSliverDelegate.build (cyclomatic 17) packages/flutter/lib/src/cupertino/nav_bar.dart:1477 — _LargeTitleNavigationBarSliverDelegate.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _LargeTitleNavigationBarSliverDelegate.shouldRebuild (cyclomatic 17) · ×1
  • _LargeTitleNavigationBarSliverDelegate.shouldRebuild (cyclomatic 17) packages/flutter/lib/src/cupertino/nav_bar.dart:1617 — _LargeTitleNavigationBarSliverDelegate.shouldRebuild has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _CupertinoSliverRefreshControlState.transitionNextState (cyclomatic 17) · ×1
  • _CupertinoSliverRefreshControlState.transitionNextState (cyclomatic 17) packages/flutter/lib/src/cupertino/refresh.dart:472 — _CupertinoSliverRefreshControlState.transitionNextState has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterError.defaultStackFilter (cyclomatic 17) · ×1
  • FlutterError.defaultStackFilter (cyclomatic 17) packages/flutter/lib/src/foundation/assertions.dart:1059 — FlutterError.defaultStackFilter has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BottomNavigationBarThemeData.== (cyclomatic 17) · ×1
  • BottomNavigationBarThemeData.== (cyclomatic 17) packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:217 — BottomNavigationBarThemeData.== has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DialogThemeData.== (cyclomatic 17) · ×1
  • DialogThemeData.== (cyclomatic 17) packages/flutter/lib/src/material/dialog_theme.dart:479 — DialogThemeData.== has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PaginatedDataTableState.build (cyclomatic 17) · ×1
  • PaginatedDataTableState.build (cyclomatic 17) packages/flutter/lib/src/material/paginated_data_table.dart:486 — PaginatedDataTableState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RoundedRectSliderTrackShape.paint (cyclomatic 17) · ×1
  • RoundedRectSliderTrackShape.paint (cyclomatic 17) packages/flutter/lib/src/material/slider_parts.dart:428 — RoundedRectSliderTrackShape.paint has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderEditable.assembleSemanticsNode (cyclomatic 17) · ×1
  • RenderEditable.assembleSemanticsNode (cyclomatic 17) packages/flutter/lib/src/rendering/editable.dart:1412 — RenderEditable.assembleSemanticsNode has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderEditable.getWordAtOffset (cyclomatic 17) · ×1
  • RenderEditable.getWordAtOffset (cyclomatic 17) packages/flutter/lib/src/rendering/editable.dart:2198 — RenderEditable.getWordAtOffset has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RenderFlex._computeSizes (cyclomatic 17) · ×1
  • RenderFlex._computeSizes (cyclomatic 17) packages/flutter/lib/src/rendering/flex.dart:1197 — RenderFlex._computeSizes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup (cyclomatic 17) · ×1
  • _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup (cyclomatic 17) packages/flutter/lib/src/rendering/object.dart:5987 — _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SelectableFragment._handleGranularlyExtendSelection (cyclomatic 17) · ×1
  • _SelectableFragment._handleGranularlyExtendSelection (cyclomatic 17) packages/flutter/lib/src/rendering/paragraph.dart:3365 — _SelectableFragment._handleGranularlyExtendSelection has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RenderWrap._debugHasNecessaryDirections (cyclomatic 17) · ×1
  • RenderWrap._debugHasNecessaryDirections (cyclomatic 17) packages/flutter/lib/src/rendering/wrap.dart:447 — RenderWrap._debugHasNecessaryDirections has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WidgetsBinding.initServiceExtensions (cyclomatic 17) · ×1
  • WidgetsBinding.initServiceExtensions (cyclomatic 17) packages/flutter/lib/src/widgets/binding.dart:695 — WidgetsBinding.initServiceExtensions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditableTextState.selectAllEnabled (cyclomatic 17) · ×1
  • EditableTextState.selectAllEnabled (cyclomatic 17) packages/flutter/lib/src/widgets/editable_text.dart:2725 — EditableTextState.selectAllEnabled has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · EditableTextState.updateEditingValue (cyclomatic 17) · ×1
  • EditableTextState.updateEditingValue (cyclomatic 17) packages/flutter/lib/src/widgets/editable_text.dart:3704 — EditableTextState.updateEditingValue has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Element.updateChild (cyclomatic 17) · ×1
  • Element.updateChild (cyclomatic 17) packages/flutter/lib/src/widgets/framework.dart:3972 — Element.updateChild has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _GlowingOverscrollIndicatorState._handleScrollNotification (cyclomatic 17) · ×1
  • _GlowingOverscrollIndicatorState._handleScrollNotification (cyclomatic 17) packages/flutter/lib/src/widgets/overscroll_indicator.dart:206 — _GlowingOverscrollIndicatorState._handleScrollNotification has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RangeMaintainingScrollPhysics.adjustPositionForNewDimensions (cyclomatic 17) · ×1
  • RangeMaintainingScrollPhysics.adjustPositionForNewDimensions (cyclomatic 17) packages/flutter/lib/src/widgets/scroll_physics.dart:646 — RangeMaintainingScrollPhysics.adjustPositionForNewDimensions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EdgeDraggingAutoScroller._scroll (cyclomatic 17) · ×1
  • EdgeDraggingAutoScroller._scroll (cyclomatic 17) packages/flutter/lib/src/widgets/scrollable_helpers.dart:237 — EdgeDraggingAutoScroller._scroll has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · RawScrollbarState._getPrimaryDelta (cyclomatic 17) · ×1
  • RawScrollbarState._getPrimaryDelta (cyclomatic 17) packages/flutter/lib/src/widgets/scrollbar.dart:1702 — RawScrollbarState._getPrimaryDelta has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MultiSelectableSelectionContainerDelegate._updateHandleLayersAndOwners (cyclomatic 17) · ×1
  • MultiSelectableSelectionContainerDelegate._updateHandleLayersAndOwners (cyclomatic 17) packages/flutter/lib/src/widgets/selectable_region.dart:2776 — MultiSelectableSelectionContainerDelegate._updateHandleLayersAndOwners has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SelectableRegionState.contextMenuButtonItems (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _DefaultProcessUtils.run (cyclomatic 17) · ×1
  • _DefaultProcessUtils.run (cyclomatic 17) packages/flutter_tools/lib/src/base/process.dart:350 — _DefaultProcessUtils.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Node.computeChanges (cyclomatic 17) · ×1
  • Node.computeChanges (cyclomatic 17) packages/flutter_tools/lib/src/build_system/build_system.dart:1262 — Node.computeChanges has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShaderCompiler.compileShader (cyclomatic 17) · ×1
  • ShaderCompiler.compileShader (cyclomatic 17) packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart:200 — ShaderCompiler.compileShader has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BuildIOSFrameworkCommand.runCommand (cyclomatic 17) · ×1
  • BuildIOSFrameworkCommand.runCommand (cyclomatic 17) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527 — BuildIOSFrameworkCommand.runCommand has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DevicesCommandOutputWithExtendedWirelessDeviceDiscovery.findAndOutputAllTargetDevices (cyclomatic 17) · ×1
  • DevicesCommandOutputWithExtendedWirelessDeviceDiscovery.findAndOutputAllTargetDevices (cyclomatic 17) packages/flutter_tools/lib/src/commands/devices.dart:235 — DevicesCommandOutputWithExtendedWirelessDeviceDiscovery.findAndOutputAllTargetDevices has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _DefaultPub.get (cyclomatic 17) · ×1
  • _DefaultPub.get (cyclomatic 17) packages/flutter_tools/lib/src/dart/pub.dart:290 — _DefaultPub.get has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HotRunner._restartFromSources (cyclomatic 17) · ×1
  • HotRunner._restartFromSources (cyclomatic 17) packages/flutter_tools/lib/src/run_hot.dart:604 — HotRunner._restartFromSources has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TargetDevicesWithExtendedWirelessDeviceDiscovery.findAllTargetDevices (cyclomatic 17) · ×1
  • TargetDevicesWithExtendedWirelessDeviceDiscovery.findAllTargetDevices (cyclomatic 17) packages/flutter_tools/lib/src/runner/target_devices.dart:458 — TargetDevicesWithExtendedWirelessDeviceDiscovery.findAllTargetDevices has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _PreviewVisitor.visitAnnotation (cyclomatic 17) · ×1
  • _PreviewVisitor.visitAnnotation (cyclomatic 17) packages/flutter_tools/lib/src/widget_preview/dependency_graph.dart:90 — _PreviewVisitor.visitAnnotation has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlatformDispatcher._updateUserSettingsData (cyclomatic 17) · ×1
  • PlatformDispatcher._updateUserSettingsData (cyclomatic 17) engine/src/flutter/lib/ui/platform_dispatcher.dart:1321 — PlatformDispatcher._updateUserSettingsData has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextStyle.== (cyclomatic 17) · ×1
  • TextStyle.== (cyclomatic 17) engine/src/flutter/lib/ui/text.dart:1853 — TextStyle.== has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · EnginePlatformDispatcher._addTypographySettingsObserver (cyclomatic 17) · ×1
  • EnginePlatformDispatcher._addTypographySettingsObserver (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1132 — EnginePlatformDispatcher._addTypographySettingsObserver has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlatformViewEmbedder.submitFrame (cyclomatic 17) · ×1
  • PlatformViewEmbedder.submitFrame (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:311 — PlatformViewEmbedder.submitFrame has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WheelEventListenerMixin._isTrackpadEvent (cyclomatic 17) · ×1
  • _WheelEventListenerMixin._isTrackpadEvent (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_binding.dart:721 — _WheelEventListenerMixin._isTrackpadEvent has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EngineParagraphStyle.== (cyclomatic 17) · ×1
  • EngineParagraphStyle.== (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:295 — EngineParagraphStyle.== has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RawKeyboard.handleHtmlEvent (cyclomatic 17) · ×1
  • RawKeyboard.handleHtmlEvent (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/raw_keyboard.dart:87 — RawKeyboard.handleHtmlEvent has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EngineSemanticsOwner.updateSemantics (cyclomatic 17) · ×1
  • EngineSemanticsOwner.updateSemantics (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:3347 — EngineSemanticsOwner.updateSemantics has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SemanticsObject._createSemanticRole (cyclomatic 43) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ShaderData.fromBytes (cyclomatic 17) · ×1
  • ShaderData.fromBytes (cyclomatic 17) engine/src/flutter/lib/web_ui/lib/src/engine/shader_data.dart:16 — ShaderData.fromBytes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterPlugin.apply (cyclomatic 17) · ×1
  • FlutterPlugin.apply (cyclomatic 17) packages/flutter_tools/gradle/src/main/kotlin/FlutterPlugin.kt:45 — FlutterPlugin.apply has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AccessibilityBridge.performCursorMoveAction (cyclomatic 17) · ×1
  • AccessibilityBridge.performCursorMoveAction (cyclomatic 17) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:1161 — AccessibilityBridge.performCursorMoveAction has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · create_updated_flutter_deps.Main (cyclomatic 17) · ×1
  • create_updated_flutter_deps.Main (cyclomatic 17) engine/src/tools/dart/create_updated_flutter_deps.py:365 — create_updated_flutter_deps.Main has cyclomatic complexity 17 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · createWasmInstantiator (cyclomatic 17) · ×1
  • createWasmInstantiator (cyclomatic 17) engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js:12 — createWasmInstantiator has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (getResponse, tryGettingResponseFromCrossOriginStorage, a function literal at line 62, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PhysicalKeyData._readHidEntries (cyclomatic 16) · ×1
  • PhysicalKeyData._readHidEntries (cyclomatic 16) dev/tools/gen_keycodes/lib/physical_key_data.dart:144 — PhysicalKeyData._readHidEntries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RadioPainter.paint (cyclomatic 16) · ×1
  • _RadioPainter.paint (cyclomatic 16) packages/flutter/lib/src/cupertino/radio.dart:522 — _RadioPainter.paint has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterErrorDetails.debugFillProperties (cyclomatic 16) · ×1
  • FlutterErrorDetails.debugFillProperties (cyclomatic 16) packages/flutter/lib/src/foundation/assertions.dart:655 — FlutterErrorDetails.debugFillProperties has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PointerEventResampler._dequeueAndSampleNonHoverOrMovePointerEventsUntil (cyclomatic 16) · ×1
  • PointerEventResampler._dequeueAndSampleNonHoverOrMovePointerEventsUntil (cyclomatic 16) packages/flutter/lib/src/gestures/resampler.dart:174 — PointerEventResampler._dequeueAndSampleNonHoverOrMovePointerEventsUntil has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TapGestureRecognizer.isPointerAllowed (cyclomatic 16) · ×1
  • TapGestureRecognizer.isPointerAllowed (cyclomatic 16) packages/flutter/lib/src/gestures/tap.dart:691 — TapGestureRecognizer.isPointerAllowed has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BottomSheetThemeData.== (cyclomatic 16) · ×1
  • BottomSheetThemeData.== (cyclomatic 16) packages/flutter/lib/src/material/bottom_sheet_theme.dart:188 — BottomSheetThemeData.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ButtonThemeData.== (cyclomatic 16) · ×1
  • ButtonThemeData.== (cyclomatic 16) packages/flutter/lib/src/material/button_theme.dart:702 — ButtonThemeData.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _MonthItemState.build (cyclomatic 16) · ×1
  • _MonthItemState.build (cyclomatic 16) packages/flutter/lib/src/material/date_picker.dart:2688 — _MonthItemState.build has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ExpansionTileThemeData.== (cyclomatic 16) · ×1
  • ExpansionTileThemeData.== (cyclomatic 16) packages/flutter/lib/src/material/expansion_tile_theme.dart:182 — ExpansionTileThemeData.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MenuStyle.== (cyclomatic 16) · ×1
  • MenuStyle.== (cyclomatic 16) packages/flutter/lib/src/material/menu_style.dart:225 — MenuStyle.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NavigationRailThemeData.== (cyclomatic 16) · ×1
  • NavigationRailThemeData.== (cyclomatic 16) packages/flutter/lib/src/material/navigation_rail_theme.dart:201 — NavigationRailThemeData.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PopupMenuThemeData.== (cyclomatic 16) · ×1
  • PopupMenuThemeData.== (cyclomatic 16) packages/flutter/lib/src/material/popup_menu_theme.dart:196 — PopupMenuThemeData.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SearchViewThemeData.== (cyclomatic 16) · ×1
  • SearchViewThemeData.== (cyclomatic 16) packages/flutter/lib/src/material/search_view_theme.dart:170 — SearchViewThemeData.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _RenderSegmentedButton.paint (cyclomatic 16) · ×1
  • _RenderSegmentedButton.paint (cyclomatic 16) packages/flutter/lib/src/material/segmented_button.dart:1060 — _RenderSegmentedButton.paint has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GappedSliderTrackShape.paint (cyclomatic 16) · ×1
  • GappedSliderTrackShape.paint (cyclomatic 16) packages/flutter/lib/src/material/slider_parts.dart:1063 — GappedSliderTrackShape.paint has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SliderThemeData.lerp (cyclomatic 16) · ×1
  • SliderThemeData.lerp (cyclomatic 16) packages/flutter/lib/src/material/slider_theme.dart:744 — SliderThemeData.lerp has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _TimePickerDialogState._dialogSize (cyclomatic 16) · ×1
  • _TimePickerDialogState._dialogSize (cyclomatic 16) packages/flutter/lib/src/material/time_picker.dart:2533 — _TimePickerDialogState._dialogSize has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BoxBorder.lerp (cyclomatic 16) · ×1
  • BoxBorder.lerp (cyclomatic 16) packages/flutter/lib/src/painting/box_border.dart:138 — BoxBorder.lerp has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DecorationImage.== (cyclomatic 16) · ×1
  • DecorationImage.== (cyclomatic 16) packages/flutter/lib/src/painting/decoration_image.dart:198 — DecorationImage.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MatrixUtils.isIdentity (cyclomatic 16) · ×1
  • MatrixUtils.isIdentity (cyclomatic 16) packages/flutter/lib/src/painting/matrix_utils.dart:167 — MatrixUtils.isIdentity has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TextPainter._computeCaretMetrics (cyclomatic 16) · ×1
  • TextPainter._computeCaretMetrics (cyclomatic 16) packages/flutter/lib/src/painting/text_painter.dart:1615 — TextPainter._computeCaretMetrics has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RenderEditable.describeSemanticsConfiguration (cyclomatic 16) · ×1
  • RenderEditable.describeSemanticsConfiguration (cyclomatic 16) packages/flutter/lib/src/rendering/editable.dart:1322 — RenderEditable.describeSemanticsConfiguration has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SelectableFragment._updateSelectionEdgeByMultiSelectableTextBoundary (cyclomatic 16) · ×1
  • _SelectableFragment._updateSelectionEdgeByMultiSelectableTextBoundary (cyclomatic 16) packages/flutter/lib/src/rendering/paragraph.dart:2895 — _SelectableFragment._updateSelectionEdgeByMultiSelectableTextBoundary has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: _SelectableFragment.dispatchSelectionEvent (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _DebugSemanticsRoleChecks._semanticsProgressBar (cyclomatic 16) · ×1
  • _DebugSemanticsRoleChecks._semanticsProgressBar (cyclomatic 16) packages/flutter/lib/src/semantics/semantics.dart:217 — _DebugSemanticsRoleChecks._semanticsProgressBar has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SemanticsNode.debugFillProperties (cyclomatic 16) · ×1
  • SemanticsNode.debugFillProperties (cyclomatic 16) packages/flutter/lib/src/semantics/semantics.dart:4545 — SemanticsNode.debugFillProperties has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: _DebugSemanticsRoleChecks._checkSemanticsData (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · EditableTextState._updateSelectionRects (cyclomatic 16) · ×1
  • EditableTextState._updateSelectionRects (cyclomatic 16) packages/flutter/lib/src/widgets/editable_text.dart:5070 — EditableTextState._updateSelectionRects has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditableTextState.buildTextSpan (cyclomatic 16) · ×1
  • EditableTextState.buildTextSpan (cyclomatic 16) packages/flutter/lib/src/widgets/editable_text.dart:6084 — EditableTextState.buildTextSpan has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _NestedScrollCoordinator.pointerScroll (cyclomatic 16) · ×1
  • _NestedScrollCoordinator.pointerScroll (cyclomatic 16) packages/flutter/lib/src/widgets/nested_scroll_view.dart:956 — _NestedScrollCoordinator.pointerScroll has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _StretchingOverscrollIndicatorState._handleScrollNotification (cyclomatic 16) · ×1
  • _StretchingOverscrollIndicatorState._handleScrollNotification (cyclomatic 16) packages/flutter/lib/src/widgets/overscroll_indicator.dart:716 — _StretchingOverscrollIndicatorState._handleScrollNotification has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScrollbarPainter.shouldRepaint (cyclomatic 16) · ×1
  • ScrollbarPainter.shouldRepaint (cyclomatic 16) packages/flutter/lib/src/widgets/scrollbar.dart:813 — ScrollbarPainter.shouldRepaint has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection (cyclomatic 16) · ×1
  • MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection (cyclomatic 16) packages/flutter/lib/src/widgets/selectable_region.dart:3126 — MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SelectableRegionState.contextMenuButtonItems (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · RenderTapRegionSurface.handleEvent (cyclomatic 16) · ×1
  • RenderTapRegionSurface.handleEvent (cyclomatic 16) packages/flutter/lib/src/widgets/tap_region.dart:342 — RenderTapRegionSurface.handleEvent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BuildIOSArchiveCommand.runCommand (cyclomatic 16) · ×1
  • BuildIOSArchiveCommand.runCommand (cyclomatic 16) packages/flutter_tools/lib/src/commands/build_ios.dart:492 — BuildIOSArchiveCommand.runCommand has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunCommand.validateCommand (cyclomatic 16) · ×1
  • RunCommand.validateCommand (cyclomatic 16) packages/flutter_tools/lib/src/commands/run.dart:582 — RunCommand.validateCommand has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CustomDeviceConfig.== (cyclomatic 16) · ×1
  • CustomDeviceConfig.== (cyclomatic 16) packages/flutter_tools/lib/src/custom_devices/custom_device_config.dart:596 — CustomDeviceConfig.== has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ExtensionDevices.pollingGetDevices (cyclomatic 16) · ×1
  • ExtensionDevices.pollingGetDevices (cyclomatic 16) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:397 — ExtensionDevices.pollingGetDevices has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExtensionBackedDevice.startApp (cyclomatic 16) · ×1
  • ExtensionBackedDevice.startApp (cyclomatic 16) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:621 — ExtensionBackedDevice.startApp has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GitHubTemplateCreator.sanitizedCrashException (cyclomatic 16) · ×1
  • GitHubTemplateCreator.sanitizedCrashException (cyclomatic 16) packages/flutter_tools/lib/src/reporting/github_template.dart:37 — GitHubTemplateCreator.sanitizedCrashException has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ProjectFileInvalidator.findInvalidated (cyclomatic 16) · ×1
  • ProjectFileInvalidator.findInvalidated (cyclomatic 16) packages/flutter_tools/lib/src/run_hot.dart:1452 — ProjectFileInvalidator.findInvalidated has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalEngineLocator.findEnginePath (cyclomatic 16) · ×1
  • LocalEngineLocator.findEnginePath (cyclomatic 16) packages/flutter_tools/lib/src/runner/local_engine.dart:67 — LocalEngineLocator.findEnginePath has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExtensionPackageConfig._validateEntrypoint (cyclomatic 16) · ×1
  • ExtensionPackageConfig._validateEntrypoint (cyclomatic 16) packages/flutter_tools/packages/flutter_tools_core/lib/src/extension_package_config.dart:189 — ExtensionPackageConfig._validateEntrypoint has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Paint.toString (cyclomatic 16) · ×1
  • Paint.toString (cyclomatic 16) engine/src/flutter/lib/ui/painting.dart:1720 — Paint.toString has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StandardMessageCodec.writeValue (cyclomatic 16) · ×1
  • StandardMessageCodec.writeValue (cyclomatic 16) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:290 — StandardMessageCodec.writeValue has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: StandardMessageCodec.readValueOfType (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Matrix4.isIdentity (cyclomatic 16) · ×1
  • Matrix4.isIdentity (cyclomatic 16) engine/src/flutter/lib/web_ui/lib/src/engine/vector_math.dart:388 — Matrix4.isIdentity has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TextLayout.getGlyphInfoAt (cyclomatic 16) · ×1
  • TextLayout.getGlyphInfoAt (cyclomatic 16) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:928 — TextLayout.getGlyphInfoAt has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SharedTextStyle._applyFontFeatures (cyclomatic 16) · ×1
  • SharedTextStyle._applyFontFeatures (cyclomatic 16) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:581 — SharedTextStyle._applyFontFeatures has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlutterPluginUtils.detectApplyingKotlinGradlePlugin (cyclomatic 16) · ×1
  • FlutterPluginUtils.detectApplyingKotlinGradlePlugin (cyclomatic 16) packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt:576 — FlutterPluginUtils.detectApplyingKotlinGradlePlugin has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SemanticsNode.updateRecursively (cyclomatic 16) · ×1
  • SemanticsNode.updateRecursively (cyclomatic 16) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2742 — SemanticsNode.updateRecursively has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sky_utils.assert_valid_codesign_config (cyclomatic 16) · ×1
  • sky_utils.assert_valid_codesign_config (cyclomatic 16) engine/src/flutter/sky/tools/sky_utils.py:28 — sky_utils.assert_valid_codesign_config has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xvfb.start_virtual_x (cyclomatic 16) · ×1
  • xvfb.start_virtual_x (cyclomatic 16) engine/src/flutter/testing/xvfb.py:27 — xvfb.start_virtual_x has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · xcode_debug.waitForConfigurationBuildDirToUpdate (cyclomatic 16) · ×1
  • xcode_debug.waitForConfigurationBuildDirToUpdate (cyclomatic 16) packages/flutter_tools/bin/xcode_debug.js:587 — xcode_debug.waitForConfigurationBuildDirToUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment engine/src/flutter/tools/engine_tool/test/commands/run_command_test.dart:405 — // FIXME: Add positive tests. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D17 · Explicit Debt · XxxComment · ×1
  • XxxComment engine/src/flutter/shell/platform/android/test/io/flutter/plugin/common/StandardMessageCodecTest.java:18 — // XXX Please consider exposing these so that tests can access them — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · _MergeableMaterialState.didUpdateWidget (cognitive 139) · ×1
  • _MergeableMaterialState.didUpdateWidget (cognitive 139) packages/flutter/lib/src/material/mergeable_material.dart:279 — _MergeableMaterialState.didUpdateWidget has cognitive complexity 139 (threshold 15). Drivers by points: if/else 22 (74 pts), loops 13 (55 pts), boolean chains 10 (nesting depth added 94). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SemanticsOwner.sendSemanticsUpdate (cognitive 139) · ×1
  • SemanticsOwner.sendSemanticsUpdate (cognitive 139) packages/flutter/lib/src/semantics/semantics.dart:5103 — SemanticsOwner.sendSemanticsUpdate has cognitive complexity 139 (threshold 15). Drivers by points: if/else 29 (106 pts), loops 7 (20 pts), boolean chains 13 (nesting depth added 90). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TextTreeRenderer._debugRender (cognitive 129) · ×1
  • TextTreeRenderer._debugRender (cognitive 129) packages/flutter/lib/src/foundation/diagnostics.dart:1143 — TextTreeRenderer._debugRender has cognitive complexity 129 (threshold 15). Drivers by points: if/else 49 (90 pts), boolean chains 25, ternaries 3 (9 pts), loops 3 (5 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreateCommand.runCommand (cognitive 128) · ×1
  • CreateCommand.runCommand (cognitive 128) packages/flutter_tools/lib/src/commands/create.dart:404 — CreateCommand.runCommand has cognitive complexity 128 (threshold 15). Drivers by points: if/else 48 (80 pts), boolean chains 29, loops 3 (8 pts), ternaries 5 (8 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextStyle.lerp (cognitive 123) · ×1
  • TextStyle.lerp (cognitive 123) packages/flutter/lib/src/painting/text_style.dart:1124 — TextStyle.lerp has cognitive complexity 123 (threshold 15). Drivers by points: ternaries 56 (94 pts), boolean chains 16, if/else 13 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildOwner.finalizeTree (cognitive 123) · ×1
  • BuildOwner.finalizeTree (cognitive 123) packages/flutter/lib/src/widgets/framework.dart:3366 — BuildOwner.finalizeTree has cognitive complexity 123 (threshold 15). Drivers by points: ternaries 11 (55 pts), if/else 13 (43 pts), loops 5 (24 pts), error handling 1 (nesting depth added 93). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary (cognitive 114) · ×1
  • _SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary (cognitive 114) packages/flutter/lib/src/rendering/paragraph.dart:2040 — _SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary has cognitive complexity 114 (threshold 15). Drivers by points: if/else 30 (81 pts), ternaries 5 (17 pts), boolean chains 16 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary (cognitive 114) · ×1
  • _SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary (cognitive 114) packages/flutter/lib/src/rendering/paragraph.dart:2218 — _SelectableFragment._updateSelectionEndEdgeByMultiSelectableTextBoundary has cognitive complexity 114 (threshold 15). Drivers by points: if/else 30 (81 pts), ternaries 5 (17 pts), boolean chains 16 (nesting depth added 63). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionStartEdgeByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AccessibilityBridge.updateSemantics (cognitive 112) · ×1
  • AccessibilityBridge.updateSemantics (cognitive 112) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:1533 — AccessibilityBridge.updateSemantics has cognitive complexity 112 (threshold 15). Drivers by points: if/else 33 (84 pts), boolean chains 13, loops 6 (9 pts), ternaries 2 (6 pts) (nesting depth added 58). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary (cognitive 107) · ×1
  • _SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary (cognitive 107) packages/flutter/lib/src/rendering/paragraph.dart:2403 — _SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary has cognitive complexity 107 (threshold 15). Drivers by points: if/else 33 (89 pts), boolean chains 15, ternaries 1 (3 pts) (nesting depth added 58). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary (cognitive 107) · ×1
  • _SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary (cognitive 107) packages/flutter/lib/src/rendering/paragraph.dart:2655 — _SelectableFragment._updateSelectionEndEdgeAtPlaceholderByMultiSelectableTextBoundary has cognitive complexity 107 (threshold 15). Drivers by points: if/else 33 (89 pts), boolean chains 15, ternaries 1 (3 pts) (nesting depth added 58). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (_SelectableFragment._updateSelectionStartEdgeAtPlaceholderByMultiSelectableTextBoundary) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _SnippetChecker._extractSnippets (cognitive 98) · ×1
  • _SnippetChecker._extractSnippets (cognitive 98) dev/bots/analyze_snippet_code.dart:615 — _SnippetChecker._extractSnippets has cognitive complexity 98 (threshold 15). Drivers by points: if/else 27 (82 pts), boolean chains 10, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PipelineOwner.flushSemantics (cognitive 98) · ×1
  • PipelineOwner.flushSemantics (cognitive 98) packages/flutter/lib/src/rendering/object.dart:1452 — PipelineOwner.flushSemantics has cognitive complexity 98 (threshold 15). Drivers by points: if/else 27 (75 pts), loops 8 (17 pts), boolean chains 6 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ManifestAssetBundle.build (cognitive 94) · ×1
  • ManifestAssetBundle.build (cognitive 94) packages/flutter_tools/lib/src/asset.dart:316 — ManifestAssetBundle.build has cognitive complexity 94 (threshold 15). Drivers by points: if/else 26 (61 pts), loops 10 (17 pts), boolean chains 9, ternaries 2 (5 pts), error handling 1 (2 pts) (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _InputDecoratorState.build (cognitive 90) · ×1
  • _InputDecoratorState.build (cognitive 90) packages/flutter/lib/src/material/input_decorator.dart:2311 — _InputDecoratorState.build has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 32 (58 pts), if/else 17 (19 pts), boolean chains 10, match/switch 2 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResidentWebRunner.restart (cognitive 90) · ×1
  • ResidentWebRunner.restart (cognitive 90) packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:424 — ResidentWebRunner.restart has cognitive complexity 90 (threshold 15). Drivers by points: if/else 24 (59 pts), error handling 4 (15 pts), loops 2 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ThemeData.== (cognitive 84) · ×1
  • ThemeData.== (cognitive 84) packages/flutter/lib/src/material/theme_data.dart:2089 — ThemeData.== has cognitive complexity 84 (threshold 15). Drivers by points: boolean chains 83, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RollFallbackFontsCommand._generateFallbackFontData (cognitive 84) · ×1
  • RollFallbackFontsCommand._generateFallbackFontData (cognitive 84) engine/src/flutter/lib/web_ui/dev/roll_fallback_fonts.dart:62 — RollFallbackFontsCommand._generateFallbackFontData has cognitive complexity 84 (threshold 15). Drivers by points: if/else 27 (58 pts), loops 13 (18 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.lexIntoTokens (cognitive 81) · ×1
  • Parser.lexIntoTokens (cognitive 81) packages/flutter_tools/lib/src/localizations/message_parser.dart:235 — Parser.lexIntoTokens has cognitive complexity 81 (threshold 15). Drivers by points: if/else 22 (63 pts), boolean chains 5, ternaries 1 (5 pts), loops 2 (4 pts), match/switch 1 (4 pts) (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FlutterLoader.ensureInitializationComplete (cognitive 81) · ×1
  • FlutterLoader.ensureInitializationComplete (cognitive 81) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java:318 — FlutterLoader.ensureInitializationComplete has cognitive complexity 81 (threshold 15). Drivers by points: if/else 36 (62 pts), loops 3 (8 pts), boolean chains 6, ternaries 1 (4 pts), error handling 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SnippetDartdocParser.parseComment (cognitive 80) · ×1
  • SnippetDartdocParser.parseComment (cognitive 80) dev/snippets/lib/src/snippet_parser.dart:199 — SnippetDartdocParser.parseComment has cognitive complexity 80 (threshold 15). Drivers by points: if/else 25 (71 pts), match/switch 1 (4 pts), boolean chains 3, loops 2 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SemanticsAnnotationsMixin.describeSemanticsConfiguration (cognitive 79) · ×1
  • SemanticsAnnotationsMixin.describeSemanticsConfiguration (cognitive 79) packages/flutter/lib/src/rendering/object.dart:4945 — SemanticsAnnotationsMixin.describeSemanticsConfiguration has cognitive complexity 79 (threshold 15). Drivers by points: if/else 74, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TextLayout.getPositionForOffset (cognitive 76) · ×1
  • TextLayout.getPositionForOffset (cognitive 76) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:814 — TextLayout.getPositionForOffset has cognitive complexity 76 (threshold 15). Drivers by points: if/else 14 (35 pts), ternaries 9 (32 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderCustomPaint._updateSemanticsChild (cognitive 74) · ×1
  • RenderCustomPaint._updateSemanticsChild (cognitive 74) packages/flutter/lib/src/rendering/custom_paint.dart:891 — RenderCustomPaint._updateSemanticsChild has cognitive complexity 74 (threshold 15). Drivers by points: if/else 73, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FlutterTextUtils.getOffsetAfter (cognitive 74) · ×1
  • FlutterTextUtils.getOffsetAfter (cognitive 74) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java:197 — FlutterTextUtils.getOffsetAfter has cognitive complexity 74 (threshold 15). Drivers by points: if/else 25 (64 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _RenderDecoration.performLayout (cognitive 72) · ×1
  • _RenderDecoration.performLayout (cognitive 72) packages/flutter/lib/src/material/input_decorator.dart:1381 — _RenderDecoration.performLayout has cognitive complexity 72 (threshold 15). Drivers by points: if/else 30 (54 pts), match/switch 5 (8 pts), ternaries 2 (8 pts), boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parseIntoTree (cognitive 72) · ×1
  • Parser.parseIntoTree (cognitive 72) packages/flutter_tools/lib/src/localizations/message_parser.dart:396 — Parser.parseIntoTree has cognitive complexity 72 (threshold 15). Drivers by points: if/else 31 (50 pts), boolean chains 18, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectableTextContainerDelegate._handleSelectParagraph (cognitive 70) · ×1
  • _SelectableTextContainerDelegate._handleSelectParagraph (cognitive 70) packages/flutter/lib/src/widgets/text.dart:1020 — _SelectableTextContainerDelegate._handleSelectParagraph has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 6 (15 pts), boolean chains 8, ternaries 1 (5 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _RenderRangeSlider.paint (cognitive 68) · ×1
  • _RenderRangeSlider.paint (cognitive 68) packages/flutter/lib/src/material/range_slider.dart:1518 — _RenderRangeSlider.paint has cognitive complexity 68 (threshold 15). Drivers by points: ternaries 21 (29 pts), if/else 14 (20 pts), boolean chains 13, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTable.assembleSemanticsNode (cognitive 68) · ×1
  • RenderTable.assembleSemanticsNode (cognitive 68) packages/flutter/lib/src/rendering/table.dart:619 — RenderTable.assembleSemanticsNode has cognitive complexity 68 (threshold 15). Drivers by points: if/else 14 (33 pts), ternaries 7 (21 pts), loops 6 (9 pts), boolean chains 5 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterTextUtils.getOffsetBefore (cognitive 68) · ×1
  • FlutterTextUtils.getOffsetBefore (cognitive 68) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/FlutterTextUtils.java:57 — FlutterTextUtils.getOffsetBefore has cognitive complexity 68 (threshold 15). Drivers by points: if/else 24 (56 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Doctor.diagnose (cognitive 66) · ×1
  • Doctor.diagnose (cognitive 66) packages/flutter_tools/lib/src/doctor.dart:295 — Doctor.diagnose has cognitive complexity 66 (threshold 15). Drivers by points: if/else 14 (25 pts), ternaries 7 (18 pts), loops 4 (11 pts), error handling 2 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextLayout.getBoxesForRange (cognitive 66) · ×1
  • TextLayout.getBoxesForRange (cognitive 66) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:627 — TextLayout.getBoxesForRange has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (53 pts), loops 3 (6 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditableTextState.didUpdateWidget (cognitive 64) · ×1
  • EditableTextState.didUpdateWidget (cognitive 64) packages/flutter/lib/src/widgets/editable_text.dart:3485 — EditableTextState.didUpdateWidget has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (42 pts), boolean chains 19, ternaries 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextLayout.addLine (cognitive 64) · ×1
  • TextLayout.addLine (cognitive 64) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:222 — TextLayout.addLine has cognitive complexity 64 (threshold 15). Drivers by points: if/else 19 (36 pts), ternaries 8 (17 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LocalizedShortcutLabeler.getShortcutLabel (cognitive 62) · ×1
  • _LocalizedShortcutLabeler.getShortcutLabel (cognitive 62) packages/flutter/lib/src/material/menu_anchor.dart:2526 — _LocalizedShortcutLabeler.getShortcutLabel has cognitive complexity 62 (threshold 15). Drivers by points: if/else 26 (60 pts), boolean chains 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SnippetChecker._processBlock (cognitive 61) · ×1
  • _SnippetChecker._processBlock (cognitive 61) dev/bots/analyze_snippet_code.dart:776 — _SnippetChecker._processBlock has cognitive complexity 61 (threshold 15). Drivers by points: if/else 25 (47 pts), loops 4 (7 pts), boolean chains 6, match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterLocalFileComparator._fuzzyCompareWeb (cognitive 61) · ×1
  • FlutterLocalFileComparator._fuzzyCompareWeb (cognitive 61) packages/flutter_goldens/lib/flutter_goldens.dart:728 — FlutterLocalFileComparator._fuzzyCompareWeb has cognitive complexity 61 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 5 (19 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MDnsVmServiceDiscovery._doPollingVmService (cognitive 61) · ×1
  • MDnsVmServiceDiscovery._doPollingVmService (cognitive 61) packages/flutter_tools/lib/src/mdns_discovery.dart:299 — MDnsVmServiceDiscovery._doPollingVmService has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (50 pts), boolean chains 5, ternaries 1 (4 pts), loops 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputDecoration.== (cognitive 60) · ×1
  • InputDecoration.== (cognitive 60) packages/flutter/lib/src/material/input_decorator.dart:4083 — InputDecoration.== has cognitive complexity 60 (threshold 15). Drivers by points: boolean chains 58, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AOTSnapshotter.build (cognitive 60) · ×1
  • AOTSnapshotter.build (cognitive 60) packages/flutter_tools/lib/src/base/build.dart:114 — AOTSnapshotter.build has cognitive complexity 60 (threshold 15). Drivers by points: if/else 29 (49 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AppBarState.build (cognitive 59) · ×1
  • _AppBarState.build (cognitive 59) packages/flutter/lib/src/material/app_bar.dart:901 — _AppBarState.build has cognitive complexity 59 (threshold 15). Drivers by points: if/else 24 (33 pts), ternaries 12 (19 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderFlex._debugCheckConstraints (cognitive 59) · ×1
  • RenderFlex._debugCheckConstraints (cognitive 59) packages/flutter/lib/src/rendering/flex.dart:1094 — RenderFlex._debugCheckConstraints has cognitive complexity 59 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 3 (13 pts), ternaries 4 (10 pts), match/switch 1 (5 pts), boolean chains 4 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RenderTable._computeColumnWidths (cognitive 58) · ×1
  • RenderTable._computeColumnWidths (cognitive 58) packages/flutter/lib/src/rendering/table.dart:1064 — RenderTable._computeColumnWidths has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 7 (16 pts), boolean chains 2 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NavigatorState._flushHistoryUpdates (cognitive 58) · ×1
  • NavigatorState._flushHistoryUpdates (cognitive 58) packages/flutter/lib/src/widgets/navigator.dart:4438 — NavigatorState._flushHistoryUpdates has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (41 pts), boolean chains 8, loops 3 (4 pts), ternaries 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderOverflowBar.performLayout (cognitive 58) · ×1
  • _RenderOverflowBar.performLayout (cognitive 58) packages/flutter/lib/src/widgets/overflow_bar.dart:493 — _RenderOverflowBar.performLayout has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 13 (38 pts), if/else 5 (9 pts), loops 3 (5 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Element.updateChildren (cognitive 57) · ×1
  • Element.updateChildren (cognitive 57) packages/flutter/lib/src/widgets/framework.dart:4112 — Element.updateChildren has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 15, loops 6 (8 pts), ternaries 2 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GestureDetector.build (cognitive 57) · ×1
  • GestureDetector.build (cognitive 57) packages/flutter/lib/src/widgets/gesture_detector.dart:1049 — GestureDetector.build has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 49, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BorderRadiusGeometry.toString (cognitive 56) · ×1
  • BorderRadiusGeometry.toString (cognitive 56) packages/flutter/lib/src/painting/border_radius.dart:223 — BorderRadiusGeometry.toString has cognitive complexity 56 (threshold 15). Drivers by points: if/else 25 (51 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NavigatorState._updatePages (cognitive 56) · ×1
  • NavigatorState._updatePages (cognitive 56) packages/flutter/lib/src/widgets/navigator.dart:4146 — NavigatorState._updatePages has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (39 pts), boolean chains 10, loops 7 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalizationsGenerator._generateMethod (cognitive 56) · ×1
  • LocalizationsGenerator._generateMethod (cognitive 56) packages/flutter_tools/lib/src/localizations/gen_l10n.dart:1260 — LocalizationsGenerator._generateMethod has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (32 pts), ternaries 3 (8 pts), boolean chains 7, loops 2 (6 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TaskRunner.run (cognitive 55) · ×1
  • _TaskRunner.run (cognitive 55) dev/devicelab/lib/framework/framework.dart:165 — _TaskRunner.run has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 2 (6 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThemeData.ThemeData (cognitive 55) · ×1
  • ThemeData.ThemeData (cognitive 55) packages/flutter/lib/src/material/theme_data.dart:221 — ThemeData.ThemeData has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 29 (32 pts), if/else 12 (15 pts), boolean chains 7, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InputDecoration.toString (cognitive 54) · ×1
  • InputDecoration.toString (cognitive 54) packages/flutter/lib/src/material/input_decorator.dart:4217 — InputDecoration.toString has cognitive complexity 54 (threshold 15). Drivers by points: if/else 54. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConfigCommand.runCommand (cognitive 54) · ×1
  • ConfigCommand.runCommand (cognitive 54) packages/flutter_tools/lib/src/commands/config.dart:192 — ConfigCommand.runCommand has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (34 pts), loops 7 (13 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeltConfig.fromFile (cognitive 54) · ×1
  • FeltConfig.fromFile (cognitive 54) engine/src/flutter/lib/web_ui/dev/felt_config.dart:121 — FeltConfig.fromFile has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 6 (8 pts), match/switch 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DropdownButtonState.build (cognitive 53) · ×1
  • _DropdownButtonState.build (cognitive 53) packages/flutter/lib/src/material/dropdown.dart:1560 — _DropdownButtonState.build has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 13 (23 pts), if/else 17 (22 pts), boolean chains 8 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Message._inferPlaceholders (cognitive 53) · ×1
  • Message._inferPlaceholders (cognitive 53) packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart:556 — Message._inferPlaceholders has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 11, loops 3 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ColorScheme.== (cognitive 52) · ×1
  • ColorScheme.== (cognitive 52) packages/flutter/lib/src/material/color_scheme.dart:1340 — ColorScheme.== has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 50, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DataTable.build (cognitive 52) · ×1
  • DataTable.build (cognitive 52) packages/flutter/lib/src/material/data_table.dart:1034 — DataTable.build has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 11 (17 pts), boolean chains 9, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwiftPackageManagerIntegrationMigration.migrate (cognitive 52) · ×1
  • SwiftPackageManagerIntegrationMigration.migrate (cognitive 52) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:148 — SwiftPackageManagerIntegrationMigration.migrate has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (36 pts), error handling 3 (7 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TargetDevicesWithExtendedWirelessDeviceDiscovery.findAllTargetDevices (cognitive 52) · ×1
  • TargetDevicesWithExtendedWirelessDeviceDiscovery.findAllTargetDevices (cognitive 52) packages/flutter_tools/lib/src/runner/target_devices.dart:458 — TargetDevicesWithExtendedWirelessDeviceDiscovery.findAllTargetDevices has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (46 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Template.render (cognitive 52) · ×1
  • Template.render (cognitive 52) packages/flutter_tools/lib/src/template.dart:223 — Template.render has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (37 pts), boolean chains 10, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MenuLayout._positionChild (cognitive 51) · ×1
  • _MenuLayout._positionChild (cognitive 51) packages/flutter/lib/src/material/menu_anchor.dart:3442 — _MenuLayout._positionChild has cognitive complexity 51 (threshold 15). Drivers by points: if/else 26 (46 pts), match/switch 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionStartEdgeByTextBoundary (cognitive 51) · ×1
  • _SelectableFragment._updateSelectionStartEdgeByTextBoundary (cognitive 51) packages/flutter/lib/src/rendering/paragraph.dart:1711 — _SelectableFragment._updateSelectionStartEdgeByTextBoundary has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 9, ternaries 2 (8 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionEndEdgeByTextBoundary (cognitive 51) · ×1
  • _SelectableFragment._updateSelectionEndEdgeByTextBoundary (cognitive 51) packages/flutter/lib/src/rendering/paragraph.dart:1810 — _SelectableFragment._updateSelectionEndEdgeByTextBoundary has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 9, ternaries 2 (8 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RenderSliverList.performLayout (cognitive 51) · ×1
  • RenderSliverList.performLayout (cognitive 51) packages/flutter/lib/src/rendering/sliver_list.dart:45 — RenderSliverList.performLayout has cognitive complexity 51 (threshold 15). Drivers by points: if/else 24 (39 pts), loops 6 (9 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DaemonDomain.getSupportedPlatforms (cognitive 51) · ×1
  • DaemonDomain.getSupportedPlatforms (cognitive 51) packages/flutter_tools/lib/src/commands/daemon.dart:608 — DaemonDomain.getSupportedPlatforms has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (48 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ScaffoldLayout.performLayout (cognitive 49) · ×1
  • _ScaffoldLayout.performLayout (cognitive 49) packages/flutter/lib/src/material/scaffold.dart:1023 — _ScaffoldLayout.performLayout has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (32 pts), ternaries 4 (10 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode._replaceChildren (cognitive 48) · ×1
  • SemanticsNode._replaceChildren (cognitive 48) packages/flutter/lib/src/semantics/semantics.dart:3101 — SemanticsNode._replaceChildren has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 8 (13 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _RenderListTile._computeSizes (cognitive 47) · ×1
  • _RenderListTile._computeSizes (cognitive 47) packages/flutter/lib/src/material/list_tile.dart:1551 — _RenderListTile._computeSizes has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 17 (32 pts), if/else 9 (11 pts), boolean chains 3, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode.getSemanticsData (cognitive 47) · ×1
  • SemanticsNode.getSemanticsData (cognitive 47) packages/flutter/lib/src/semantics/semantics.dart:3940 — SemanticsNode.getSemanticsData has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (41 pts), loops 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderSliverWeightedCarousel.performLayout (cognitive 46) · ×1
  • _RenderSliverWeightedCarousel.performLayout (cognitive 46) packages/flutter/lib/src/material/carousel.dart:1292 — _RenderSliverWeightedCarousel.performLayout has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 11, ternaries 5 (6 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RawKeyboard._synchronizeModifiers (cognitive 46) · ×1
  • RawKeyboard._synchronizeModifiers (cognitive 46) packages/flutter/lib/src/services/raw_keyboard.dart:985 — RawKeyboard._synchronizeModifiers has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 12, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalyzeCommand.runCommand (cognitive 46) · ×1
  • AnalyzeCommand.runCommand (cognitive 46) packages/flutter_tools/lib/src/commands/analyze.dart:237 — AnalyzeCommand.runCommand has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28 (44 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterDevice.connect (cognitive 46) · ×1
  • FlutterDevice.connect (cognitive 46) packages/flutter_tools/lib/src/resident_runner.dart:143 — FlutterDevice.connect has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (21 pts), error handling 6 (16 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RadioPainter.paint (cognitive 45) · ×1
  • _RadioPainter.paint (cognitive 45) packages/flutter/lib/src/cupertino/radio.dart:522 — _RadioPainter.paint has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 5 (19 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SwitchPainter.paint (cognitive 45) · ×1
  • _SwitchPainter.paint (cognitive 45) packages/flutter/lib/src/material/switch.dart:1510 — _SwitchPainter.paint has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (31 pts), ternaries 8 (9 pts), boolean chains 4, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderSliverFixedExtentBoxAdaptor.performLayout (cognitive 45) · ×1
  • RenderSliverFixedExtentBoxAdaptor.performLayout (cognitive 45) packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:337 — RenderSliverFixedExtentBoxAdaptor.performLayout has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 11, ternaries 4 (6 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelBuffers.handleMessage (cognitive 45) · ×1
  • ChannelBuffers.handleMessage (cognitive 45) engine/src/flutter/lib/ui/channel_buffers.dart:432 — ChannelBuffers.handleMessage has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (41 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsObject.updateSelf (cognitive 45) · ×1
  • SemanticsObject.updateSelf (cognitive 45) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:1870 — SemanticsObject.updateSelf has cognitive complexity 45 (threshold 15). Drivers by points: if/else 42 (44 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _PrefixedStringBuilder._wordWrapLine (cognitive 43) · ×1
  • _PrefixedStringBuilder._wordWrapLine (cognitive 43) packages/flutter/lib/src/foundation/diagnostics.dart:863 — _PrefixedStringBuilder._wordWrapLine has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (13 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatePickerThemeData.== (cognitive 42) · ×1
  • DatePickerThemeData.== (cognitive 42) packages/flutter/lib/src/material/date_picker_theme.dart:742 — DatePickerThemeData.== has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 41, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RenderBox.debugAssertDoesMeetConstraints (cognitive 42) · ×1
  • RenderBox.debugAssertDoesMeetConstraints (cognitive 42) packages/flutter/lib/src/rendering/box.dart:2565 — RenderBox.debugAssertDoesMeetConstraints has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 2 (6 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderCustomPaint._updateSemanticsChildren (cognitive 42) · ×1
  • RenderCustomPaint._updateSemanticsChildren (cognitive 42) packages/flutter/lib/src/rendering/custom_paint.dart:729 — RenderCustomPaint._updateSemanticsChildren has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 7 (8 pts), boolean chains 5 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TextSelectionGestureDetectorBuilder.onDragSelectionUpdate (cognitive 42) · ×1
  • TextSelectionGestureDetectorBuilder.onDragSelectionUpdate (cognitive 42) packages/flutter/lib/src/widgets/text_selection.dart:3185 — TextSelectionGestureDetectorBuilder.onDragSelectionUpdate has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 7 (20 pts), if/else 9 (14 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 19). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _ModuleTest.call (cognitive 42) · ×1
  • _ModuleTest.call (cognitive 42) dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:44 — _ModuleTest.call has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (35 pts), ternaries 2 (4 pts), error handling 2, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelBuffers.handleMessage (cognitive 42) · ×1
  • ChannelBuffers.handleMessage (cognitive 42) engine/src/flutter/lib/web_ui/lib/channel_buffers.dart:173 — ChannelBuffers.handleMessage has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextWrapper.breakLines (cognitive 42) · ×1
  • TextWrapper.breakLines (cognitive 42) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/wrapper.dart:52 — TextWrapper.breakLines has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderSlider.paint (cognitive 41) · ×1
  • _RenderSlider.paint (cognitive 41) packages/flutter/lib/src/material/slider.dart:1728 — _RenderSlider.paint has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 7 (14 pts), boolean chains 9, loops 1 (3 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LicenseEntryWithLineBreaks.paragraphs (cognitive 40) · ×1
  • LicenseEntryWithLineBreaks.paragraphs (cognitive 40) packages/flutter/lib/src/foundation/licenses.dart:152 — LicenseEntryWithLineBreaks.paragraphs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 4 (9 pts), boolean chains 3, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputDecorationThemeData.== (cognitive 40) · ×1
  • InputDecorationThemeData.== (cognitive 40) packages/flutter/lib/src/material/input_decorator.dart:5553 — InputDecorationThemeData.== has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 38, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _TextFieldState.build (cognitive 40) · ×1
  • _TextFieldState.build (cognitive 40) packages/flutter/lib/src/material/text_field.dart:1528 — _TextFieldState.build has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 10 (15 pts), if/else 10 (13 pts), boolean chains 10, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FallbackFontService._findFontsForComponents (cognitive 40) · ×1
  • FallbackFontService._findFontsForComponents (cognitive 40) engine/src/flutter/lib/web_ui/lib/src/engine/font_fallback_service.dart:276 — FallbackFontService._findFontsForComponents has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TabBarState.build (cognitive 39) · ×1
  • _TabBarState.build (cognitive 39) packages/flutter/lib/src/material/tabs.dart:1954 — _TabBarState.build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 4 (8 pts), boolean chains 4, match/switch 1 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderParagraph.assembleSemanticsNode (cognitive 39) · ×1
  • RenderParagraph.assembleSemanticsNode (cognitive 39) packages/flutter/lib/src/rendering/paragraph.dart:1361 — RenderParagraph.assembleSemanticsNode has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SliverMultiBoxAdaptorElement.performRebuild (cognitive 39) · ×1
  • SliverMultiBoxAdaptorElement.performRebuild (cognitive 39) packages/flutter/lib/src/widgets/sliver.dart:971 — SliverMultiBoxAdaptorElement.performRebuild has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectableTextContainerDelegate._adjustSelection (cognitive 39) · ×1
  • _SelectableTextContainerDelegate._adjustSelection (cognitive 39) packages/flutter/lib/src/widgets/text.dart:1135 — _SelectableTextContainerDelegate._adjustSelection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 16, match/switch 2 (3 pts), ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdatePackagesCommand.runCommand (cognitive 39) · ×1
  • UpdatePackagesCommand.runCommand (cognitive 39) packages/flutter_tools/lib/src/commands/update_packages.dart:144 — UpdatePackagesCommand.runCommand has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (10 pts), boolean chains 9 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyEmbedderResponder.synchronizePressingKey (cognitive 39) · ×1
  • KeyEmbedderResponder.synchronizePressingKey (cognitive 39) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/KeyEmbedderResponder.java:136 — KeyEmbedderResponder.synchronizePressingKey has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RailDestinationState.build (cognitive 38) · ×1
  • _RailDestinationState.build (cognitive 38) packages/flutter/lib/src/material/navigation_rail.dart:699 — _RailDestinationState.build has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 17 (28 pts), if/else 4 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SliderThemeData.== (cognitive 38) · ×1
  • SliderThemeData.== (cognitive 38) packages/flutter/lib/src/material/slider_theme.dart:868 — SliderThemeData.== has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 36, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SliverReorderableListState._dragUpdateItems (cognitive 38) · ×1
  • SliverReorderableListState._dragUpdateItems (cognitive 38) packages/flutter/lib/src/widgets/reorderable_list.dart:1044 — SliverReorderableListState._dragUpdateItems has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 10, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DriveCommand.runCommand (cognitive 38) · ×1
  • DriveCommand.runCommand (cognitive 38) packages/flutter_tools/lib/src/commands/drive.dart:323 — DriveCommand.runCommand has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IosProject.containsWatchCompanion (cognitive 38) · ×1
  • IosProject.containsWatchCompanion (cognitive 38) packages/flutter_tools/lib/src/xcode_project.dart:1003 — IosProject.containsWatchCompanion has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 2, loops 2 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _MergeableMaterialState.build (cognitive 37) · ×1
  • _MergeableMaterialState.build (cognitive 37) packages/flutter/lib/src/material/mergeable_material.dart:531 — _MergeableMaterialState.build has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 4 (20 pts), if/else 7 (13 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SnackBarState.build (cognitive 37) · ×1
  • _SnackBarState.build (cognitive 37) packages/flutter/lib/src/material/snack_bar.dart:621 — _SnackBarState.build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 13, boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Border.paint (cognitive 37) · ×1
  • Border.paint (cognitive 37) packages/flutter/lib/src/painting/box_border.dart:620 — Border.paint has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, ternaries 4 (8 pts), match/switch 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderObjectSemantics._mergeSiblingGroup (cognitive 37) · ×1
  • _RenderObjectSemantics._mergeSiblingGroup (cognitive 37) packages/flutter/lib/src/rendering/object.dart:6399 — _RenderObjectSemantics._mergeSiblingGroup has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextSelectionGestureDetectorBuilder.onSingleTapUp (cognitive 37) · ×1
  • TextSelectionGestureDetectorBuilder.onSingleTapUp (cognitive 37) packages/flutter/lib/src/widgets/text_selection.dart:2623 — TextSelectionGestureDetectorBuilder.onSingleTapUp has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 9, match/switch 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VMServiceFlutterDriver.connect (cognitive 37) · ×1
  • VMServiceFlutterDriver.connect (cognitive 37) packages/flutter_driver/lib/src/driver/vmservice_driver.dart:32 — VMServiceFlutterDriver.connect has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 9, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KernelCompiler.compile (cognitive 37) · ×1
  • KernelCompiler.compile (cognitive 37) packages/flutter_tools/lib/src/compile.dart:285 — KernelCompiler.compile has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DevFS.updateBundle (cognitive 37) · ×1
  • DevFS.updateBundle (cognitive 37) packages/flutter_tools/lib/src/devfs.dart:686 — DevFS.updateBundle has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 10, loops 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResidentWebRunner.attach (cognitive 37) · ×1
  • ResidentWebRunner.attach (cognitive 37) packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:792 — ResidentWebRunner.attach has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 5 (11 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardConverter._handleEvent (cognitive 37) · ×1
  • KeyboardConverter._handleEvent (cognitive 37) engine/src/flutter/lib/web_ui/lib/src/engine/keyboard_binding.dart:403 — KeyboardConverter._handleEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 5, ternaries 2, match/switch 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PointerDataConverter.convert (cognitive 37) · ×1
  • PointerDataConverter.convert (cognitive 37) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:235 — PointerDataConverter.convert has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (32 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsObject.updateChildren (cognitive 37) · ×1
  • SemanticsObject.updateChildren (cognitive 37) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:2097 — SemanticsObject.updateChildren has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 10 (14 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalizationPlugin.resolveNativeLocale (cognitive 37) · ×1
  • LocalizationPlugin.resolveNativeLocale (cognitive 37) engine/src/flutter/shell/platform/android/io/flutter/plugin/localization/LocalizationPlugin.java:73 — LocalizationPlugin.resolveNativeLocale has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 5 (13 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccessibilityBridge.predictCursorMovement (cognitive 37) · ×1
  • AccessibilityBridge.predictCursorMovement (cognitive 37) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:1224 — AccessibilityBridge.predictCursorMovement has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 7, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTable.performLayout (cognitive 36) · ×1
  • RenderTable.performLayout (cognitive 36) packages/flutter/lib/src/rendering/table.dart:1322 — RenderTable.performLayout has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (9 pts), match/switch 3 (9 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsData.== (cognitive 36) · ×1
  • SemanticsData.== (cognitive 36) packages/flutter/lib/src/semantics/semantics.dart:1577 — SemanticsData.== has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 36. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RunCommand.runCommand (cognitive 36) · ×1
  • RunCommand.runCommand (cognitive 36) packages/flutter_tools/lib/src/commands/run.dart:731 — RunCommand.runCommand has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (23 pts), error handling 3 (5 pts), boolean chains 3, ternaries 1 (3 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DebuggingOptions.getIOSLaunchArguments (cognitive 36) · ×1
  • DebuggingOptions.getIOSLaunchArguments (cognitive 36) packages/flutter_tools/lib/src/device.dart:1274 — DebuggingOptions.getIOSLaunchArguments has cognitive complexity 36 (threshold 15). Drivers by points: if/else 30, boolean chains 4, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HotRunner._restartFromSources (cognitive 36) · ×1
  • HotRunner._restartFromSources (cognitive 36) packages/flutter_tools/lib/src/run_hot.dart:604 — HotRunner._restartFromSources has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 6 (12 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccessibilityBridge.createAccessibilityNodeInfo (cognitive 36) · ×1
  • AccessibilityBridge.createAccessibilityNodeInfo (cognitive 36) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:781 — AccessibilityBridge.createAccessibilityNodeInfo has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MenuLayoutDelegate._positionChild (cognitive 35) · ×1
  • _MenuLayoutDelegate._positionChild (cognitive 35) packages/flutter/lib/src/cupertino/menu_anchor.dart:1285 — _MenuLayoutDelegate._positionChild has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 6 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AlertDialog.build (cognitive 35) · ×1
  • AlertDialog.build (cognitive 35) packages/flutter/lib/src/material/dialog.dart:764 — AlertDialog.build has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 9 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BoxConstraints.debugAssertIsValid (cognitive 35) · ×1
  • BoxConstraints.debugAssertIsValid (cognitive 35) packages/flutter/lib/src/rendering/box.dart:547 — BoxConstraints.debugAssertIsValid has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 6, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderEditable.assembleSemanticsNode (cognitive 35) · ×1
  • RenderEditable.assembleSemanticsNode (cognitive 35) packages/flutter/lib/src/rendering/editable.dart:1412 — RenderEditable.assembleSemanticsNode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _NestedScrollCoordinator.applyUserOffset (cognitive 35) · ×1
  • _NestedScrollCoordinator.applyUserOffset (cognitive 35) packages/flutter/lib/src/widgets/nested_scroll_view.dart:1068 — _NestedScrollCoordinator.applyUserOffset has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (12 pts), ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DebuggingOptions._getAndroidEngineConfig (cognitive 35) · ×1
  • DebuggingOptions._getAndroidEngineConfig (cognitive 35) packages/flutter_tools/lib/src/device.dart:1432 — DebuggingOptions._getAndroidEngineConfig has cognitive complexity 35 (threshold 15). Drivers by points: if/else 27 (35 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WebAssetServer._resolveDartFile (cognitive 35) · ×1
  • WebAssetServer._resolveDartFile (cognitive 35) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:708 — WebAssetServer._resolveDartFile has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 1, match/switch 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Tracing.stopTracingAndDownloadTimeline (cognitive 35) · ×1
  • Tracing.stopTracingAndDownloadTimeline (cognitive 35) packages/flutter_tools/lib/src/tracing.dart:36 — Tracing.stopTracingAndDownloadTimeline has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (7 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextEditingDeltaState.inferDeltaState (cognitive 35) · ×1
  • TextEditingDeltaState.inferDeltaState (cognitive 35) engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:821 — TextEditingDeltaState.inferDeltaState has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 7, ternaries 2 (7 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StandardMessageCodec.writeValue (cognitive 35) · ×1
  • StandardMessageCodec.writeValue (cognitive 35) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java:219 — StandardMessageCodec.writeValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (18 pts), loops 6 (12 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ArchiveCreator._downloadPubPackageArchives (cognitive 34) · ×1
  • ArchiveCreator._downloadPubPackageArchives (cognitive 34) dev/bots/prepare_package/archive_creator.dart:326 — ArchiveCreator._downloadPubPackageArchives has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _Visitor.visitAnnotation (cognitive 34) · ×1
  • _Visitor.visitAnnotation (cognitive 34) dev/flutter_analyzer_plugin/lib/src/rules/deprecation_syntax.dart:83 — _Visitor.visitAnnotation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DragGestureRecognizer.handleEvent (cognitive 34) · ×1
  • DragGestureRecognizer.handleEvent (cognitive 34) packages/flutter/lib/src/gestures/monodrag.dart:653 — DragGestureRecognizer.handleEvent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (11 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SliverAppBarDelegate.shouldRebuild (cognitive 34) · ×1
  • _SliverAppBarDelegate.shouldRebuild (cognitive 34) packages/flutter/lib/src/material/app_bar.dart:1430 — _SliverAppBarDelegate.shouldRebuild has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 34. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _SelectToggleButtonRenderObject.paint (cognitive 34) · ×1
  • _SelectToggleButtonRenderObject.paint (cognitive 34) packages/flutter/lib/src/material/toggle_buttons.dart:1327 — _SelectToggleButtonRenderObject.paint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (23 pts), ternaries 5 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HighlightModeManager.handleKeyMessage (cognitive 34) · ×1
  • _HighlightModeManager.handleKeyMessage (cognitive 34) packages/flutter/lib/src/widgets/focus_manager.dart:2219 — _HighlightModeManager.handleKeyMessage has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 9 (12 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate._handleSelectBoundary (cognitive 34) · ×1
  • MultiSelectableSelectionContainerDelegate._handleSelectBoundary (cognitive 34) packages/flutter/lib/src/widgets/selectable_region.dart:2988 — MultiSelectableSelectionContainerDelegate._handleSelectBoundary has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShaderCompiler.compileShader (cognitive 34) · ×1
  • ShaderCompiler.compileShader (cognitive 34) packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart:200 — ShaderCompiler.compileShader has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (27 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LspPreviewDetector._fileAddedOrUpdated (cognitive 34) · ×1
  • LspPreviewDetector._fileAddedOrUpdated (cognitive 34) packages/flutter_tools/lib/src/widget_preview/lsp_preview_detector.dart:184 — LspPreviewDetector._fileAddedOrUpdated has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnginePlatformDispatcher._sendPlatformMessage (cognitive 34) · ×1
  • EnginePlatformDispatcher._sendPlatformMessage (cognitive 34) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:474 — EnginePlatformDispatcher._sendPlatformMessage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 5 (9 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlatformViewEmbedder._updateDomForNewComposition (cognitive 34) · ×1
  • PlatformViewEmbedder._updateDomForNewComposition (cognitive 34) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:459 — PlatformViewEmbedder._updateDomForNewComposition has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterView.onApplyWindowInsets (cognitive 34) · ×1
  • FlutterView.onApplyWindowInsets (cognitive 34) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java:735 — FlutterView.onApplyWindowInsets has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 9 (12 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RefreshIndicatorState._handleScrollNotification (cognitive 33) · ×1
  • RefreshIndicatorState._handleScrollNotification (cognitive 33) packages/flutter/lib/src/material/refresh_indicator.dart:421 — RefreshIndicatorState._handleScrollNotification has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTable.setFlatChildren (cognitive 33) · ×1
  • RenderTable.setFlatChildren (cognitive 33) packages/flutter/lib/src/rendering/table.dart:797 — RenderTable.setFlatChildren has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 8, loops 5 (8 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode._addToUpdate (cognitive 33) · ×1
  • SemanticsNode._addToUpdate (cognitive 33) packages/flutter/lib/src/semantics/semantics.dart:4257 — SemanticsNode._addToUpdate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 2 (6 pts), boolean chains 3, ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextInput._handleTextInputInvocation (cognitive 33) · ×1
  • TextInput._handleTextInputInvocation (cognitive 33) packages/flutter/lib/src/services/text_input.dart:2186 — TextInput._handleTextInputInvocation has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, loops 2 (4 pts), match/switch 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DirectionalFocusTraversalPolicyMixin._findNextFocusInDirection (cognitive 33) · ×1
  • DirectionalFocusTraversalPolicyMixin._findNextFocusInDirection (cognitive 33) packages/flutter/lib/src/widgets/focus_traversal.dart:811 — DirectionalFocusTraversalPolicyMixin._findNextFocusInDirection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (32 pts), match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _ScrollableSelectionContainerDelegate._jumpToEdge (cognitive 33) · ×1
  • _ScrollableSelectionContainerDelegate._jumpToEdge (cognitive 33) packages/flutter/lib/src/widgets/scrollable.dart:1426 — _ScrollableSelectionContainerDelegate._jumpToEdge has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 5, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccessibilityBridge.performAction (cognitive 33) · ×1
  • AccessibilityBridge.performAction (cognitive 33) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:948 — AccessibilityBridge.performAction has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 5, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SnippetChecker._analyze (cognitive 32) · ×1
  • _SnippetChecker._analyze (cognitive 32) dev/bots/analyze_snippet_code.dart:1057 — _SnippetChecker._analyze has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 3 (9 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DatePickerDialogState.build (cognitive 32) · ×1
  • _DatePickerDialogState.build (cognitive 32) packages/flutter/lib/src/material/date_picker.dart:563 — _DatePickerDialogState.build has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 10 (12 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderDecoration._layout (cognitive 32) · ×1
  • _RenderDecoration._layout (cognitive 32) packages/flutter/lib/src/material/input_decorator.dart:953 — _RenderDecoration._layout has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 21 (25 pts), if/else 4, boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _SegmentedButtonDefaultsM3.style (cognitive 32) · ×1
  • _SegmentedButtonDefaultsM3.style (cognitive 32) packages/flutter/lib/src/material/segmented_button.dart:1198 — _SegmentedButtonDefaultsM3.style has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (32 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResizeImage.loadImage (cognitive 32) · ×1
  • ResizeImage.loadImage (cognitive 32) packages/flutter/lib/src/painting/image_provider.dart:1415 — ResizeImage.loadImage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditableTextState._handleContextMenuOnScroll (cognitive 32) · ×1
  • EditableTextState._handleContextMenuOnScroll (cognitive 32) packages/flutter/lib/src/widgets/editable_text.dart:4396 — EditableTextState._handleContextMenuOnScroll has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 8, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SemanticsDebuggerPainter.getMessage (cognitive 32) · ×1
  • _SemanticsDebuggerPainter.getMessage (cognitive 32) packages/flutter/lib/src/widgets/semantics_debugger.dart:223 — _SemanticsDebuggerPainter.getMessage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 6, match/switch 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BuildIOSFrameworkCommand.runCommand (cognitive 32) · ×1
  • BuildIOSFrameworkCommand.runCommand (cognitive 32) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:527 — BuildIOSFrameworkCommand.runCommand has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IdeConfigCommand._handleTemplateUpdate (cognitive 32) · ×1
  • IdeConfigCommand._handleTemplateUpdate (cognitive 32) packages/flutter_tools/lib/src/commands/ide_config.dart:127 — IdeConfigCommand._handleTemplateUpdate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackagesGetCommand.runCommand (cognitive 32) · ×1
  • PackagesGetCommand.runCommand (cognitive 32) packages/flutter_tools/lib/src/commands/packages.dart:337 — PackagesGetCommand.runCommand has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5, error handling 2, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdatePackagesCommand._upgrade (cognitive 32) · ×1
  • UpdatePackagesCommand._upgrade (cognitive 32) packages/flutter_tools/lib/src/commands/update_packages.dart:284 — UpdatePackagesCommand._upgrade has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (7 pts), error handling 1 (6 pts), ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopDevice._computeEnvironment (cognitive 32) · ×1
  • DesktopDevice._computeEnvironment (cognitive 32) packages/flutter_tools/lib/src/desktop_device.dart:257 — DesktopDevice._computeEnvironment has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (31 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LicenseCollector.obtainLicenses (cognitive 32) · ×1
  • LicenseCollector.obtainLicenses (cognitive 32) packages/flutter_tools/lib/src/license_collector.dart:34 — LicenseCollector.obtainLicenses has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (6 pts), loops 4 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalysisOptionsMigration.migrate (cognitive 32) · ×1
  • AnalysisOptionsMigration.migrate (cognitive 32) packages/flutter_tools/lib/src/migrations/analysis_options_migration.dart:25 — AnalysisOptionsMigration.migrate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 2 (5 pts), error handling 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode.updateRecursively (cognitive 32) · ×1
  • SemanticsNode.updateRecursively (cognitive 32) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2742 — SemanticsNode.updateRecursively has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 2 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ForcePressGestureRecognizer.handleEvent (cognitive 31) · ×1
  • ForcePressGestureRecognizer.handleEvent (cognitive 31) packages/flutter/lib/src/gestures/force_press.dart:235 — ForcePressGestureRecognizer.handleEvent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 9 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderSegmentedButton.paint (cognitive 31) · ×1
  • _RenderSegmentedButton.paint (cognitive 31) packages/flutter/lib/src/material/segmented_button.dart:1060 — _RenderSegmentedButton.paint has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 8 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderObjectSemantics.updateChildren (cognitive 31) · ×1
  • _RenderObjectSemantics.updateChildren (cognitive 31) packages/flutter/lib/src/rendering/object.dart:5793 — _RenderObjectSemantics.updateChildren has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 7, loops 4 (7 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RenderViewportBase.getOffsetToReveal (cognitive 31) · ×1
  • RenderViewportBase.getOffsetToReveal (cognitive 31) packages/flutter/lib/src/rendering/viewport.dart:1053 — RenderViewportBase.getOffsetToReveal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 7 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowPositioner.placeWindow (cognitive 31) · ×1
  • WindowPositioner.placeWindow (cognitive 31) packages/flutter/lib/src/widgets/_window_positioner.dart:377 — WindowPositioner.placeWindow has cognitive complexity 31 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FocusTraversalPolicy._moveFocus (cognitive 31) · ×1
  • FocusTraversalPolicy._moveFocus (cognitive 31) packages/flutter/lib/src/widgets/focus_traversal.dart:575 — FocusTraversalPolicy._moveFocus has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (9 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Element.updateChild (cognitive 31) · ×1
  • Element.updateChild (cognitive 31) packages/flutter/lib/src/widgets/framework.dart:3972 — Element.updateChild has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultTransitionDelegate.resolve (cognitive 31) · ×1
  • DefaultTransitionDelegate.resolve (cognitive 31) packages/flutter/lib/src/widgets/navigator.dart:1209 — DefaultTransitionDelegate.resolve has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _NestedScrollCoordinator.pointerScroll (cognitive 31) · ×1
  • _NestedScrollCoordinator.pointerScroll (cognitive 31) packages/flutter/lib/src/widgets/nested_scroll_view.dart:956 — _NestedScrollCoordinator.pointerScroll has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (11 pts), ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GlowingOverscrollIndicatorState._handleScrollNotification (cognitive 31) · ×1
  • _GlowingOverscrollIndicatorState._handleScrollNotification (cognitive 31) packages/flutter/lib/src/widgets/overscroll_indicator.dart:206 — _GlowingOverscrollIndicatorState._handleScrollNotification has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 1 (5 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlockUpstream.determine (cognitive 31) · ×1
  • FlockUpstream.determine (cognitive 31) packages/flutter_tools/lib/src/flock_version.dart:119 — FlockUpstream.determine has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebAssetServer.handleRequest (cognitive 31) · ×1
  • WebAssetServer.handleRequest (cognitive 31) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:438 — WebAssetServer.handleRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterShellArgs.fromIntent (cognitive 31) · ×1
  • FlutterShellArgs.fromIntent (cognitive 31) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java:93 — FlutterShellArgs.fromIntent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 29 (31 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AndroidTouchProcessor.addPointerForIndex (cognitive 31) · ×1
  • AndroidTouchProcessor.addPointerForIndex (cognitive 31) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java:305 — AndroidTouchProcessor.addPointerForIndex has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 2, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · create_updated_flutter_deps.Main (cognitive 31) · ×1
  • create_updated_flutter_deps.Main (cognitive 31) engine/src/tools/dart/create_updated_flutter_deps.py:365 — create_updated_flutter_deps.Main has cognitive complexity 31 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 7 (13 pts), boolean chains 4 (nesting depth added 14). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · SkiaGoldClient.getImageBytes (cognitive 30) · ×1
  • SkiaGoldClient.getImageBytes (cognitive 30) packages/flutter_goldens/lib/skia_client.dart:405 — SkiaGoldClient.getImageBytes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (20 pts), error handling 3 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CupertinoDatePickerDateTimeState.build (cognitive 30) · ×1
  • _CupertinoDatePickerDateTimeState.build (cognitive 30) packages/flutter/lib/src/cupertino/date_picker.dart:1209 — _CupertinoDatePickerDateTimeState.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (6 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LeastSquaresSolver.solve (cognitive 30) · ×1
  • LeastSquaresSolver.solve (cognitive 30) packages/flutter/lib/src/gestures/lsq_solver.dart:103 — LeastSquaresSolver.solve has cognitive complexity 30 (threshold 15). Drivers by points: loops 14 (23 pts), ternaries 2 (4 pts), if/else 2 (3 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _DropdownMenuState.build (cognitive 30) · ×1
  • _DropdownMenuState.build (cognitive 30) packages/flutter/lib/src/material/dropdown_menu.dart:1140 — _DropdownMenuState.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 11 (12 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _LinearProgressIndicatorPainter.paint (cognitive 30) · ×1
  • _LinearProgressIndicatorPainter.paint (cognitive 30) packages/flutter/lib/src/material/progress_indicator.dart:210 — _LinearProgressIndicatorPainter.paint has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 8 (13 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BorderDirectional.paint (cognitive 30) · ×1
  • BorderDirectional.paint (cognitive 30) packages/flutter/lib/src/painting/box_border.dart:1000 — BorderDirectional.paint has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), ternaries 4 (8 pts), match/switch 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderObject.layout (cognitive 30) · ×1
  • RenderObject.layout (cognitive 30) packages/flutter/lib/src/rendering/object.dart:2793 — RenderObject.layout has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 9, ternaries 2 (4 pts), error handling 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderSliverMainAxisGroup.performLayout (cognitive 30) · ×1
  • RenderSliverMainAxisGroup.performLayout (cognitive 30) packages/flutter/lib/src/rendering/sliver_group.dart:272 — RenderSliverMainAxisGroup.performLayout has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 5 (10 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StandardMessageCodec.writeValue (cognitive 30) · ×1
  • StandardMessageCodec.writeValue (cognitive 30) packages/flutter/lib/src/services/message_codecs.dart:349 — StandardMessageCodec.writeValue has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (23 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IconTreeShaker._parseRecordings (cognitive 30) · ×1
  • IconTreeShaker._parseRecordings (cognitive 30) packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart:345 — IconTreeShaker._parseRecordings has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (16 pts), ternaries 2 (10 pts), loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomDeviceAppSession._getEngineOptions (cognitive 30) · ×1
  • CustomDeviceAppSession._getEngineOptions (cognitive 30) packages/flutter_tools/lib/src/custom_devices/custom_device.dart:267 — CustomDeviceAppSession._getEngineOptions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22 (30 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterCommandRunner.runCommand (cognitive 30) · ×1
  • FlutterCommandRunner.runCommand (cognitive 30) packages/flutter_tools/lib/src/runner/flutter_command_runner.dart:547 — FlutterCommandRunner.runCommand has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 5, error handling 1 (2 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _CupertinoSliverRefreshControlState.transitionNextState (cognitive 29) · ×1
  • _CupertinoSliverRefreshControlState.transitionNextState (cognitive 29) packages/flutter/lib/src/cupertino/refresh.dart:472 — _CupertinoSliverRefreshControlState.transitionNextState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup (cognitive 29) · ×1
  • _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup (cognitive 29) packages/flutter/lib/src/rendering/object.dart:5987 — _RenderObjectSemantics._collectChildMergeUpAndSiblingGroup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode._isDifferentFromCurrentSemanticAnnotation (cognitive 29) · ×1
  • SemanticsNode._isDifferentFromCurrentSemanticAnnotation (cognitive 29) packages/flutter/lib/src/semantics/semantics.dart:3476 — SemanticsNode._isDifferentFromCurrentSemanticAnnotation has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 29. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SemanticsNode._updateChildrenInTraversalOrder (cognitive 29) · ×1
  • SemanticsNode._updateChildrenInTraversalOrder (cognitive 29) packages/flutter/lib/src/semantics/semantics.dart:4379 — SemanticsNode._updateChildrenInTraversalOrder has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Node.computeChanges (cognitive 29) · ×1
  • Node.computeChanges (cognitive 29) packages/flutter_tools/lib/src/build_system/build_system.dart:1262 — Node.computeChanges has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArtifactUpdater._downloadArchive (cognitive 29) · ×1
  • ArtifactUpdater._downloadArchive (cognitive 29) packages/flutter_tools/lib/src/cache.dart:1276 — ArtifactUpdater._downloadArchive has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (18 pts), error handling 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _BuildIOSSubCommand.runCommand (cognitive 29) · ×1
  • _BuildIOSSubCommand.runCommand (cognitive 29) packages/flutter_tools/lib/src/commands/build_ios.dart:976 — _BuildIOSSubCommand.runCommand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 5 (8 pts), boolean chains 7, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalysisServer._handleServerResponse (cognitive 29) · ×1
  • AnalysisServer._handleServerResponse (cognitive 29) packages/flutter_tools/lib/src/dart/analysis.dart:241 — AnalysisServer._handleServerResponse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 2 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GalleryTransitionTest.call (cognitive 29) · ×1
  • GalleryTransitionTest.call (cognitive 29) dev/devicelab/lib/tasks/gallery.dart:106 — GalleryTransitionTest.call has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FallbackFontService._downloadAndRegisterFontWithRetries (cognitive 29) · ×1
  • FallbackFontService._downloadAndRegisterFontWithRetries (cognitive 29) engine/src/flutter/lib/web_ui/lib/src/engine/font_fallback_service.dart:491 — FallbackFontService._downloadAndRegisterFontWithRetries has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EngineImage.toByteData (cognitive 29) · ×1
  • EngineImage.toByteData (cognitive 29) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/image.dart:134 — EngineImage.toByteData has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 10, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sky_utils.assert_valid_codesign_config (cognitive 29) · ×1
  • sky_utils.assert_valid_codesign_config (cognitive 29) engine/src/flutter/sky/tools/sky_utils.py:28 — sky_utils.assert_valid_codesign_config has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (14 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · load (cognitive 29) · ×1
  • load (cognitive 29) engine/src/flutter/lib/web_ui/flutter_js/src/loader.js:85 — load has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1, other 1 (nesting depth added 9). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (buildIncompatibilityReason, rendererIncompatibilityReason). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CatmullRomCurve.validateControlPoints (cognitive 28) · ×1
  • CatmullRomCurve.validateControlPoints (cognitive 28) packages/flutter/lib/src/animation/curves.dart:1042 — CatmullRomCurve.validateControlPoints has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DateRangePickerDialogState.build (cognitive 28) · ×1
  • _DateRangePickerDialogState.build (cognitive 28) packages/flutter/lib/src/material/date_picker.dart:1610 — _DateRangePickerDialogState.build has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 13 (26 pts), boolean chains 1, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _WidgetsAppState.build (cognitive 28) · ×1
  • _WidgetsAppState.build (cognitive 28) packages/flutter/lib/src/widgets/app.dart:1702 — _WidgetsAppState.build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TransitionRoute._updateSecondaryAnimation (cognitive 28) · ×1
  • TransitionRoute._updateSecondaryAnimation (cognitive 28) packages/flutter/lib/src/widgets/routes.dart:422 — TransitionRoute._updateSecondaryAnimation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BuildWebCommand.runCommand (cognitive 28) · ×1
  • BuildWebCommand.runCommand (cognitive 28) packages/flutter_tools/lib/src/commands/build_web.dart:51 — BuildWebCommand.runCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProjectFileInvalidator.findInvalidated (cognitive 28) · ×1
  • ProjectFileInvalidator.findInvalidated (cognitive 28) packages/flutter_tools/lib/src/run_hot.dart:1452 — ProjectFileInvalidator.findInvalidated has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (7 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IosProject._cocoapodsDependencyGraph (cognitive 28) · ×1
  • IosProject._cocoapodsDependencyGraph (cognitive 28) packages/flutter_tools/lib/src/xcode_project.dart:750 — IosProject._cocoapodsDependencyGraph has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (22 pts), loops 1 (5 pts), error handling 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlatformViewEmbedder.submitFrame (cognitive 28) · ×1
  • PlatformViewEmbedder.submitFrame (cognitive 28) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:311 — PlatformViewEmbedder.submitFrame has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 6 (11 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 1.call (cognitive 28) · ×1
  • 1.call (cognitive 28) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java:200 — 1.call has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (8 pts), ternaries 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 1.onMethodCall (cognitive 28) · ×1
  • 1.onMethodCall (cognitive 28) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java:39 — 1.onMethodCall has cognitive complexity 28 (threshold 15). Drivers by points: error handling 9 (18 pts), if/else 5 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xvfb.start_virtual_x (cognitive 28) · ×1
  • xvfb.start_virtual_x (cognitive 28) engine/src/flutter/testing/xvfb.py:27 — xvfb.start_virtual_x has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (8 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 12). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · QueryBuildersCommand.run (cognitive 27) · ×1
  • QueryBuildersCommand.run (cognitive 27) engine/src/flutter/tools/engine_tool/lib/src/commands/query_command.dart:77 — QueryBuildersCommand.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointerEventResampler._dequeueAndSampleNonHoverOrMovePointerEventsUntil (cognitive 27) · ×1
  • PointerEventResampler._dequeueAndSampleNonHoverOrMovePointerEventsUntil (cognitive 27) packages/flutter/lib/src/gestures/resampler.dart:174 — PointerEventResampler._dequeueAndSampleNonHoverOrMovePointerEventsUntil has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 5, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ButtonStyle.== (cognitive 27) · ×1
  • ButtonStyle.== (cognitive 27) packages/flutter/lib/src/material/button_style.dart:557 — ButtonStyle.== has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _Decoration.== (cognitive 27) · ×1
  • _Decoration.== (cognitive 27) packages/flutter/lib/src/material/input_decorator.dart:642 — _Decoration.== has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _SubmenuDirectionalFocusAction.invoke (cognitive 27) · ×1
  • _SubmenuDirectionalFocusAction.invoke (cognitive 27) packages/flutter/lib/src/material/menu_anchor.dart:2383 — _SubmenuDirectionalFocusAction.invoke has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LinearBorder.paint (cognitive 27) · ×1
  • LinearBorder.paint (cognitive 27) packages/flutter/lib/src/painting/linear_border.dart:265 — LinearBorder.paint has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 8, if/else 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextStyle.== (cognitive 27) · ×1
  • TextStyle.== (cognitive 27) packages/flutter/lib/src/painting/text_style.dart:1491 — TextStyle.== has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · EditableTextState.didChangeDependencies (cognitive 27) · ×1
  • EditableTextState.didChangeDependencies (cognitive 27) packages/flutter/lib/src/widgets/editable_text.dart:3400 — EditableTextState.didChangeDependencies has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DirectionalFocusTraversalPolicyMixin._popPolicyDataIfNeeded (cognitive 27) · ×1
  • DirectionalFocusTraversalPolicyMixin._popPolicyDataIfNeeded (cognitive 27) packages/flutter/lib/src/widgets/focus_traversal.dart:1122 — DirectionalFocusTraversalPolicyMixin._popPolicyDataIfNeeded has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (10 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaQueryData.== (cognitive 27) · ×1
  • MediaQueryData.== (cognitive 27) packages/flutter/lib/src/widgets/media_query.dart:1201 — MediaQueryData.== has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 26, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SelectableRegionState._handleMouseDragUpdate (cognitive 27) · ×1
  • SelectableRegionState._handleMouseDragUpdate (cognitive 27) packages/flutter/lib/src/widgets/selectable_region.dart:831 — SelectableRegionState._handleMouseDragUpdate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 8, match/switch 3 (5 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AssembleCommand.runCommand (cognitive 27) · ×1
  • AssembleCommand.runCommand (cognitive 27) packages/flutter_tools/lib/src/commands/assemble.dart:397 — AssembleCommand.runCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 2 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtensionDevices.pollingGetDevices (cognitive 27) · ×1
  • ExtensionDevices.pollingGetDevices (cognitive 27) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:397 — ExtensionDevices.pollingGetDevices has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (5 pts), boolean chains 2, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResidentWebRunner.run (cognitive 27) · ×1
  • ResidentWebRunner.run (cognitive 27) packages/flutter_tools/lib/src/isolated/resident_web_runner.dart:231 — ResidentWebRunner.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 8, ternaries 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LLDBInitMigration._isSchemeMigrated (cognitive 27) · ×1
  • LLDBInitMigration._isSchemeMigrated (cognitive 27) packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:88 — LLDBInitMigration._isSchemeMigrated has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (11 pts), error handling 2 (3 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TextLayout.getGlyphInfoAt (cognitive 27) · ×1
  • TextLayout.getGlyphInfoAt (cognitive 27) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:928 — TextLayout.getGlyphInfoAt has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 4 (6 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebTextStyle.toString (cognitive 27) · ×1
  • WebTextStyle.toString (cognitive 27) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:375 — WebTextStyle.toString has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 7, loops 3 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TextInputPlugin.inputTypeFromTextInputType (cognitive 27) · ×1
  • TextInputPlugin.inputTypeFromTextInputType (cognitive 27) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java:247 — TextInputPlugin.inputTypeFromTextInputType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CupertinoListSection.build (cognitive 26) · ×1
  • CupertinoListSection.build (cognitive 26) packages/flutter/lib/src/cupertino/list_section.dart:392 — CupertinoListSection.build has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 3 (6 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterError.defaultStackFilter (cognitive 26) · ×1
  • FlutterError.defaultStackFilter (cognitive 26) packages/flutter/lib/src/foundation/assertions.dart:1059 — FlutterError.defaultStackFilter has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LongPressGestureRecognizer.isPointerAllowed (cognitive 26) · ×1
  • LongPressGestureRecognizer.isPointerAllowed (cognitive 26) packages/flutter/lib/src/gestures/long_press.dart:601 — LongPressGestureRecognizer.isPointerAllowed has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 18, if/else 4 (7 pts), match/switch 1 (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _FlexibleSpaceBarState.build (cognitive 26) · ×1
  • _FlexibleSpaceBarState.build (cognitive 26) packages/flutter/lib/src/material/flexible_space_bar.dart:224 — _FlexibleSpaceBarState.build has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (10 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderDecoration.paint (cognitive 26) · ×1
  • _RenderDecoration.paint (cognitive 26) packages/flutter/lib/src/material/input_decorator.dart:1591 — _RenderDecoration.paint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (10 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TimePickerModel.updateShouldNotifyDependent (cognitive 26) · ×1
  • _TimePickerModel.updateShouldNotifyDependent (cognitive 26) packages/flutter/lib/src/material/time_picker.dart:165 — _TimePickerModel.updateShouldNotifyDependent has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 13. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TimePickerThemeData.== (cognitive 26) · ×1
  • TimePickerThemeData.== (cognitive 26) packages/flutter/lib/src/material/time_picker_theme.dart:459 — TimePickerThemeData.== has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 24, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PipelineOwner.flushLayout (cognitive 26) · ×1
  • PipelineOwner.flushLayout (cognitive 26) packages/flutter/lib/src/rendering/object.dart:1132 — PipelineOwner.flushLayout has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayFeatureSubScreen.subScreensInBounds (cognitive 26) · ×1
  • DisplayFeatureSubScreen.subScreensInBounds (cognitive 26) packages/flutter/lib/src/widgets/display_feature_sub_screen.dart:196 — DisplayFeatureSubScreen.subScreensInBounds has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ReorderableItemState.updateForGap (cognitive 26) · ×1
  • _ReorderableItemState.updateForGap (cognitive 26) packages/flutter/lib/src/widgets/reorderable_list.dart:1314 — _ReorderableItemState.updateForGap has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate._initSelection (cognitive 26) · ×1
  • MultiSelectableSelectionContainerDelegate._initSelection (cognitive 26) packages/flutter/lib/src/widgets/selectable_region.dart:3257 — MultiSelectableSelectionContainerDelegate._initSelection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, ternaries 2 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectableTextContainerDelegate._calculateLocalRange (cognitive 26) · ×1
  • _SelectableTextContainerDelegate._calculateLocalRange (cognitive 26) packages/flutter/lib/src/widgets/text.dart:1294 — _SelectableTextContainerDelegate._calculateLocalRange has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 6 (10 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalyzeOnce.analyze (cognitive 26) · ×1
  • AnalyzeOnce.analyze (cognitive 26) packages/flutter_tools/lib/src/commands/analyze_once.dart:25 — AnalyzeOnce.analyze has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (8 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelCommand._listChannels (cognitive 26) · ×1
  • ChannelCommand._listChannels (cognitive 26) packages/flutter_tools/lib/src/commands/channel.dart:82 — ChannelCommand._listChannels has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DefaultPub.get (cognitive 26) · ×1
  • _DefaultPub.get (cognitive 26) packages/flutter_tools/lib/src/dart/pub.dart:290 — _DefaultPub.get has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (5 pts), boolean chains 4, match/switch 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReleaseAssetServer.handle (cognitive 26) · ×1
  • ReleaseAssetServer.handle (cognitive 26) packages/flutter_tools/lib/src/isolated/release_asset_server.dart:72 — ReleaseAssetServer.handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterCommand.getBuildInfo (cognitive 26) · ×1
  • FlutterCommand.getBuildInfo (cognitive 26) packages/flutter_tools/lib/src/runner/flutter_command.dart:608 — FlutterCommand.getBuildInfo has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts), ternaries 3 (4 pts), loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · FontFallbackManager.registerFallbackFont (cognitive 26) · ×1
  • FontFallbackManager.registerFallbackFont (cognitive 26) engine/src/flutter/lib/web_ui/lib/src/engine/font_fallbacks.dart:50 — FontFallbackManager.registerFallbackFont has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SliderRoleConfigurator.configureRole (cognitive 26) · ×1
  • SliderRoleConfigurator.configureRole (cognitive 26) engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java:17 — SliderRoleConfigurator.configureRole has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 3 (8 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ErrorBase.compareTo (cognitive 25) · ×1
  • _ErrorBase.compareTo (cognitive 25) dev/bots/analyze_snippet_code.dart:269 — _ErrorBase.compareTo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (25 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClangTidy.getLintCommandsForFiles (cognitive 25) · ×1
  • ClangTidy.getLintCommandsForFiles (cognitive 25) engine/src/flutter/tools/clang_tidy/lib/clang_tidy.dart:274 — ClangTidy.getLintCommandsForFiles has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · BuildRunner._runNinja (cognitive 25) · ×1
  • BuildRunner._runNinja (cognitive 25) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart:640 — BuildRunner._runNinja has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CheckboxPainter.paint (cognitive 25) · ×1
  • _CheckboxPainter.paint (cognitive 25) packages/flutter/lib/src/material/checkbox.dart:785 — _CheckboxPainter.paint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChipThemeData.== (cognitive 25) · ×1
  • ChipThemeData.== (cognitive 25) packages/flutter/lib/src/material/chip_theme.dart:607 — ChipThemeData.== has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 23, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _NavigationRailState.build (cognitive 25) · ×1
  • _NavigationRailState.build (cognitive 25) packages/flutter/lib/src/material/navigation_rail.dart:445 — _NavigationRailState.build has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 6 (7 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _IndicatorPainter._applyElasticEffect (cognitive 25) · ×1
  • _IndicatorPainter._applyElasticEffect (cognitive 25) packages/flutter/lib/src/material/tabs.dart:682 — _IndicatorPainter._applyElasticEffect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 5 (7 pts), ternaries 4 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ImageCache.putIfAbsent (cognitive 25) · ×1
  • ImageCache.putIfAbsent (cognitive 25) packages/flutter/lib/src/painting/image_cache.dart:310 — ImageCache.putIfAbsent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TextStyle.compareTo (cognitive 25) · ×1
  • TextStyle.compareTo (cognitive 25) packages/flutter/lib/src/painting/text_style.dart:1450 — TextStyle.compareTo has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 22, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PipelineOwner.flushPaint (cognitive 25) · ×1
  • PipelineOwner.flushPaint (cognitive 25) packages/flutter/lib/src/rendering/object.dart:1288 — PipelineOwner.flushPaint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RawKeyEvent.fromMessage (cognitive 25) · ×1
  • RawKeyEvent.fromMessage (cognitive 25) packages/flutter/lib/src/services/raw_keyboard.dart:378 — RawKeyEvent.fromMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DismissibleState._handleDragUpdate (cognitive 25) · ×1
  • _DismissibleState._handleDragUpdate (cognitive 25) packages/flutter/lib/src/widgets/dismissible.dart:383 — _DismissibleState._handleDragUpdate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _StretchingOverscrollIndicatorState._handleScrollNotification (cognitive 25) · ×1
  • _StretchingOverscrollIndicatorState._handleScrollNotification (cognitive 25) packages/flutter/lib/src/widgets/overscroll_indicator.dart:716 — _StretchingOverscrollIndicatorState._handleScrollNotification has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DefaultResidentCompiler._compile (cognitive 25) · ×1
  • DefaultResidentCompiler._compile (cognitive 25) packages/flutter_tools/lib/src/compile.dart:952 — DefaultResidentCompiler._compile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, boolean chains 5, loops 2, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FileTransfer.computeDelta (cognitive 25) · ×1
  • FileTransfer.computeDelta (cognitive 25) packages/flutter_tools/lib/src/proxied_devices/file_transfer.dart:255 — FileTransfer.computeDelta has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _BrowserEngineCodec.getNextFrame (cognitive 25) · ×1
  • _BrowserEngineCodec.getNextFrame (cognitive 25) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/codec.dart:94 — _BrowserEngineCodec.getNextFrame has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 3 (7 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShaderData.fromBytes (cognitive 25) · ×1
  • ShaderData.fromBytes (cognitive 25) engine/src/flutter/lib/web_ui/lib/src/engine/shader_data.dart:16 — ShaderData.fromBytes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VersionUtils.mostRecentSemanticVersion (cognitive 25) · ×1
  • VersionUtils.mostRecentSemanticVersion (cognitive 25) packages/flutter_tools/gradle/src/main/kotlin/VersionUtils.kt:21 — VersionUtils.mostRecentSemanticVersion has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · $skwasm_support_setup (cognitive 25) · ×1
  • $skwasm_support_setup (cognitive 25) engine/src/flutter/skwasm/library_skwasm_support.js:10 — $skwasm_support_setup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 3, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 36 function items inside it that branch (_skwasm_connectThread::eventListener, skwasm_registerMessageListener, skwasm_registerMessageListener::eventListener, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _CupertinoTextFieldState.build (cognitive 24) · ×1
  • _CupertinoTextFieldState.build (cognitive 24) packages/flutter/lib/src/cupertino/text_field.dart:1444 — _CupertinoTextFieldState.build has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 6 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _RenderButtonBarRow.performLayout (cognitive 24) · ×1
  • _RenderButtonBarRow.performLayout (cognitive 24) packages/flutter/lib/src/material/button_bar.dart:380 — _RenderButtonBarRow.performLayout has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _ButtonStyleState.build (cognitive 24) · ×1
  • _ButtonStyleState.build (cognitive 24) packages/flutter/lib/src/material/button_style_button.dart:374 — _ButtonStyleState.build has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, ternaries 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListTile.build (cognitive 24) · ×1
  • ListTile.build (cognitive 24) packages/flutter/lib/src/material/list_tile.dart:811 — ListTile.build has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 7 (8 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ListTileThemeData.== (cognitive 24) · ×1
  • ListTileThemeData.== (cognitive 24) packages/flutter/lib/src/material/list_tile_theme.dart:258 — ListTileThemeData.== has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 22, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RenderEditable.describeSemanticsConfiguration (cognitive 24) · ×1
  • RenderEditable.describeSemanticsConfiguration (cognitive 24) packages/flutter/lib/src/rendering/editable.dart:1322 — RenderEditable.describeSemanticsConfiguration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (7 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderSliverGrid.performLayout (cognitive 24) · ×1
  • RenderSliverGrid.performLayout (cognitive 24) packages/flutter/lib/src/rendering/sliver_grid.dart:592 — RenderSliverGrid.performLayout has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 3 (4 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TableBorder.paint (cognitive 24) · ×1
  • TableBorder.paint (cognitive 24) packages/flutter/lib/src/rendering/table_border.dart:254 — TableBorder.paint has cognitive complexity 24 (threshold 15). Drivers by points: loops 2 (8 pts), match/switch 2 (6 pts), boolean chains 5, if/else 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextEditingDelta.fromJSON (cognitive 24) · ×1
  • TextEditingDelta.fromJSON (cognitive 24) packages/flutter/lib/src/services/text_editing_delta.dart:62 — TextEditingDelta.fromJSON has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NavigatorState._updateHeroController (cognitive 24) · ×1
  • NavigatorState._updateHeroController (cognitive 24) packages/flutter/lib/src/widgets/navigator.dart:3976 — NavigatorState._updateHeroController has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 1 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SelectableRegionState._startNewMouseSelectionGesture (cognitive 24) · ×1
  • SelectableRegionState._startNewMouseSelectionGesture (cognitive 24) packages/flutter/lib/src/widgets/selectable_region.dart:745 — SelectableRegionState._startNewMouseSelectionGesture has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 4 (7 pts), boolean chains 5 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TextSelectionGestureDetectorBuilder.onTapDown (cognitive 24) · ×1
  • TextSelectionGestureDetectorBuilder.onTapDown (cognitive 24) packages/flutter/lib/src/widgets/text_selection.dart:2467 — TextSelectionGestureDetectorBuilder.onTapDown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WidgetInspectorService._getLayoutExplorerNode (cognitive 24) · ×1
  • WidgetInspectorService._getLayoutExplorerNode (cognitive 24) packages/flutter/lib/src/widgets/widget_inspector.dart:2274 — WidgetInspectorService._getLayoutExplorerNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DefaultProcessUtils.run (cognitive 24) · ×1
  • _DefaultProcessUtils.run (cognitive 24) packages/flutter_tools/lib/src/base/process.dart:350 — _DefaultProcessUtils.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomDevicesAddCommand.runInteractivelySsh (cognitive 24) · ×1
  • CustomDevicesAddCommand.runInteractivelySsh (cognitive 24) packages/flutter_tools/lib/src/commands/custom_devices.dart:463 — CustomDevicesAddCommand.runInteractivelySsh has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 7, boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DarwinAddToAppCodesigning._getCodesignIdentityFromFlutterProject (cognitive 24) · ×1
  • DarwinAddToAppCodesigning._getCodesignIdentityFromFlutterProject (cognitive 24) packages/flutter_tools/lib/src/commands/darwin_add_to_app.dart:159 — DarwinAddToAppCodesigning._getCodesignIdentityFromFlutterProject has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ValidateProject.run (cognitive 24) · ×1
  • ValidateProject.run (cognitive 24) packages/flutter_tools/lib/src/commands/validate_project.dart:28 — ValidateProject.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (8 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterProject._resolveWorkspacePattern (cognitive 24) · ×1
  • FlutterProject._resolveWorkspacePattern (cognitive 24) packages/flutter_tools/lib/src/project.dart:358 — FlutterProject._resolveWorkspacePattern has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextStyle.toString (cognitive 24) · ×1
  • TextStyle.toString (cognitive 24) engine/src/flutter/lib/ui/text.dart:1900 — TextStyle.toString has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 21, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SemanticsObject._updateRole (cognitive 24) · ×1
  • SemanticsObject._updateRole (cognitive 24) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:2419 — SemanticsObject._updateRole has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EngineSemanticsOwner.updateSemantics (cognitive 24) · ×1
  • EngineSemanticsOwner.updateSemantics (cognitive 24) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics.dart:3347 — EngineSemanticsOwner.updateSemantics has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SharedTextStyle._applyFontFeatures (cognitive 24) · ×1
  • SharedTextStyle._applyFontFeatures (cognitive 24) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:581 — SharedTextStyle._applyFontFeatures has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 3, match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlatformPlugin.setSystemChromeSystemUIOverlayStyle (cognitive 24) · ×1
  • PlatformPlugin.setSystemChromeSystemUIOverlayStyle (cognitive 24) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java:486 — PlatformPlugin.setSystemChromeSystemUIOverlayStyle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · list_dart_files.main (cognitive 24) · ×1
  • list_dart_files.main (cognitive 24) engine/src/flutter/web_sdk/list_dart_files.py:21 — list_dart_files.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 10). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · SnippetGenerator.parseInput (cognitive 23) · ×1
  • SnippetGenerator.parseInput (cognitive 23) dev/snippets/lib/src/snippet_generator.dart:95 — SnippetGenerator.parseInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterErrorDetails.exceptionAsString (cognitive 23) · ×1
  • FlutterErrorDetails.exceptionAsString (cognitive 23) packages/flutter/lib/src/foundation/assertions.dart:572 — FlutterErrorDetails.exceptionAsString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _RenderChip.performLayout (cognitive 23) · ×1
  • _RenderChip.performLayout (cognitive 23) packages/flutter/lib/src/material/chip.dart:1989 — _RenderChip.performLayout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 2 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _DayItemState.build (cognitive 23) · ×1
  • _DayItemState.build (cognitive 23) packages/flutter/lib/src/material/date_picker.dart:2849 — _DayItemState.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _DropdownMenuState._buildButtons (cognitive 23) · ×1
  • _DropdownMenuState._buildButtons (cognitive 23) packages/flutter/lib/src/material/dropdown_menu.dart:901 — _DropdownMenuState._buildButtons has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 5 (9 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FloatingActionButtonThemeData.== (cognitive 23) · ×1
  • FloatingActionButtonThemeData.== (cognitive 23) packages/flutter/lib/src/material/floating_action_button_theme.dart:278 — FloatingActionButtonThemeData.== has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 21, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RoundedRectSliderTrackShape.paint (cognitive 23) · ×1
  • RoundedRectSliderTrackShape.paint (cognitive 23) packages/flutter/lib/src/material/slider_parts.dart:428 — RoundedRectSliderTrackShape.paint has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 6 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderListWheelViewport.performLayout (cognitive 23) · ×1
  • RenderListWheelViewport.performLayout (cognitive 23) packages/flutter/lib/src/rendering/list_wheel_viewport.dart:652 — RenderListWheelViewport.performLayout has cognitive complexity 23 (threshold 15). Drivers by points: loops 9 (11 pts), if/else 6, boolean chains 4, ternaries 2 (nesting depth added 2). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _RenderObjectSemantics.markNeedsUpdate (cognitive 23) · ×1
  • _RenderObjectSemantics.markNeedsUpdate (cognitive 23) packages/flutter/lib/src/rendering/object.dart:6536 — _RenderObjectSemantics.markNeedsUpdate has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (11 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SemanticsConfiguration.isCompatibleWith (cognitive 23) · ×1
  • SemanticsConfiguration.isCompatibleWith (cognitive 23) packages/flutter/lib/src/semantics/semantics.dart:6993 — SemanticsConfiguration.isCompatibleWith has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _DismissibleState.build (cognitive 23) · ×1
  • _DismissibleState.build (cognitive 23) packages/flutter/lib/src/widgets/dismissible.dart:607 — _DismissibleState.build has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 7 (10 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeroController._maybeStartHeroTransition (cognitive 23) · ×1
  • HeroController._maybeStartHeroTransition (cognitive 23) packages/flutter/lib/src/widgets/heroes.dart:905 — HeroController._maybeStartHeroTransition has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate._adjustSelection (cognitive 23) · ×1
  • MultiSelectableSelectionContainerDelegate._adjustSelection (cognitive 23) packages/flutter/lib/src/widgets/selectable_region.dart:3340 — MultiSelectableSelectionContainerDelegate._adjustSelection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, match/switch 2 (3 pts), ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolDependencies.bootstrap (cognitive 23) · ×1
  • ToolDependencies.bootstrap (cognitive 23) packages/flutter_tools/lib/src/context/tool_dependencies.dart:167 — ToolDependencies.bootstrap has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, ternaries 7, if/else 1, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ExtensionManager._initialize (cognitive 23) · ×1
  • ExtensionManager._initialize (cognitive 23) packages/flutter_tools/lib/src/experimental/extension_manager.dart:93 — ExtensionManager._initialize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppResourceBundle.AppResourceBundle (cognitive 23) · ×1
  • AppResourceBundle.AppResourceBundle (cognitive 23) packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart:644 — AppResourceBundle.AppResourceBundle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _PreviewVisitor.visitAnnotation (cognitive 23) · ×1
  • _PreviewVisitor.visitAnnotation (cognitive 23) packages/flutter_tools/lib/src/widget_preview/dependency_graph.dart:90 — _PreviewVisitor.visitAnnotation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EngineTextStyle.== (cognitive 23) · ×1
  • EngineTextStyle.== (cognitive 23) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:513 — EngineTextStyle.== has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 21, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TextLayout.formatLines (cognitive 23) · ×1
  • TextLayout.formatLines (cognitive 23) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/layout.dart:557 — TextLayout.formatLines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterPlugin.apply (cognitive 23) · ×1
  • FlutterPlugin.apply (cognitive 23) packages/flutter_tools/gradle/src/main/kotlin/FlutterPlugin.kt:45 — FlutterPlugin.apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PhysicalKeyData._readHidEntries (cognitive 22) · ×1
  • PhysicalKeyData._readHidEntries (cognitive 22) dev/tools/gen_keycodes/lib/physical_key_data.dart:144 — PhysicalKeyData._readHidEntries has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 7, if/else 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeaderGuardCheck._findIncludedHeaderFiles (cognitive 22) · ×1
  • HeaderGuardCheck._findIncludedHeaderFiles (cognitive 22) engine/src/flutter/tools/header_guard_check/lib/header_guard_check.dart:84 — HeaderGuardCheck._findIncludedHeaderFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DebugViewMetricsOverride.toJson (cognitive 22) · ×1
  • DebugViewMetricsOverride.toJson (cognitive 22) packages/flutter/lib/src/foundation/debug.dart:644 — DebugViewMetricsOverride.toJson has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ScaffoldState.build (cognitive 22) · ×1
  • ScaffoldState.build (cognitive 22) packages/flutter/lib/src/material/scaffold.dart:3007 — ScaffoldState.build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, ternaries 5 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _SwitchPainter._paintThumbWith (cognitive 22) · ×1
  • _SwitchPainter._paintThumbWith (cognitive 22) packages/flutter/lib/src/material/switch.dart:1784 — _SwitchPainter._paintThumbWith has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsConfiguration.absorb (cognitive 22) · ×1
  • SemanticsConfiguration.absorb (cognitive 22) packages/flutter/lib/src/semantics/semantics.dart:7049 — SemanticsConfiguration.absorb has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EditableTextState.updateEditingValue (cognitive 22) · ×1
  • EditableTextState.updateEditingValue (cognitive 22) packages/flutter/lib/src/widgets/editable_text.dart:3704 — EditableTextState.updateEditingValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EditableTextState.buildTextSpan (cognitive 22) · ×1
  • EditableTextState.buildTextSpan (cognitive 22) packages/flutter/lib/src/widgets/editable_text.dart:6084 — EditableTextState.buildTextSpan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UpdateTextSelectionAction.invoke (cognitive 22) · ×1
  • _UpdateTextSelectionAction.invoke (cognitive 22) packages/flutter/lib/src/widgets/editable_text.dart:6707 — _UpdateTextSelectionAction.invoke has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (7 pts), if/else 4 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _NestedScrollCoordinator.createOuterBallisticScrollActivity (cognitive 22) · ×1
  • _NestedScrollCoordinator.createOuterBallisticScrollActivity (cognitive 22) packages/flutter/lib/src/widgets/nested_scroll_view.dart:739 — _NestedScrollCoordinator.createOuterBallisticScrollActivity has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate.getSelectionGeometry (cognitive 22) · ×1
  • MultiSelectableSelectionContainerDelegate.getSelectionGeometry (cognitive 22) packages/flutter/lib/src/widgets/selectable_region.dart:2648 — MultiSelectableSelectionContainerDelegate.getSelectionGeometry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (6 pts), boolean chains 5, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate._calculateLocalRange (cognitive 22) · ×1
  • MultiSelectableSelectionContainerDelegate._calculateLocalRange (cognitive 22) packages/flutter/lib/src/widgets/selectable_region.dart:2864 — MultiSelectableSelectionContainerDelegate._calculateLocalRange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextSelectionGestureDetectorBuilder.onDragSelectionStart (cognitive 22) · ×1
  • TextSelectionGestureDetectorBuilder.onDragSelectionStart (cognitive 22) packages/flutter/lib/src/widgets/text_selection.dart:3093 — TextSelectionGestureDetectorBuilder.onDragSelectionStart has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 5 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ManifestAssetBundle._parseAssets (cognitive 22) · ×1
  • ManifestAssetBundle._parseAssets (cognitive 22) packages/flutter_tools/lib/src/asset.dart:1035 — ManifestAssetBundle._parseAssets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildIOSArchiveCommand.runCommand (cognitive 22) · ×1
  • BuildIOSArchiveCommand.runCommand (cognitive 22) packages/flutter_tools/lib/src/commands/build_ios.dart:492 — BuildIOSArchiveCommand.runCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WidgetPreviewStartCommand.runPreviewEnvironment (cognitive 22) · ×1
  • WidgetPreviewStartCommand.runPreviewEnvironment (cognitive 22) packages/flutter_tools/lib/src/commands/widget_preview.dart:569 — WidgetPreviewStartCommand.runPreviewEnvironment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebAssetServer.start (cognitive 22) · ×1
  • WebAssetServer.start (cognitive 22) packages/flutter_tools/lib/src/isolated/web_asset_server.dart:193 — WebAssetServer.start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 pts), error handling 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResidentRunner.evictDirtyAssets (cognitive 22) · ×1
  • ResidentRunner.evictDirtyAssets (cognitive 22) packages/flutter_tools/lib/src/resident_runner.dart:1540 — ResidentRunner.evictDirtyAssets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Paint.toString (cognitive 22) · ×1
  • Paint.toString (cognitive 22) engine/src/flutter/lib/ui/painting.dart:1720 — Paint.toString has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (22 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CompileBundleStep.run (cognitive 22) · ×1
  • CompileBundleStep.run (cognitive 22) engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:83 — CompileBundleStep.run has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 5 (7 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WheelEventListenerMixin._isTrackpadEvent (cognitive 22) · ×1
  • _WheelEventListenerMixin._isTrackpadEvent (cognitive 22) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_binding.dart:721 — _WheelEventListenerMixin._isTrackpadEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 10 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebTextStyle.== (cognitive 22) · ×1
  • WebTextStyle.== (cognitive 22) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:297 — WebTextStyle.== has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 20, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KeyEmbedderResponder.handleEventImpl (cognitive 22) · ×1
  • KeyEmbedderResponder.handleEventImpl (cognitive 22) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/KeyEmbedderResponder.java:275 — KeyEmbedderResponder.handleEventImpl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3, match/switch 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseRoleConfigurator.configureTextField (cognitive 22) · ×1
  • BaseRoleConfigurator.configureTextField (cognitive 22) engine/src/flutter/shell/platform/android/io/flutter/view/BaseRoleConfigurator.java:158 — BaseRoleConfigurator.configureTextField has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CupertinoButtonState.build (cognitive 21) · ×1
  • _CupertinoButtonState.build (cognitive 21) packages/flutter/lib/src/cupertino/button.dart:459 — _CupertinoButtonState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 14, if/else 4, boolean chains 2, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _CupertinoTimerPickerState.build (cognitive 21) · ×1
  • _CupertinoTimerPickerState.build (cognitive 21) packages/flutter/lib/src/cupertino/date_picker.dart:2742 — _CupertinoTimerPickerState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterErrorDetails.debugFillProperties (cognitive 21) · ×1
  • FlutterErrorDetails.debugFillProperties (cognitive 21) packages/flutter/lib/src/foundation/assertions.dart:655 — FlutterErrorDetails.debugFillProperties has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, match/switch 1 (2 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CompressedNode.put (cognitive 21) · ×1
  • _CompressedNode.put (cognitive 21) packages/flutter/lib/src/foundation/persistent_hash_map.dart:149 — _CompressedNode.put has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (6 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _InkResponseState.updateHighlight (cognitive 21) · ×1
  • _InkResponseState.updateHighlight (cognitive 21) packages/flutter/lib/src/material/ink_well.dart:1004 — _InkResponseState.updateHighlight has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubmenuButtonState.build (cognitive 21) · ×1
  • _SubmenuButtonState.build (cognitive 21) packages/flutter/lib/src/material/menu_anchor.dart:2112 — _SubmenuButtonState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 3, boolean chains 2, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RefreshIndicatorState.build (cognitive 21) · ×1
  • RefreshIndicatorState.build (cognitive 21) packages/flutter/lib/src/material/refresh_indicator.dart:615 — RefreshIndicatorState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), match/switch 2 (5 pts), if/else 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SliderState._buildMaterialSlider (cognitive 21) · ×1
  • _SliderState._buildMaterialSlider (cognitive 21) packages/flutter/lib/src/material/slider.dart:831 — _SliderState._buildMaterialSlider has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (6 pts), match/switch 3, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _FlutterLogoPainter.paint (cognitive 21) · ×1
  • _FlutterLogoPainter.paint (cognitive 21) packages/flutter/lib/src/painting/flutter_logo.dart:330 — _FlutterLogoPainter.paint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderEditable.getWordAtOffset (cognitive 21) · ×1
  • RenderEditable.getWordAtOffset (cognitive 21) packages/flutter/lib/src/rendering/editable.dart:2198 — RenderEditable.getWordAtOffset has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderFlex._getIntrinsicSize (cognitive 21) · ×1
  • RenderFlex._getIntrinsicSize (cognitive 21) packages/flutter/lib/src/rendering/flex.dart:703 — RenderFlex._getIntrinsicSize has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (6 pts), loops 1 (2 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTransform.paint (cognitive 21) · ×1
  • RenderTransform.paint (cognitive 21) packages/flutter/lib/src/rendering/proxy_box.dart:2730 — RenderTransform.paint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TextInputConfiguration.== (cognitive 21) · ×1
  • TextInputConfiguration.== (cognitive 21) packages/flutter/lib/src/services/text_input.dart:843 — TextInputConfiguration.== has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 19, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppLifecycleListener.didChangeAppLifecycleState (cognitive 21) · ×1
  • AppLifecycleListener.didChangeAppLifecycleState (cognitive 21) packages/flutter/lib/src/widgets/app_lifecycle_listener.dart:213 — AppLifecycleListener.didChangeAppLifecycleState has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (9 pts), match/switch 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WidgetsBinding.initServiceExtensions (cognitive 21) · ×1
  • WidgetsBinding.initServiceExtensions (cognitive 21) packages/flutter/lib/src/widgets/binding.dart:695 — WidgetsBinding.initServiceExtensions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditableText.getEditableButtonItems (cognitive 21) · ×1
  • EditableText.getEditableButtonItems (cognitive 21) packages/flutter/lib/src/widgets/editable_text.dart:2181 — EditableText.getEditableButtonItems has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormState._validate (cognitive 21) · ×1
  • FormState._validate (cognitive 21) packages/flutter/lib/src/widgets/form.dart:384 — FormState._validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, error handling 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate._updateHandleLayersAndOwners (cognitive 21) · ×1
  • MultiSelectableSelectionContainerDelegate._updateHandleLayersAndOwners (cognitive 21) packages/flutter/lib/src/widgets/selectable_region.dart:2776 — MultiSelectableSelectionContainerDelegate._updateHandleLayersAndOwners has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTwoDimensionalViewport.computeChildPaintExtent (cognitive 21) · ×1
  • RenderTwoDimensionalViewport.computeChildPaintExtent (cognitive 21) packages/flutter/lib/src/widgets/two_dimensional_viewport.dart:1540 — RenderTwoDimensionalViewport.computeChildPaintExtent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BuildIOSFrameworkCommand._produceAppFramework (cognitive 21) · ×1
  • BuildIOSFrameworkCommand._produceAppFramework (cognitive 21) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:817 — BuildIOSFrameworkCommand._produceAppFramework has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (6 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DevicesCommandOutputWithExtendedWirelessDeviceDiscovery.findAndOutputAllTargetDevices (cognitive 21) · ×1
  • DevicesCommandOutputWithExtendedWirelessDeviceDiscovery.findAndOutputAllTargetDevices (cognitive 21) packages/flutter_tools/lib/src/commands/devices.dart:235 — DevicesCommandOutputWithExtendedWirelessDeviceDiscovery.findAndOutputAllTargetDevices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DriverTestImportValidator._validateFile (cognitive 21) · ×1
  • DriverTestImportValidator._validateFile (cognitive 21) packages/flutter_tools/lib/src/drive/import_validator.dart:75 — DriverTestImportValidator._validateFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtensionDeviceLogReader._startLogStream (cognitive 21) · ×1
  • ExtensionDeviceLogReader._startLogStream (cognitive 21) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:293 — ExtensionDeviceLogReader._startLogStream has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalizationsGenerator._generateCode (cognitive 21) · ×1
  • LocalizationsGenerator._generateCode (cognitive 21) packages/flutter_tools/lib/src/localizations/gen_l10n.dart:1120 — LocalizationsGenerator._generateCode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TerminalHandler._commonTerminalInputHandler (cognitive 21) · ×1
  • TerminalHandler._commonTerminalInputHandler (cognitive 21) packages/flutter_tools/lib/src/resident_runner.dart:1822 — TerminalHandler._commonTerminalInputHandler has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · IosProject._getAssociatedDomains (cognitive 21) · ×1
  • IosProject._getAssociatedDomains (cognitive 21) packages/flutter_tools/lib/src/xcode_project.dart:931 — IosProject._getAssociatedDomains has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 1 (5 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EnginePaint.toString (cognitive 21) · ×1
  • EnginePaint.toString (cognitive 21) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart:147 — EnginePaint.toString has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (21 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BaseRoleConfigurator.configureLabelAndValue (cognitive 21) · ×1
  • BaseRoleConfigurator.configureLabelAndValue (cognitive 21) engine/src/flutter/shell/platform/android/io/flutter/view/BaseRoleConfigurator.java:353 — BaseRoleConfigurator.configureLabelAndValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (4 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · malioc_diff.main (cognitive 21) · ×1
  • malioc_diff.main (cognitive 21) engine/src/flutter/impeller/tools/malioc_diff.py:297 — malioc_diff.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GpuContext.createTexture (cognitive 20) · ×1
  • GpuContext.createTexture (cognitive 20) engine/src/flutter/lib/gpu/lib/src/context.dart:186 — GpuContext.createTexture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CupertinoDatePicker._getColumnWidth (cognitive 20) · ×1
  • CupertinoDatePicker._getColumnWidth (cognitive 20) packages/flutter/lib/src/cupertino/date_picker.dart:546 — CupertinoDatePicker._getColumnWidth has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (13 pts), ternaries 1 (3 pts), if/else 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _CupertinoDatePickerMonthYearState.build (cognitive 20) · ×1
  • _CupertinoDatePickerMonthYearState.build (cognitive 20) packages/flutter/lib/src/cupertino/date_picker.dart:2023 — _CupertinoDatePickerMonthYearState.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 5 (9 pts), loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SwitchPainter._paintThumbWith (cognitive 20) · ×1
  • _SwitchPainter._paintThumbWith (cognitive 20) packages/flutter/lib/src/cupertino/switch.dart:1302 — _SwitchPainter._paintThumbWith has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseTapAndDragGestureRecognizer.didStopTrackingLastPointer (cognitive 20) · ×1
  • BaseTapAndDragGestureRecognizer.didStopTrackingLastPointer (cognitive 20) packages/flutter/lib/src/gestures/tap_and_drag.dart:1029 — BaseTapAndDragGestureRecognizer.didStopTrackingLastPointer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _LocalizedShortcutLabeler._getModifierLabel (cognitive 20) · ×1
  • _LocalizedShortcutLabeler._getModifierLabel (cognitive 20) packages/flutter/lib/src/material/menu_anchor.dart:2663 — _LocalizedShortcutLabeler._getModifierLabel has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, match/switch 4 (8 pts), if/else 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PaginatedDataTableState.build (cognitive 20) · ×1
  • PaginatedDataTableState.build (cognitive 20) packages/flutter/lib/src/material/paginated_data_table.dart:486 — PaginatedDataTableState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 8, boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _MaterialSwitchState.build (cognitive 20) · ×1
  • _MaterialSwitchState.build (cognitive 20) packages/flutter/lib/src/material/switch.dart:907 — _MaterialSwitchState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (15 pts), match/switch 2 (3 pts), boolean chains 1, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TimePickerDialogState.build (cognitive 20) · ×1
  • _TimePickerDialogState.build (cognitive 20) packages/flutter/lib/src/material/time_picker.dart:2584 — _TimePickerDialogState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 3, if/else 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TimePickerState.build (cognitive 20) · ×1
  • _TimePickerState.build (cognitive 20) packages/flutter/lib/src/material/time_picker.dart:2985 — _TimePickerState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (14 pts), match/switch 4 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextSpan.compareTo (cognitive 20) · ×1
  • TextSpan.compareTo (cognitive 20) packages/flutter/lib/src/painting/text_span.dart:480 — TextSpan.compareTo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderFlex._computeSizes (cognitive 20) · ×1
  • RenderFlex._computeSizes (cognitive 20) packages/flutter/lib/src/rendering/flex.dart:1197 — RenderFlex._computeSizes has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 pts), boolean chains 4, loops 2, match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModalBarrier.build (cognitive 20) · ×1
  • ModalBarrier.build (cognitive 20) packages/flutter/lib/src/widgets/modal_barrier.dart:203 — ModalBarrier.build has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 5, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _HistoryProperty.update (cognitive 20) · ×1
  • _HistoryProperty.update (cognitive 20) packages/flutter/lib/src/widgets/navigator.dart:6130 — _HistoryProperty.update has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SelectableRegionState._handleMouseTapUp (cognitive 20) · ×1
  • SelectableRegionState._handleMouseTapUp (cognitive 20) packages/flutter/lib/src/widgets/selectable_region.dart:942 — SelectableRegionState._handleMouseTapUp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceVisitor.visitPattern (cognitive 20) · ×1
  • SourceVisitor.visitPattern (cognitive 20) packages/flutter_tools/lib/src/build_system/source.dart:79 — SourceVisitor.visitPattern has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DebugIosLLDBInit.build (cognitive 20) · ×1
  • DebugIosLLDBInit.build (cognitive 20) packages/flutter_tools/lib/src/build_system/targets/ios.dart:530 — DebugIosLLDBInit.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebReleaseBundle.build (cognitive 20) · ×1
  • WebReleaseBundle.build (cognitive 20) packages/flutter_tools/lib/src/build_system/targets/web.dart:1201 — WebReleaseBundle.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plugin._parseLegacyYaml (cognitive 20) · ×1
  • Plugin._parseLegacyYaml (cognitive 20) packages/flutter_tools/lib/src/plugins.dart:278 — Plugin._parseLegacyYaml has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalEngineLocator.findEnginePath (cognitive 20) · ×1
  • LocalEngineLocator.findEnginePath (cognitive 20) packages/flutter_tools/lib/src/runner/local_engine.dart:67 — LocalEngineLocator.findEnginePath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreviewDetector.findPreviewFunctions (cognitive 20) · ×1
  • PreviewDetector.findPreviewFunctions (cognitive 20) packages/flutter_tools/lib/src/widget_preview/preview_detector.dart:288 — PreviewDetector.findPreviewFunctions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IosProject._targetsExcludingArm (cognitive 20) · ×1
  • IosProject._targetsExcludingArm (cognitive 20) packages/flutter_tools/lib/src/xcode_project.dart:664 — IosProject._targetsExcludingArm has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GalleryTransitionBuildTest.parseTaskResult (cognitive 20) · ×1
  • GalleryTransitionBuildTest.parseTaskResult (cognitive 20) dev/devicelab/lib/tasks/gallery.dart:308 — GalleryTransitionBuildTest.parseTaskResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StandardMessageCodec.writeValue (cognitive 20) · ×1
  • StandardMessageCodec.writeValue (cognitive 20) engine/src/flutter/lib/web_ui/lib/src/engine/services/message_codecs.dart:290 — StandardMessageCodec.writeValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WebParagraph._resolveSpans (cognitive 20) · ×1
  • WebParagraph._resolveSpans (cognitive 20) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:910 — WebParagraph._resolveSpans has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExamplesCrossImportChecker._getExampleFiles (cognitive 19) · ×1
  • ExamplesCrossImportChecker._getExampleFiles (cognitive 19) dev/bots/check_examples_cross_imports.dart:678 — ExamplesCrossImportChecker._getExampleFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Build.fromJson (cognitive 19) · ×1
  • Build.fromJson (cognitive 19) engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config.dart:172 — Build.fromJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 7. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DebugViewMetricsOverride._textScalingProblem (cognitive 19) · ×1
  • DebugViewMetricsOverride._textScalingProblem (cognitive 19) packages/flutter/lib/src/foundation/debug.dart:989 — DebugViewMetricsOverride._textScalingProblem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GestureBinding._handlePointerEventImmediately (cognitive 19) · ×1
  • GestureBinding._handlePointerEventImmediately (cognitive 19) packages/flutter/lib/src/gestures/binding.dart:407 — GestureBinding._handlePointerEventImmediately has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppBarThemeData.== (cognitive 19) · ×1
  • AppBarThemeData.== (cognitive 19) packages/flutter/lib/src/material/app_bar_theme.dart:565 — AppBarThemeData.== has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 17, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _ExpansionPanelListState.build (cognitive 19) · ×1
  • _ExpansionPanelListState.build (cognitive 19) packages/flutter/lib/src/material/expansion_panel.dart:374 — _ExpansionPanelListState.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IconButton.build (cognitive 19) · ×1
  • IconButton.build (cognitive 19) packages/flutter/lib/src/material/icon_button.dart:716 — IconButton.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TabBarThemeData.== (cognitive 19) · ×1
  • TabBarThemeData.== (cognitive 19) packages/flutter/lib/src/material/tab_bar_theme.dart:522 — TabBarThemeData.== has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 17, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MatrixUtils.matrixEquals (cognitive 19) · ×1
  • MatrixUtils.matrixEquals (cognitive 19) packages/flutter/lib/src/painting/matrix_utils.dart:136 — MatrixUtils.matrixEquals has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 16, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TextStyle.apply (cognitive 19) · ×1
  • TextStyle.apply (cognitive 19) packages/flutter/lib/src/painting/text_style.dart:942 — TextStyle.apply has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, ternaries 8, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BoxConstraints.lerp (cognitive 19) · ×1
  • BoxConstraints.lerp (cognitive 19) packages/flutter/lib/src/rendering/box.dart:476 — BoxConstraints.lerp has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, ternaries 4, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RenderEditable.calculateBoundedFloatingCursorOffset (cognitive 19) · ×1
  • RenderEditable.calculateBoundedFloatingCursorOffset (cognitive 19) packages/flutter/lib/src/rendering/editable.dart:2450 — RenderEditable.calculateBoundedFloatingCursorOffset has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RenderFlex._computeDryDistanceToHighestBaseline (cognitive 19) · ×1
  • RenderFlex._computeDryDistanceToHighestBaseline (cognitive 19) packages/flutter/lib/src/rendering/flex.dart:947 — RenderFlex._computeDryDistanceToHighestBaseline has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (6 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderObject._paintWithContext (cognitive 19) · ×1
  • RenderObject._paintWithContext (cognitive 19) packages/flutter/lib/src/rendering/object.dart:3491 — RenderObject._paintWithContext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderObject.toStringShort (cognitive 19) · ×1
  • RenderObject.toStringShort (cognitive 19) packages/flutter/lib/src/rendering/object.dart:3999 — RenderObject.toStringShort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RenderObjectSemantics._marksConflictsInMergeGroup (cognitive 19) · ×1
  • _RenderObjectSemantics._marksConflictsInMergeGroup (cognitive 19) packages/flutter/lib/src/rendering/object.dart:6609 — _RenderObjectSemantics._marksConflictsInMergeGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SelectableFragment._updateSelectionEdgeByMultiSelectableTextBoundary (cognitive 19) · ×1
  • _SelectableFragment._updateSelectionEdgeByMultiSelectableTextBoundary (cognitive 19) packages/flutter/lib/src/rendering/paragraph.dart:2895 — _SelectableFragment._updateSelectionEdgeByMultiSelectableTextBoundary has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 7, boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _SelectableFragment._getOriginParagraph (cognitive 19) · ×1
  • _SelectableFragment._getOriginParagraph (cognitive 19) packages/flutter/lib/src/rendering/paragraph.dart:3046 — _SelectableFragment._getOriginParagraph has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SemanticsSortGroup.sortedWithinKnot (cognitive 19) · ×1
  • _SemanticsSortGroup.sortedWithinKnot (cognitive 19) packages/flutter/lib/src/semantics/semantics.dart:4876 — _SemanticsSortGroup.sortedWithinKnot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServicesBinding._generateStateTransitions (cognitive 19) · ×1
  • ServicesBinding._generateStateTransitions (cognitive 19) packages/flutter/lib/src/services/binding.dart:313 — ServicesBinding._generateStateTransitions has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 7 (9 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · EditableTextState._updateSelectionRects (cognitive 19) · ×1
  • EditableTextState._updateSelectionRects (cognitive 19) packages/flutter/lib/src/widgets/editable_text.dart:5070 — EditableTextState._updateSelectionRects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 2 (3 pts), loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildOwner._debugVerifyGlobalKeyReservation (cognitive 19) · ×1
  • BuildOwner._debugVerifyGlobalKeyReservation (cognitive 19) packages/flutter/lib/src/widgets/framework.dart:3246 — BuildOwner._debugVerifyGlobalKeyReservation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrollDragController._adjustForScrollStartThreshold (cognitive 19) · ×1
  • ScrollDragController._adjustForScrollStartThreshold (cognitive 19) packages/flutter/lib/src/widgets/scroll_activity.dart:343 — ScrollDragController._adjustForScrollStartThreshold has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RangeMaintainingScrollPhysics.adjustPositionForNewDimensions (cognitive 19) · ×1
  • RangeMaintainingScrollPhysics.adjustPositionForNewDimensions (cognitive 19) packages/flutter/lib/src/widgets/scroll_physics.dart:646 — RangeMaintainingScrollPhysics.adjustPositionForNewDimensions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate._flushAdditions (cognitive 19) · ×1
  • MultiSelectableSelectionContainerDelegate._flushAdditions (cognitive 19) packages/flutter/lib/src/widgets/selectable_region.dart:2487 — MultiSelectableSelectionContainerDelegate._flushAdditions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 8, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection (cognitive 19) · ×1
  • MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection (cognitive 19) packages/flutter/lib/src/widgets/selectable_region.dart:3126 — MultiSelectableSelectionContainerDelegate.handleDirectionallyExtendSelection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTapRegionSurface.handleEvent (cognitive 19) · ×1
  • RenderTapRegionSurface.handleEvent (cognitive 19) packages/flutter/lib/src/widgets/tap_region.dart:342 — RenderTapRegionSurface.handleEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoadingUnit.parseGeneratedLoadingUnits (cognitive 19) · ×1
  • LoadingUnit.parseGeneratedLoadingUnits (cognitive 19) packages/flutter_tools/lib/src/base/deferred_component.dart:157 — LoadingUnit.parseGeneratedLoadingUnits has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildFrameworkCommand.copyVendoredFrameworks (cognitive 19) · ×1
  • BuildFrameworkCommand.copyVendoredFrameworks (cognitive 19) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:280 — BuildFrameworkCommand.copyVendoredFrameworks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigCommand.settingsText (cognitive 19) · ×1
  • ConfigCommand.settingsText (cognitive 19) packages/flutter_tools/lib/src/commands/config.dart:365 — ConfigCommand.settingsText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (9 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreateBase.generateApp (cognitive 19) · ×1
  • CreateBase.generateApp (cognitive 19) packages/flutter_tools/lib/src/commands/create_base.dart:500 — CreateBase.generateApp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · RunCommandBase.createDebuggingOptions (cognitive 19) · ×1
  • RunCommandBase.createDebuggingOptions (cognitive 19) packages/flutter_tools/lib/src/commands/run.dart:152 — RunCommandBase.createDebuggingOptions has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, ternaries 5, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WidgetPreviewStartCommand.runCommand (cognitive 19) · ×1
  • WidgetPreviewStartCommand.runCommand (cognitive 19) packages/flutter_tools/lib/src/commands/widget_preview.dart:329 — WidgetPreviewStartCommand.runCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · StdoutHandler.handler (cognitive 19) · ×1
  • StdoutHandler.handler (cognitive 19) packages/flutter_tools/lib/src/compile.dart:150 — StdoutHandler.handler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeviceManager.getDevicesById (cognitive 19) · ×1
  • DeviceManager.getDevicesById (cognitive 19) packages/flutter_tools/lib/src/device.dart:84 — DeviceManager.getDevicesById has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterValidator.validateImpl (cognitive 19) · ×1
  • FlutterValidator.validateImpl (cognitive 19) packages/flutter_tools/lib/src/doctor.dart:505 — FlutterValidator.validateImpl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpHostValidator.validateImpl (cognitive 19) · ×1
  • HttpHostValidator.validateImpl (cognitive 19) packages/flutter_tools/lib/src/http_host_validator.dart:83 — HttpHostValidator.validateImpl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HotRunner._attach (cognitive 19) · ×1
  • HotRunner._attach (cognitive 19) packages/flutter_tools/lib/src/run_hot.dart:256 — HotRunner._attach has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HotRunner._reloadSources (cognitive 19) · ×1
  • HotRunner._reloadSources (cognitive 19) packages/flutter_tools/lib/src/run_hot.dart:955 — HotRunner._reloadSources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RawKeyboard.handleHtmlEvent (cognitive 19) · ×1
  • RawKeyboard.handleHtmlEvent (cognitive 19) engine/src/flutter/lib/web_ui/lib/src/engine/raw_keyboard.dart:87 — RawKeyboard.handleHtmlEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ImageReaderSurfaceProducer.dequeueImage (cognitive 19) · ×1
  • ImageReaderSurfaceProducer.dequeueImage (cognitive 19) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java:686 — ImageReaderSurfaceProducer.dequeueImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidTouchProcessor.onTouchEvent (cognitive 19) · ×1
  • AndroidTouchProcessor.onTouchEvent (cognitive 19) engine/src/flutter/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java:161 — AndroidTouchProcessor.onTouchEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode.updateWith (cognitive 19) · ×1
  • SemanticsNode.updateWith (cognitive 19) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:2470 — SemanticsNode.updateWith has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · xcode_debug.waitForConfigurationBuildDirToUpdate (cognitive 19) · ×1
  • xcode_debug.waitForConfigurationBuildDirToUpdate (cognitive 19) packages/flutter_tools/bin/xcode_debug.js:587 — xcode_debug.waitForConfigurationBuildDirToUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExamplesCrossImportChecker.check (cognitive 18) · ×1
  • ExamplesCrossImportChecker.check (cognitive 18) dev/bots/check_examples_cross_imports.dart:896 — ExamplesCrossImportChecker.check has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (7 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClangTidy._runJobs (cognitive 18) · ×1
  • ClangTidy._runJobs (cognitive 18) engine/src/flutter/tools/clang_tidy/lib/clang_tidy.dart:384 — ClangTidy._runJobs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CupertinoDatePickerDateState.build (cognitive 18) · ×1
  • _CupertinoDatePickerDateState.build (cognitive 18) packages/flutter/lib/src/cupertino/date_picker.dart:1667 — _CupertinoDatePickerDateState.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (7 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SegmentedControlState.build (cognitive 18) · ×1
  • _SegmentedControlState.build (cognitive 18) REDACTED:848 — _SegmentedControlState.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (3 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SwitchPainter.paint (cognitive 18) · ×1
  • _SwitchPainter.paint (cognitive 18) packages/flutter/lib/src/cupertino/switch.dart:1101 — _SwitchPainter.paint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7, match/switch 3 (5 pts), ternaries 4, boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DiagnosticsProperty.toJsonMap (cognitive 18) · ×1
  • DiagnosticsProperty.toJsonMap (cognitive 18) packages/flutter/lib/src/foundation/diagnostics.dart:2636 — DiagnosticsProperty.toJsonMap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BaseTapAndDragGestureRecognizer.handleEvent (cognitive 18) · ×1
  • BaseTapAndDragGestureRecognizer.handleEvent (cognitive 18) packages/flutter/lib/src/gestures/tap_and_drag.dart:1074 — BaseTapAndDragGestureRecognizer.handleEvent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SliverAppBarDelegate.build (cognitive 18) · ×1
  • _SliverAppBarDelegate.build (cognitive 18) packages/flutter/lib/src/material/app_bar.dart:1358 — _SliverAppBarDelegate.build has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (6 pts), match/switch 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _RawChipState.didUpdateWidget (cognitive 18) · ×1
  • _RawChipState.didUpdateWidget (cognitive 18) packages/flutter/lib/src/material/chip.dart:1216 — _RawChipState.didUpdateWidget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MonthItemState.build (cognitive 18) · ×1
  • _MonthItemState.build (cognitive 18) packages/flutter/lib/src/material/date_picker.dart:2688 — _MonthItemState.build has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (5 pts), loops 2, ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _MenuItemLabel.build (cognitive 18) · ×1
  • _MenuItemLabel.build (cognitive 18) packages/flutter/lib/src/material/menu_anchor.dart:3256 — _MenuItemLabel.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProgressIndicatorThemeData.== (cognitive 18) · ×1
  • ProgressIndicatorThemeData.== (cognitive 18) packages/flutter/lib/src/material/progress_indicator_theme.dart:250 — ProgressIndicatorThemeData.== has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 16, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ScaffoldState._buildBottomSheet (cognitive 18) · ×1
  • ScaffoldState._buildBottomSheet (cognitive 18) packages/flutter/lib/src/material/scaffold.dart:2451 — ScaffoldState._buildBottomSheet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _RenderSlider._startInteraction (cognitive 18) · ×1
  • _RenderSlider._startInteraction (cognitive 18) packages/flutter/lib/src/material/slider.dart:1580 — _RenderSlider._startInteraction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ToggleButtons.build (cognitive 18) · ×1
  • ToggleButtons.build (cognitive 18) packages/flutter/lib/src/material/toggle_buttons.dart:699 — ToggleButtons.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 5, match/switch 2 (3 pts), ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _CompoundBorder.lerp (cognitive 18) · ×1
  • _CompoundBorder.lerp (cognitive 18) packages/flutter/lib/src/painting/borders.dart:801 — _CompoundBorder.lerp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 4 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BoxBorder.lerp (cognitive 18) · ×1
  • BoxBorder.lerp (cognitive 18) packages/flutter/lib/src/painting/box_border.dart:138 — BoxBorder.lerp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixUtils.transformRect (cognitive 18) · ×1
  • MatrixUtils.transformRect (cognitive 18) packages/flutter/lib/src/painting/matrix_utils.dart:267 — MatrixUtils.transformRect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ShapeDecorationPainter._precache (cognitive 18) · ×1
  • _ShapeDecorationPainter._precache (cognitive 18) packages/flutter/lib/src/painting/shape_decoration.dart:326 — _ShapeDecorationPainter._precache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RenderParagraph.paint (cognitive 18) · ×1
  • RenderParagraph.paint (cognitive 18) packages/flutter/lib/src/rendering/paragraph.dart:1045 — RenderParagraph.paint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode.debugFillProperties (cognitive 18) · ×1
  • SemanticsNode.debugFillProperties (cognitive 18) packages/flutter/lib/src/semantics/semantics.dart:4545 — SemanticsNode.debugFillProperties has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4 (5 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _RenderSliverFloatingHeader.isScrollingUpdate (cognitive 18) · ×1
  • _RenderSliverFloatingHeader.isScrollingUpdate (cognitive 18) packages/flutter/lib/src/widgets/sliver_floating_header.dart:208 — _RenderSliverFloatingHeader.isScrollingUpdate has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 4 (7 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WidgetInspectorService.initServiceExtensions (cognitive 18) · ×1
  • WidgetInspectorService.initServiceExtensions (cognitive 18) packages/flutter/lib/src/widgets/widget_inspector.dart:1057 — WidgetInspectorService.initServiceExtensions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Cache.updateAll (cognitive 18) · ×1
  • Cache.updateAll (cognitive 18) packages/flutter_tools/lib/src/cache.dart:809 — Cache.updateAll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildMacOSFrameworkCommand.runCommand (cognitive 18) · ×1
  • BuildMacOSFrameworkCommand.runCommand (cognitive 18) packages/flutter_tools/lib/src/commands/build_macos_framework.dart:74 — BuildMacOSFrameworkCommand.runCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreateBase.projectName (cognitive 18) · ×1
  • CreateBase.projectName (cognitive 18) packages/flutter_tools/lib/src/commands/create_base.dart:293 — CreateBase.projectName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 1 (3 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RunCommand.validateCommand (cognitive 18) · ×1
  • RunCommand.validateCommand (cognitive 18) packages/flutter_tools/lib/src/commands/run.dart:582 — RunCommand.validateCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SwiftPackageManagerIntegrationMigration._migrateScheme (cognitive 18) · ×1
  • SwiftPackageManagerIntegrationMigration._migrateScheme (cognitive 18) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:350 — SwiftPackageManagerIntegrationMigration._migrateScheme has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Plugin._parseMultiPlatformYaml (cognitive 18) · ×1
  • Plugin._parseMultiPlatformYaml (cognitive 18) packages/flutter_tools/lib/src/plugins.dart:153 — Plugin._parseMultiPlatformYaml has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ColdRunner.run (cognitive 18) · ×1
  • ColdRunner.run (cognitive 18) packages/flutter_tools/lib/src/run_cold.dart:48 — ColdRunner.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunSuiteStep._createSkiaClient (cognitive 18) · ×1
  • RunSuiteStep._createSkiaClient (cognitive 18) engine/src/flutter/lib/web_ui/dev/steps/run_suite_step.dart:195 — RunSuiteStep._createSkiaClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileSemanticsEnabler.tryEnableSemantics (cognitive 18) · ×1
  • MobileSemanticsEnabler.tryEnableSemantics (cognitive 18) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/semantics_helper.dart:397 — MobileSemanticsEnabler.tryEnableSemantics has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PlayStoreDeferredComponentManager.loadDartLibrary (cognitive 18) · ×1
  • PlayStoreDeferredComponentManager.loadDartLibrary (cognitive 18) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java:401 — PlayStoreDeferredComponentManager.loadDartLibrary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlatformPlugin.getClipboardData (cognitive 18) · ×1
  • PlatformPlugin.getClipboardData (cognitive 18) engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java:627 — PlatformPlugin.getClipboardData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build_fuchsia_artifacts.main (cognitive 18) · ×1
  • build_fuchsia_artifacts.main (cognitive 18) engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py:287 — build_fuchsia_artifacts.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CherryPickHelper.pollForPr (cognitive 17) · ×1
  • CherryPickHelper.pollForPr (cognitive 17) .agents/skills/flutter-cherry-pick/scripts/flutter_cp.dart:219 — CherryPickHelper.pollForPr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Chrome.launch (cognitive 17) · ×1
  • Chrome.launch (cognitive 17) dev/devicelab/lib/framework/browser.dart:91 — Chrome.launch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReleaseVersion.parse (cognitive 17) · ×1
  • ReleaseVersion.parse (cognitive 17) engine/src/flutter/testing/skia_gold_client/lib/src/release_version.dart:35 — ReleaseVersion.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CupertinoListTileState.build (cognitive 17) · ×1
  • _CupertinoListTileState.build (cognitive 17) packages/flutter/lib/src/cupertino/list_tile.dart:274 — _CupertinoListTileState.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (4 pts), match/switch 3, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _RenderSegmentedControl.paint (cognitive 17) · ×1
  • _RenderSegmentedControl.paint (cognitive 17) REDACTED:1385 — _RenderSegmentedControl.paint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DragGestureRecognizer._getMaxSumDeltaPointer (cognitive 17) · ×1
  • DragGestureRecognizer._getMaxSumDeltaPointer (cognitive 17) packages/flutter/lib/src/gestures/monodrag.dart:512 — DragGestureRecognizer._getMaxSumDeltaPointer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TapGestureRecognizer.isPointerAllowed (cognitive 17) · ×1
  • TapGestureRecognizer.isPointerAllowed (cognitive 17) packages/flutter/lib/src/gestures/tap.dart:691 — TapGestureRecognizer.isPointerAllowed has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), match/switch 1 (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _CheckboxDefaultsM3.overlayColor (cognitive 17) · ×1
  • _CheckboxDefaultsM3.overlayColor (cognitive 17) packages/flutter/lib/src/material/checkbox.dart:997 — _CheckboxDefaultsM3.overlayColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DataTableThemeData.== (cognitive 17) · ×1
  • DataTableThemeData.== (cognitive 17) packages/flutter/lib/src/material/data_table_theme.dart:232 — DataTableThemeData.== has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _DatePickerHeader.build (cognitive 17) · ×1
  • _DatePickerHeader.build (cognitive 17) packages/flutter/lib/src/material/date_picker.dart:924 — _DatePickerHeader.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FilledIconButtonDefaultsM3.overlayColor (cognitive 17) · ×1
  • _FilledIconButtonDefaultsM3.overlayColor (cognitive 17) packages/flutter/lib/src/material/icon_button.dart:1216 — _FilledIconButtonDefaultsM3.overlayColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_FilledTonalIconButtonDefaultsM3.overlayColor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _FilledTonalIconButtonDefaultsM3.overlayColor (cognitive 17) · ×1
  • _FilledTonalIconButtonDefaultsM3.overlayColor (cognitive 17) packages/flutter/lib/src/material/icon_button.dart:1358 — _FilledTonalIconButtonDefaultsM3.overlayColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_FilledIconButtonDefaultsM3.overlayColor) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _InkResponseState.build (cognitive 17) · ×1
  • _InkResponseState.build (cognitive 17) packages/flutter/lib/src/material/ink_well.dart:1337 — _InkResponseState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13, boolean chains 2, loops 1, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SnackBarThemeData.== (cognitive 17) · ×1
  • SnackBarThemeData.== (cognitive 17) packages/flutter/lib/src/material/snack_bar_theme.dart:280 — SnackBarThemeData.== has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _TabBarState.didUpdateWidget (cognitive 17) · ×1
  • _TabBarState.didUpdateWidget (cognitive 17) packages/flutter/lib/src/material/tabs.dart:1745 — _TabBarState.didUpdateWidget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextTheme.== (cognitive 17) · ×1
  • TextTheme.== (cognitive 17) packages/flutter/lib/src/material/text_theme.dart:715 — TextTheme.== has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ToggleButtonsThemeData.== (cognitive 17) · ×1
  • ToggleButtonsThemeData.== (cognitive 17) packages/flutter/lib/src/material/toggle_buttons_theme.dart:201 — ToggleButtonsThemeData.== has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TooltipThemeData.== (cognitive 17) · ×1
  • TooltipThemeData.== (cognitive 17) packages/flutter/lib/src/material/tooltip_theme.dart:224 — TooltipThemeData.== has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BorderDirectional.add (cognitive 17) · ×1
  • BorderDirectional.add (cognitive 17) packages/flutter/lib/src/painting/box_border.dart:907 — BorderDirectional.add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderParagraph.describeSemanticsConfiguration (cognitive 17) · ×1
  • RenderParagraph.describeSemanticsConfiguration (cognitive 17) packages/flutter/lib/src/rendering/paragraph.dart:1233 — RenderParagraph.describeSemanticsConfiguration has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _DebugSemanticsRoleChecks._semanticsSlider (cognitive 17) · ×1
  • _DebugSemanticsRoleChecks._semanticsSlider (cognitive 17) packages/flutter/lib/src/semantics/semantics.dart:269 — _DebugSemanticsRoleChecks._semanticsSlider has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticsNode._childrenInTraversalOrder (cognitive 17) · ×1
  • SemanticsNode._childrenInTraversalOrder (cognitive 17) packages/flutter/lib/src/semantics/semantics.dart:4447 — SemanticsNode._childrenInTraversalOrder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditableTextState._formatAndSetValue (cognitive 17) · ×1
  • EditableTextState._formatAndSetValue (cognitive 17) packages/flutter/lib/src/widgets/editable_text.dart:4754 — EditableTextState._formatAndSetValue has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (6 pts), error handling 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditableTextState.build (cognitive 17) · ×1
  • EditableTextState.build (cognitive 17) packages/flutter/lib/src/widgets/editable_text.dart:5877 — EditableTextState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7, if/else 4 (5 pts), match/switch 3, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _FocusState.didUpdateWidget (cognitive 17) · ×1
  • _FocusState.didUpdateWidget (cognitive 17) packages/flutter/lib/src/widgets/focus_scope.dart:641 — _FocusState.didUpdateWidget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeroController._startHeroTransition (cognitive 17) · ×1
  • HeroController._startHeroTransition (cognitive 17) packages/flutter/lib/src/widgets/heroes.dart:973 — HeroController._startHeroTransition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (4 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RawScrollbarState._debugCheckHasValidScrollPosition (cognitive 17) · ×1
  • RawScrollbarState._debugCheckHasValidScrollPosition (cognitive 17) packages/flutter/lib/src/widgets/scrollbar.dart:1535 — RawScrollbarState._debugCheckHasValidScrollPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2, boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SliverMultiBoxAdaptorElement.childCount (cognitive 17) · ×1
  • SliverMultiBoxAdaptorElement.childCount (cognitive 17) packages/flutter/lib/src/widgets/sliver.dart:1180 — SliverMultiBoxAdaptorElement.childCount has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Net._attempt (cognitive 17) · ×1
  • Net._attempt (cognitive 17) packages/flutter_tools/lib/src/base/net.dart:85 — Net._attempt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 5, boolean chains 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MacOSUtils.defaultHostPlatform (cognitive 17) · ×1
  • _MacOSUtils.defaultHostPlatform (cognitive 17) packages/flutter_tools/lib/src/base/os.dart:399 — _MacOSUtils.defaultHostPlatform has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DefaultProcessUtils.runSync (cognitive 17) · ×1
  • _DefaultProcessUtils.runSync (cognitive 17) packages/flutter_tools/lib/src/base/process.dart:477 — _DefaultProcessUtils.runSync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IconTreeShaker._getIconData (cognitive 17) · ×1
  • IconTreeShaker._getIconData (cognitive 17) packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart:101 — IconTreeShaker._getIconData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (6 pts), loops 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildIOSFrameworkCommand._producePlugins (cognitive 17) · ×1
  • BuildIOSFrameworkCommand._producePlugins (cognitive 17) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:907 — BuildIOSFrameworkCommand._producePlugins has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppFrameworkAndNativeAssetsDependencies._createXCFrameworksForNativeAssets (cognitive 17) · ×1
  • AppFrameworkAndNativeAssetsDependencies._createXCFrameworksForNativeAssets (cognitive 17) packages/flutter_tools/lib/src/commands/build_swift_package.dart:1296 — AppFrameworkAndNativeAssetsDependencies._createXCFrameworksForNativeAssets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CleanCommand._cleanXcode (cognitive 17) · ×1
  • CleanCommand._cleanXcode (cognitive 17) packages/flutter_tools/lib/src/commands/clean.dart:136 — CleanCommand._cleanXcode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomDevicesAddCommand._checkConfigWithLogging (cognitive 17) · ×1
  • CustomDevicesAddCommand._checkConfigWithLogging (cognitive 17) packages/flutter_tools/lib/src/commands/custom_devices.dart:263 — CustomDevicesAddCommand._checkConfigWithLogging has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrecacheCommand.runCommand (cognitive 17) · ×1
  • PrecacheCommand.runCommand (cognitive 17) packages/flutter_tools/lib/src/commands/precache.dart:162 — PrecacheCommand.runCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UpgradeCommandRunner.hasUncommittedChanges (cognitive 17) · ×1
  • UpgradeCommandRunner.hasUncommittedChanges (cognitive 17) packages/flutter_tools/lib/src/commands/upgrade.dart:341 — UpgradeCommandRunner.hasUncommittedChanges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopDevice.startApp (cognitive 17) · ×1
  • DesktopDevice.startApp (cognitive 17) packages/flutter_tools/lib/src/desktop_device.dart:93 — DesktopDevice.startApp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtensionBackedDevice.startApp (cognitive 17) · ×1
  • ExtensionBackedDevice.startApp (cognitive 17) packages/flutter_tools/lib/src/experimental/extension_device_manager.dart:621 — ExtensionBackedDevice.startApp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 5 (6 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WebDevFS.update (cognitive 17) · ×1
  • WebDevFS.update (cognitive 17) packages/flutter_tools/lib/src/isolated/devfs_web.dart:273 — WebDevFS.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 3 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AndroidProject.computeEmbeddingVersion (cognitive 17) · ×1
  • AndroidProject.computeEmbeddingVersion (cognitive 17) packages/flutter_tools/lib/src/project.dart:1430 — AndroidProject.computeEmbeddingVersion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubTemplateCreator._writePlugins (cognitive 17) · ×1
  • GitHubTemplateCreator._writePlugins (cognitive 17) packages/flutter_tools/lib/src/reporting/github_template.dart:178 — GitHubTemplateCreator._writePlugins has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResidentRunner.printStructuredErrorLog (cognitive 17) · ×1
  • ResidentRunner.printStructuredErrorLog (cognitive 17) packages/flutter_tools/lib/src/resident_runner.dart:1262 — ResidentRunner.printStructuredErrorLog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterVersion.FlutterVersion (cognitive 17) · ×1
  • FlutterVersion.FlutterVersion (cognitive 17) packages/flutter_tools/lib/src/version.dart:72 — FlutterVersion.FlutterVersion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FragmentProgram._getUniformFloatInfo (cognitive 17) · ×1
  • FragmentProgram._getUniformFloatInfo (cognitive 17) engine/src/flutter/lib/ui/painting.dart:5553 — FragmentProgram._getUniformFloatInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlatformViewEmbedder._applyMutators (cognitive 17) · ×1
  • PlatformViewEmbedder._applyMutators (cognitive 17) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:188 — PlatformViewEmbedder._applyMutators has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlatformViewEmbedder._getIndexMapFromPreviousComposition (cognitive 17) · ×1
  • PlatformViewEmbedder._getIndexMapFromPreviousComposition (cognitive 17) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:611 — PlatformViewEmbedder._getIndexMapFromPreviousComposition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Renderer.createImageFromTextureSource (cognitive 17) · ×1
  • Renderer.createImageFromTextureSource (cognitive 17) engine/src/flutter/lib/web_ui/lib/src/engine/renderer.dart:203 — Renderer.createImageFromTextureSource has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TypedDataBuffer.insertAll (cognitive 17) · ×1
  • _TypedDataBuffer.insertAll (cognitive 17) engine/src/flutter/lib/web_ui/lib/src/engine/services/buffers.dart:98 — _TypedDataBuffer.insertAll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebParagraphPainter._paintAllBlocks (cognitive 17) · ×1
  • WebParagraphPainter._paintAllBlocks (cognitive 17) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/painter.dart:207 — WebParagraphPainter._paintAllBlocks has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 1 (3 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterPluginUtils.forceNdkDownload (cognitive 17) · ×1
  • FlutterPluginUtils.forceNdkDownload (cognitive 17) packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt:799 — FlutterPluginUtils.forceNdkDownload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 1.create (cognitive 17) · ×1
  • 1.create (cognitive 17) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java:86 — 1.create has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 1.onMethodCall (cognitive 17) · ×1
  • 1.onMethodCall (cognitive 17) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java:59 — 1.onMethodCall has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 2 (3 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JSONUtil.wrap (cognitive 17) · ×1
  • JSONUtil.wrap (cognitive 17) engine/src/flutter/shell/platform/android/io/flutter/plugin/common/JSONUtil.java:67 — JSONUtil.wrap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, loops 3 (6 pts), boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · InputConnectionAdaptor.handleKeyEvent (cognitive 17) · ×1
  • InputConnectionAdaptor.handleKeyEvent (cognitive 17) engine/src/flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java:304 — InputConnectionAdaptor.handleKeyEvent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccessibilityBridge.performCursorMoveAction (cognitive 17) · ×1
  • AccessibilityBridge.performCursorMoveAction (cognitive 17) engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java:1161 — AccessibilityBridge.performCursorMoveAction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProgressBarRoleConfigurator.configureRole (cognitive 17) · ×1
  • ProgressBarRoleConfigurator.configureRole (cognitive 17) engine/src/flutter/shell/platform/android/io/flutter/view/ProgressBarRoleConfigurator.java:17 — ProgressBarRoleConfigurator.configureRole has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pub_get_offline.find_unlisted_packages (cognitive 17) · ×1
  • pub_get_offline.find_unlisted_packages (cognitive 17) engine/src/flutter/tools/pub_get_offline.py:111 — pub_get_offline.find_unlisted_packages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SampleChecker.checkCodeSamples (cognitive 16) · ×1
  • SampleChecker.checkCodeSamples (cognitive 16) dev/bots/check_code_samples.dart:141 — SampleChecker.checkCodeSamples has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 5, boolean chains 3 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ExamplesCrossImportChecker._getExamplesSlashApiExamples (cognitive 16) · ×1
  • ExamplesCrossImportChecker._getExamplesSlashApiExamples (cognitive 16) dev/bots/check_examples_cross_imports.dart:844 — ExamplesCrossImportChecker._getExamplesSlashApiExamples has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlinkTraceSummary.fromJson (cognitive 16) · ×1
  • BlinkTraceSummary.fromJson (cognitive 16) dev/devicelab/lib/framework/browser.dart:390 — BlinkTraceSummary.fromJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnimationController._animateToInternal (cognitive 16) · ×1
  • AnimationController._animateToInternal (cognitive 16) packages/flutter/lib/src/animation/animation_controller.dart:642 — AnimationController._animateToInternal has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CupertinoSliverNavigationBarState._handleScrollChange (cognitive 16) · ×1
  • _CupertinoSliverNavigationBarState._handleScrollChange (cognitive 16) packages/flutter/lib/src/cupertino/nav_bar.dart:1281 — _CupertinoSliverNavigationBarState._handleScrollChange has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 3 (5 pts), if/else 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _LargeTitleNavigationBarSliverDelegate.build (cognitive 16) · ×1
  • _LargeTitleNavigationBarSliverDelegate.build (cognitive 16) packages/flutter/lib/src/cupertino/nav_bar.dart:1477 — _LargeTitleNavigationBarSliverDelegate.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _LargeTitleNavigationBarSliverDelegate.shouldRebuild (cognitive 16) · ×1
  • _LargeTitleNavigationBarSliverDelegate.shouldRebuild (cognitive 16) packages/flutter/lib/src/cupertino/nav_bar.dart:1617 — _LargeTitleNavigationBarSliverDelegate.shouldRebuild has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LongPressGestureRecognizer.handlePrimaryPointer (cognitive 16) · ×1
  • LongPressGestureRecognizer.handlePrimaryPointer (cognitive 16) packages/flutter/lib/src/gestures/long_press.dart:649 — LongPressGestureRecognizer.handlePrimaryPointer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BottomNavigationBarThemeData.== (cognitive 16) · ×1
  • BottomNavigationBarThemeData.== (cognitive 16) packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:217 — BottomNavigationBarThemeData.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _RawChipState.build (cognitive 16) · ×1
  • _RawChipState.build (cognitive 16) packages/flutter/lib/src/material/chip.dart:1326 — _RawChipState.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 13, boolean chains 2, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DialogThemeData.== (cognitive 16) · ×1
  • DialogThemeData.== (cognitive 16) packages/flutter/lib/src/material/dialog_theme.dart:479 — DialogThemeData.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · InkFeature._getPaintTransform (cognitive 16) · ×1
  • InkFeature._getPaintTransform (cognitive 16) packages/flutter/lib/src/material/material.dart:719 — InkFeature._getPaintTransform has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3, boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CircularProgressIndicatorPainter.paint (cognitive 16) · ×1
  • _CircularProgressIndicatorPainter.paint (cognitive 16) packages/flutter/lib/src/material/progress_indicator.dart:710 — _CircularProgressIndicatorPainter.paint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TimePickerInputState._parseHour (cognitive 16) · ×1
  • _TimePickerInputState._parseHour (cognitive 16) packages/flutter/lib/src/material/time_picker.dart:1774 — _TimePickerInputState._parseHour has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageConfiguration.toString (cognitive 16) · ×1
  • ImageConfiguration.toString (cognitive 16) packages/flutter/lib/src/painting/image_provider.dart:127 — ImageConfiguration.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderBox.size (cognitive 16) · ×1
  • RenderBox.size (cognitive 16) packages/flutter/lib/src/rendering/box.dart:2245 — RenderBox.size has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 7, if/else 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderTable.paint (cognitive 16) · ×1
  • RenderTable.paint (cognitive 16) packages/flutter/lib/src/rendering/table.dart:1468 — RenderTable.paint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderShrinkWrappingViewport.performLayout (cognitive 16) · ×1
  • RenderShrinkWrappingViewport.performLayout (cognitive 16) packages/flutter/lib/src/rendering/viewport.dart:2082 — RenderShrinkWrappingViewport.performLayout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderWrap._debugHasNecessaryDirections (cognitive 16) · ×1
  • RenderWrap._debugHasNecessaryDirections (cognitive 16) packages/flutter/lib/src/rendering/wrap.dart:447 — RenderWrap._debugHasNecessaryDirections has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (8 pts), boolean chains 4, if/else 4 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _DebugSemanticsRoleChecks._semanticsProgressBar (cognitive 16) · ×1
  • _DebugSemanticsRoleChecks._semanticsProgressBar (cognitive 16) packages/flutter/lib/src/semantics/semantics.dart:217 — _DebugSemanticsRoleChecks._semanticsProgressBar has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _WidgetsAppState._updateRouting (cognitive 16) · ×1
  • _WidgetsAppState._updateRouting (cognitive 16) packages/flutter/lib/src/widgets/app.dart:1505 — _WidgetsAppState._updateRouting has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DraggableScrollableSheetScrollPosition.goBallistic (cognitive 16) · ×1
  • _DraggableScrollableSheetScrollPosition.goBallistic (cognitive 16) packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart:940 — _DraggableScrollableSheetScrollPosition.goBallistic has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DevelopmentShaderCompiler.recompileShader (cognitive 16) · ×1
  • DevelopmentShaderCompiler.recompileShader (cognitive 16) packages/flutter_tools/lib/src/build_system/tools/shader_compiler.dart:60 — DevelopmentShaderCompiler.recompileShader has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BuildIOSArchiveCommand._parseImageAssetContentsJson (cognitive 16) · ×1
  • BuildIOSArchiveCommand._parseImageAssetContentsJson (cognitive 16) packages/flutter_tools/lib/src/commands/build_ios.dart:207 — BuildIOSArchiveCommand._parseImageAssetContentsJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CocoaPodPluginDependencies.generateArtifacts (cognitive 16) · ×1
  • CocoaPodPluginDependencies.generateArtifacts (cognitive 16) packages/flutter_tools/lib/src/commands/build_swift_package.dart:1469 — CocoaPodPluginDependencies.generateArtifacts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CreateCommand.buildDynamicArgParser (cognitive 16) · ×1
  • CreateCommand.buildDynamicArgParser (cognitive 16) packages/flutter_tools/lib/src/commands/create.dart:215 — CreateCommand.buildDynamicArgParser has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterDebugAdapter.handleStdout (cognitive 16) · ×1
  • FlutterDebugAdapter.handleStdout (cognitive 16) packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart:620 — FlutterDebugAdapter.handleStdout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FlutterManifest.copyWith (cognitive 16) · ×1
  • FlutterManifest.copyWith (cognitive 16) packages/flutter_tools/lib/src/flutter_manifest.dart:76 — FlutterManifest.copyWith has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, loops 3 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MigrateConfig.parseYaml (cognitive 16) · ×1
  • MigrateConfig.parseYaml (cognitive 16) packages/flutter_tools/lib/src/flutter_project_metadata.dart:460 — MigrateConfig.parseYaml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwiftPackageManagerIntegrationMigration._loadPluginFromExampleProject (cognitive 16) · ×1
  • SwiftPackageManagerIntegrationMigration._loadPluginFromExampleProject (cognitive 16) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1314 — SwiftPackageManagerIntegrationMigration._loadPluginFromExampleProject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 1 (4 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterProject._collectSubdirectories (cognitive 16) · ×1
  • FlutterProject._collectSubdirectories (cognitive 16) packages/flutter_tools/lib/src/project.dart:416 — FlutterProject._collectSubdirectories has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProxiedDartDevelopmentService.startDartDevelopmentService (cognitive 16) · ×1
  • ProxiedDartDevelopmentService.startDartDevelopmentService (cognitive 16) packages/flutter_tools/lib/src/proxied_devices/devices.dart:856 — ProxiedDartDevelopmentService.startDartDevelopmentService has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FlutterVersionGit.repositoryUrl (cognitive 16) · ×1
  • _FlutterVersionGit.repositoryUrl (cognitive 16) packages/flutter_tools/lib/src/version.dart:710 — _FlutterVersionGit.repositoryUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlatformDispatcher._updateUserSettingsData (cognitive 16) · ×1
  • PlatformDispatcher._updateUserSettingsData (cognitive 16) engine/src/flutter/lib/ui/platform_dispatcher.dart:1321 — PlatformDispatcher._updateUserSettingsData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TextStyle.== (cognitive 16) · ×1
  • TextStyle.== (cognitive 16) engine/src/flutter/lib/ui/text.dart:1853 — TextStyle.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RunSuiteStep._checkSkiaClient (cognitive 16) · ×1
  • RunSuiteStep._checkSkiaClient (cognitive 16) engine/src/flutter/lib/web_ui/dev/steps/run_suite_step.dart:256 — RunSuiteStep._checkSkiaClient has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (11 pts), if/else 4 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScreenOrientation.setPreferredOrientation (cognitive 16) · ×1
  • ScreenOrientation.setPreferredOrientation (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/display.dart:83 — ScreenOrientation.setPreferredOrientation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (5 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EnginePlatformDispatcher._addTypographySettingsObserver (cognitive 16) · ×1
  • EnginePlatformDispatcher._addTypographySettingsObserver (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1132 — EnginePlatformDispatcher._addTypographySettingsObserver has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 5, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EnginePlatformDispatcher._findNavigationTarget (cognitive 16) · ×1
  • EnginePlatformDispatcher._findNavigationTarget (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/platform_dispatcher.dart:1650 — EnginePlatformDispatcher._findNavigationTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlatformViewEmbedder._modifyCompositionForMaxCanvases (cognitive 16) · ×1
  • PlatformViewEmbedder._modifyCompositionForMaxCanvases (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/embedder.dart:413 — PlatformViewEmbedder._modifyCompositionForMaxCanvases has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WheelEventListenerMixin._convertWheelEventToPointerData (cognitive 16) · ×1
  • _WheelEventListenerMixin._convertWheelEventToPointerData (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_binding.dart:771 — _WheelEventListenerMixin._convertWheelEventToPointerData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EngineParagraphStyle.== (cognitive 16) · ×1
  • EngineParagraphStyle.== (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:295 — EngineParagraphStyle.== has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DefaultTextEditingStrategy.handleBlur (cognitive 16) · ×1
  • DefaultTextEditingStrategy.handleBlur (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:1909 — DefaultTextEditingStrategy.handleBlur has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LineBuilder.ellipsize (cognitive 16) · ×1
  • _LineBuilder.ellipsize (cognitive 16) engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/wrapper.dart:436 — _LineBuilder.ellipsize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlutterPluginUtils.detectApplyingKotlinGradlePlugin (cognitive 16) · ×1
  • FlutterPluginUtils.detectApplyingKotlinGradlePlugin (cognitive 16) packages/flutter_tools/gradle/src/main/kotlin/FlutterPluginUtils.kt:576 — FlutterPluginUtils.detectApplyingKotlinGradlePlugin has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, error handling 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FlutterEngineFlagsProviderImpl.getFlags (cognitive 16) · ×1
  • FlutterEngineFlagsProviderImpl.getFlags (cognitive 16) engine/src/flutter/shell/platform/android/debug/io/flutter/embedding/engine/flags/FlutterEngineFlagsProviderImpl.java:25 — FlutterEngineFlagsProviderImpl.getFlags has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayStoreDeferredComponentManager.initLoadingUnitMappingToComponentNames (cognitive 16) · ×1
  • PlayStoreDeferredComponentManager.initLoadingUnitMappingToComponentNames (cognitive 16) engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/deferredcomponents/PlayStoreDeferredComponentManager.java:259 — PlayStoreDeferredComponentManager.initLoadingUnitMappingToComponentNames has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createWasmInstantiator (cognitive 16) · ×1
  • createWasmInstantiator (cognitive 16) engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js:12 — createWasmInstantiator has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, error handling 3 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (getResponse, tryGettingResponseFromCrossOriginStorage, a function literal at line 62, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 24 shared lines) · ×1
  • Near-duplicate member family (5 members, 24 shared lines) packages/flutter/lib/src/material/range_slider_parts.dart:1445 — packages/flutter/lib/src/material/range_slider_parts.dart:1445-1506 | packages/flutter/lib/src/material/range_slider_parts.dart:1578-1644 | packages/flutter/lib/src/material/slider_parts.dart:901-967 | packages/flutter/lib/src/material/slider_parts.dart:1371-1432 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:431-496 — These 5 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 20 shared lines) · ×1
  • Near-duplicate member family (5 members, 20 shared lines) packages/flutter/lib/src/material/range_slider_parts.dart:1404 — packages/flutter/lib/src/material/range_slider_parts.dart:1404-1438 | packages/flutter/lib/src/material/range_slider_parts.dart:1528-1562 | packages/flutter/lib/src/material/slider_parts.dart:851-885 | packages/flutter/lib/src/material/slider_parts.dart:1330-1364 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:389-423 — These 5 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 20 shared lines) · ×1
  • Near-duplicate member family (3 members, 20 shared lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1808 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1808-1850 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1865-1923 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1936-1971 — These 3 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (167 shared lines) · ×1
  • Near-duplicate member pair (167 shared lines) packages/flutter/lib/src/rendering/paragraph.dart:2403 — packages/flutter/lib/src/rendering/paragraph.dart:2403-2641 | packages/flutter/lib/src/rendering/paragraph.dart:2655-2893 — These two members are variants of one another: 167 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (134 shared lines) · ×1
  • Near-duplicate member pair (134 shared lines) packages/flutter/lib/src/cupertino/text_field.dart:893 — packages/flutter/lib/src/cupertino/text_field.dart:893-1047 | packages/flutter/lib/src/material/text_field.dart:972-1144 — These two members are variants of one another: 134 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (95 shared lines) · ×1
  • Near-duplicate member pair (95 shared lines) packages/flutter/lib/src/rendering/editable.dart:1412 — packages/flutter/lib/src/rendering/editable.dart:1412-1519 | packages/flutter/lib/src/rendering/paragraph.dart:1361-1475 — These two members are variants of one another: 95 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (75 shared lines) · ×1
  • Near-duplicate member pair (75 shared lines) packages/flutter/lib/src/rendering/paragraph.dart:1711 — packages/flutter/lib/src/rendering/paragraph.dart:1711-1808 | packages/flutter/lib/src/rendering/paragraph.dart:1810-1906 — These two members are variants of one another: 75 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (63 shared lines) · ×1
  • Near-duplicate member pair (63 shared lines) packages/flutter/lib/src/rendering/paragraph.dart:2040 — packages/flutter/lib/src/rendering/paragraph.dart:2040-2205 | packages/flutter/lib/src/rendering/paragraph.dart:2218-2383 — These two members are variants of one another: 63 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (38 shared lines) · ×1
  • Near-duplicate member pair (38 shared lines) engine/src/flutter/lib/ui/painting.dart:1720 — engine/src/flutter/lib/ui/painting.dart:1720-1784 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paint.dart:147-215 — These two members are variants of one another: 38 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (98 corresponding lines) · ×1
  • Edited copy of a member (98 corresponding lines) dev/tools/gen_defaults/lib/range_slider_template.dart:18 — dev/tools/gen_defaults/lib/range_slider_template.dart:18-115 | dev/tools/gen_defaults/lib/slider_template.dart:18-124 — These two members are one piece of code written twice and then edited apart: 98 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (15 members, 50+ identical tokens) packages/flutter/lib/src/gestures/events.dart:845 — packages/flutter/lib/src/gestures/events.dart:845-888 | packages/flutter/lib/src/gestures/events.dart:941-981 | packages/flutter/lib/src/gestures/events.dart:1033-1082 | packages/flutter/lib/src/gestures/events.dart:1149-1198 | packages/flutter/lib/src/gestures/events.dart:1295-1344 | packages/flutter/lib/src/gestures/events.dart:1441-1489 | packages/flutter/lib/src/gestures/events.dart:1549-1599 | packages/flutter/lib/src/gestures/events.dart:1666-1716 | packages/flutter/lib/src/gestures/events.dart:1827-1864 | packages/flutter/lib/src/gestures/events.dart:1950-1984 | packages/flutter/lib/src/gestures/events.dart:2042-2078 | packages/flutter/lib/src/gestures/events.dart:2136-2170 | packages/flutter/lib/src/gestures/events.dart:2238-2282 | packages/flutter/lib/src/gestures/events.dart:2372-2406 | packages/flutter/lib/src/gestures/events.dart:2456-2504 — These 15 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 15 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 15 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) packages/flutter/lib/src/material/slider_parts.dart:720 — packages/flutter/lib/src/material/slider_parts.dart:720-772 | packages/flutter/lib/src/material/slider_parts.dart:801-829 | packages/flutter/lib/src/material/slider_parts.dart:998-1032 | packages/flutter/lib/src/material/slider_parts.dart:1283-1311 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:156-172 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:205-228 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:259-287 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:528-558 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) packages/flutter/lib/src/material/range_slider_parts.dart:495 — packages/flutter/lib/src/material/range_slider_parts.dart:495-566 | packages/flutter/lib/src/material/range_slider_parts.dart:603-690 | packages/flutter/lib/src/material/range_slider_parts.dart:1019-1164 | packages/flutter/lib/src/material/slider_parts.dart:295-396 | packages/flutter/lib/src/material/slider_parts.dart:428-550 | packages/flutter/lib/src/material/slider_parts.dart:1063-1237 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (100 corresponding lines) · ×1
  • Edited copy of a member (100 corresponding lines) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:441 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:441-542 | packages/flutter_test/lib/src/accessibility.dart:375-474 — These two members are one piece of code written twice and then edited apart: 100 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (90 corresponding lines) · ×1
  • Edited copy of a member (90 corresponding lines) packages/flutter_tools/lib/src/build_system/targets/ios.dart:43 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:43-145 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:266-355 — These two members are one piece of code written twice and then edited apart: 90 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) packages/flutter/lib/src/cupertino/switch.dart:1302 — packages/flutter/lib/src/cupertino/switch.dart:1302-1375 | packages/flutter/lib/src/material/switch.dart:1784-1860 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (87 corresponding lines) · ×1
  • Edited copy of a member (87 corresponding lines) packages/flutter_tools/lib/src/commands/create.dart:958 — packages/flutter_tools/lib/src/commands/create.dart:958-1067 | packages/flutter_tools/lib/src/commands/create.dart:1069-1155 — These two members are one piece of code written twice and then edited apart: 87 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (92 corresponding lines) · ×1
  • Edited copy of a member (92 corresponding lines) packages/flutter/lib/src/widgets/text_selection.dart:824 — packages/flutter/lib/src/widgets/text_selection.dart:824-915 | packages/flutter/lib/src/widgets/text_selection.dart:961-1052 — These two members are one piece of code written twice and then edited apart: 92 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (96 corresponding lines) · ×1
  • Edited copy of a member (96 corresponding lines) engine/src/flutter/lib/ui/semantics.dart:2039 — engine/src/flutter/lib/ui/semantics.dart:2039-2138 | engine/src/flutter/lib/web_ui/lib/semantics.dart:717-812 — These two members are one piece of code written twice and then edited apart: 96 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) engine/src/flutter/sky/tools/create_embedder_framework.py:25 — engine/src/flutter/sky/tools/create_embedder_framework.py:25-86 | engine/src/flutter/sky/tools/create_macos_framework.py:17-73 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) packages/flutter/lib/src/material/data_table_theme.dart:258 — packages/flutter/lib/src/material/data_table_theme.dart:258-312 | packages/flutter/lib/src/material/tab_bar_theme.dart:550-618 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 58+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 58+ corresponding lines) packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:811 — packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:811-879 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:902-960 | packages/flutter_tools/lib/src/migrations/swift_package_manager_integration_migration.dart:1054-1111 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 58 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1397 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1397-1441 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1455-1505 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:189 — engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:189-236 | engine/src/flutter/lib/web_ui/dev/steps/compile_bundle_step.dart:247-299 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 96+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 96+ corresponding lines) dev/tools/gen_defaults/lib/action_chip_template.dart:20 — dev/tools/gen_defaults/lib/action_chip_template.dart:20-115 | dev/tools/gen_defaults/lib/button_template.dart:67-190 | dev/tools/gen_defaults/lib/input_chip_template.dart:19-119 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 96 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 41+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 41+ corresponding lines) packages/flutter/lib/src/material/checkbox_theme.dart:189 — packages/flutter/lib/src/material/checkbox_theme.dart:189-229 | packages/flutter/lib/src/material/radio_theme.dart:215-261 | packages/flutter/lib/src/material/scrollbar_theme.dart:230-282 | packages/flutter/lib/src/material/switch_theme.dart:201-258 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 26+ corresponding lines) packages/flutter/lib/src/material/date_picker_theme.dart:1148 — packages/flutter/lib/src/material/date_picker_theme.dart:1148-1173 | packages/flutter/lib/src/material/date_picker_theme.dart:1219-1244 | packages/flutter/lib/src/material/date_picker_theme.dart:1339-1364 | packages/flutter/lib/src/material/date_picker_theme.dart:1406-1431 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 63+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 63+ corresponding lines) dev/tools/gen_defaults/lib/checkbox_template.dart:15 — dev/tools/gen_defaults/lib/checkbox_template.dart:15-145 | dev/tools/gen_defaults/lib/fab_template.dart:16-78 | dev/tools/gen_defaults/lib/menu_template.dart:15-263 | dev/tools/gen_defaults/lib/tabs_template.dart:16-166 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 63 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 37+ corresponding lines) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1209 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1209-1245 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1259-1309 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1327-1383 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 29+ corresponding lines) packages/flutter/lib/src/widgets/_window_win32.dart:534 — packages/flutter/lib/src/widgets/_window_win32.dart:534-562 | packages/flutter/lib/src/widgets/_window_win32.dart:756-784 | packages/flutter/lib/src/widgets/_window_win32.dart:1415-1444 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 28+ corresponding lines) engine/src/flutter/lib/ui/geometry.dart:1675 — engine/src/flutter/lib/ui/geometry.dart:1675-1702 | engine/src/flutter/lib/ui/geometry.dart:1978-2005 | engine/src/flutter/lib/web_ui/lib/geometry.dart:885-913 | engine/src/flutter/lib/web_ui/lib/geometry.dart:1133-1162 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:1666 — packages/flutter/lib/src/rendering/proxy_box.dart:1666-1681 | packages/flutter/lib/src/rendering/proxy_box.dart:1771-1786 | packages/flutter/lib/src/rendering/proxy_box.dart:1877-1892 | packages/flutter/lib/src/rendering/proxy_box.dart:1964-1983 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 57+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 57+ corresponding lines) dev/tools/gen_defaults/lib/navigation_bar_template.dart:16 — dev/tools/gen_defaults/lib/navigation_bar_template.dart:16-77 | dev/tools/gen_defaults/lib/navigation_drawer_template.dart:16-72 | dev/tools/gen_defaults/lib/radio_template.dart:15-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 57 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 27+ corresponding lines) packages/flutter/lib/src/material/chip.dart:2367 — packages/flutter/lib/src/material/chip.dart:2367-2393 | packages/flutter/lib/src/material/ink_ripple.dart:58-85 | packages/flutter/lib/src/material/ink_sparkle.dart:435-463 | packages/flutter/lib/src/material/ink_splash.dart:64-91 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 17+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:278 — engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:278-296 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:298-315 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:317-334 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:336-353 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:544-562 | engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_visitor.dart:580-596 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 14+ corresponding lines) packages/flutter/lib/src/material/date_picker_theme.dart:1442 — packages/flutter/lib/src/material/date_picker_theme.dart:1442-1455 | packages/flutter/lib/src/material/filled_button.dart:565-578 | packages/flutter/lib/src/material/filled_button.dart:706-719 | packages/flutter/lib/src/material/menu_anchor.dart:4149-4165 | packages/flutter/lib/src/material/search_anchor.dart:1877-1890 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 21+ corresponding lines) packages/flutter/lib/src/rendering/proxy_box.dart:1644 — packages/flutter/lib/src/rendering/proxy_box.dart:1644-1664 | packages/flutter/lib/src/rendering/proxy_box.dart:1748-1769 | packages/flutter/lib/src/rendering/proxy_box.dart:1854-1875 | packages/flutter/lib/src/rendering/proxy_box.dart:1941-1962 | packages/flutter/lib/src/rendering/proxy_box.dart:2023-2044 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) engine/src/flutter/tools/pkg/process_fakes/lib/process_fakes.dart:51 — engine/src/flutter/tools/pkg/process_fakes/lib/process_fakes.dart:51-70 | engine/src/flutter/tools/pkg/process_fakes/lib/process_fakes.dart:72-93 | packages/flutter_tools/lib/src/base/error_handling_io.dart:1278-1303 | packages/flutter_tools/lib/src/base/error_handling_io.dart:1330-1355 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 16+ corresponding lines) packages/flutter/lib/src/cupertino/segmented_control.dart:850 — packages/flutter/lib/src/cupertino/segmented_control.dart:850-868 | REDACTED:1501-1519 | packages/flutter/lib/src/cupertino/text_selection_toolbar.dart:1189-1205 | packages/flutter/lib/src/material/segmented_button.dart:1164-1182 | packages/flutter/lib/src/rendering/shifted_box.dart:102-117 | packages/flutter/lib/src/rendering/stack.dart:846-861 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 20+ corresponding lines) packages/flutter/lib/src/widgets/binding.dart:944 — packages/flutter/lib/src/widgets/binding.dart:944-963 | packages/flutter/lib/src/widgets/binding.dart:965-984 | packages/flutter/lib/src/widgets/binding.dart:986-1005 | packages/flutter/lib/src/widgets/binding.dart:1007-1026 | packages/flutter/lib/src/widgets/binding.dart:1028-1047 | packages/flutter/lib/src/widgets/binding.dart:1417-1436 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 16+ corresponding lines) packages/flutter/lib/src/rendering/list_wheel_viewport.dart:792 — packages/flutter/lib/src/rendering/list_wheel_viewport.dart:792-809 | packages/flutter/lib/src/rendering/viewport.dart:965-983 | packages/flutter/lib/src/rendering/wrap.dart:839-856 | packages/flutter/lib/src/widgets/overlay.dart:1550-1565 | packages/flutter/lib/src/widgets/two_dimensional_viewport.dart:1639-1657 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 12+ corresponding lines) packages/flutter/lib/src/cupertino/segmented_control.dart:657 — packages/flutter/lib/src/cupertino/segmented_control.dart:657-668 | packages/flutter/lib/src/cupertino/segmented_control.dart:670-681 | packages/flutter/lib/src/cupertino/segmented_control.dart:683-694 | packages/flutter/lib/src/cupertino/segmented_control.dart:696-707 | packages/flutter/lib/src/material/segmented_button.dart:853-864 | packages/flutter/lib/src/material/segmented_button.dart:866-877 | packages/flutter/lib/src/material/segmented_button.dart:879-890 | packages/flutter/lib/src/material/segmented_button.dart:892-903 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) packages/flutter/lib/src/rendering/binding.dart:544 — packages/flutter/lib/src/rendering/binding.dart:544-562 | packages/flutter/lib/src/services/undo_manager.dart:93-112 | packages/flutter/lib/src/widgets/platform_view.dart:980-1004 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 21+ corresponding lines) packages/flutter_tools/lib/src/base/logger.dart:824 — packages/flutter_tools/lib/src/base/logger.dart:824-847 | packages/flutter_tools/lib/src/base/logger.dart:945-967 | packages/flutter_tools/lib/src/base/logger.dart:969-992 | packages/flutter_tools/lib/src/base/logger.dart:994-1014 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) packages/flutter/lib/src/rendering/editable.dart:1858 — packages/flutter/lib/src/rendering/editable.dart:1858-1871 | packages/flutter/lib/src/rendering/editable.dart:1873-1889 | packages/flutter/lib/src/rendering/paragraph.dart:803-815 | packages/flutter/lib/src/rendering/paragraph.dart:817-831 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 12+ corresponding lines) packages/flutter/lib/src/cupertino/nav_bar.dart:2931 — packages/flutter/lib/src/cupertino/nav_bar.dart:2931-2942 | packages/flutter/lib/src/cupertino/nav_bar.dart:2944-2958 | packages/flutter/lib/src/cupertino/nav_bar.dart:3099-3110 | packages/flutter/lib/src/cupertino/nav_bar.dart:3185-3196 | packages/flutter/lib/src/cupertino/nav_bar.dart:3373-3384 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) packages/flutter/lib/src/gestures/drag_details.dart:248 — packages/flutter/lib/src/gestures/drag_details.dart:248-255 | packages/flutter/lib/src/gestures/long_press.dart:204-211 | packages/flutter/lib/src/gestures/long_press.dart:242-248 | packages/flutter/lib/src/gestures/tap_and_drag.dart:409-417 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 8+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:189 — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:189-197 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:207-214 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:216-223 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:241-249 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:251-258 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:260-267 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/canvas.dart:269-276 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 13+ corresponding lines) packages/flutter_localizations/lib/src/cupertino_localizations.dart:170 — packages/flutter_localizations/lib/src/cupertino_localizations.dart:170-182 | packages/flutter_localizations/lib/src/cupertino_localizations.dart:208-220 | packages/flutter_localizations/lib/src/cupertino_localizations.dart:344-356 | packages/flutter_localizations/lib/src/cupertino_localizations.dart:392-404 | packages/flutter_localizations/lib/src/cupertino_localizations.dart:440-452 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 24+ corresponding lines) dev/tools/gen_defaults/lib/banner_template.dart:16 — dev/tools/gen_defaults/lib/banner_template.dart:16-39 | dev/tools/gen_defaults/lib/bottom_sheet_template.dart:15-48 | dev/tools/gen_defaults/lib/dialog_template.dart:16-53 | dev/tools/gen_defaults/lib/popup_menu_template.dart:16-59 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) packages/flutter/lib/src/material/badge.dart:292 — packages/flutter/lib/src/material/badge.dart:292-297 | packages/flutter/lib/src/widgets/basic.dart:3598-3603 | packages/flutter/lib/src/widgets/implicit_animations.dart:2382-2388 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) engine/src/flutter/lib/ui/geometry.dart:931 — engine/src/flutter/lib/ui/geometry.dart:931-933 | engine/src/flutter/lib/ui/text.dart:2555-2557 | engine/src/flutter/lib/web_ui/lib/geometry.dart:332-334 | engine/src/flutter/lib/web_ui/lib/text.dart:557-560 | packages/flutter/lib/src/rendering/stack.dart:198-200 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) packages/flutter/lib/src/painting/image_stream.dart:306 — packages/flutter/lib/src/painting/image_stream.dart:306-311 | packages/flutter/lib/src/rendering/selection.dart:188-193 | packages/flutter/lib/src/widgets/overlay.dart:1608-1613 | packages/flutter/lib/src/widgets/table.dart:502-507 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:191 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:191-194 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/path.dart:727-730 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:114-116 | engine/src/flutter/tools/path_ops/dart/lib/path_ops.dart:242-247 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:265 — engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/path.dart:265-268 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/path.dart:732-735 | engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart:118-120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 5+ corresponding lines) dev/flutter_analyzer_plugin/lib/src/rules/avoid_future_catch_error.dart:32 — dev/flutter_analyzer_plugin/lib/src/rules/avoid_future_catch_error.dart:32-36 | dev/flutter_analyzer_plugin/lib/src/rules/lazy_initialized_debug_expensive_fields.dart:33-37 | dev/flutter_analyzer_plugin/lib/src/rules/no_runtimetype_in_tostring.dart:29-33 | dev/flutter_analyzer_plugin/lib/src/rules/no_stopwatches.dart:38-44 | dev/flutter_analyzer_plugin/lib/src/rules/protect_public_state_subtypes.dart:36-40 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (2 corresponding lines) · ×1
  • Edited copy of a member (2 corresponding lines) engine/src/flutter/lib/web_ui/lib/geometry.dart:57 — engine/src/flutter/lib/web_ui/lib/geometry.dart:57-58 | packages/flutter/lib/src/painting/fractional_offset.dart:154-157 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:2471 — packages/flutter/lib/src/rendering/paragraph.dart:2471-2527 | packages/flutter/lib/src/rendering/paragraph.dart:2723-2779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:2471` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/rendering/paragraph.dart:2780` calls `_setSelectionPosition` and `packages/flutter/lib/src/rendering/paragraph.dart:2528` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (48–49 lines × 2) · ×1
  • Duplicated block (48–49 lines × 2) packages/flutter/lib/src/services/raw_keyboard_ios.dart:170 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:170-218 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:175-222 — before extracting anything, compare `packages/flutter/lib/src/services/raw_keyboard_ios.dart` and `packages/flutter/lib/src/services/raw_keyboard_macos.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_ios.dart:170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (43–45 lines × 2) · ×1
  • Duplicated block (43–45 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:920 — packages/flutter/lib/src/cupertino/text_field.dart:920-962 | packages/flutter/lib/src/material/text_field.dart:992-1036 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/text_field.dart:920` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (56–57 lines × 2) · ×1
  • Duplicated block (56–57 lines × 2) dev/devicelab/lib/tasks/gallery.dart:164 — dev/devicelab/lib/tasks/gallery.dart:164-220 | dev/devicelab/lib/tasks/gallery.dart:317-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/devicelab/lib/tasks/gallery.dart:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) packages/flutter/lib/src/rendering/paragraph.dart:1752 — packages/flutter/lib/src/rendering/paragraph.dart:1752-1788 | packages/flutter/lib/src/rendering/paragraph.dart:1851-1887 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/paragraph.dart:1752` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) packages/flutter/lib/src/material/carousel.dart:1310 — packages/flutter/lib/src/material/carousel.dart:1310-1345 | packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart:362-397 — before extracting anything, compare `packages/flutter/lib/src/material/carousel.dart` and `packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/carousel.dart:1310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31–33 lines × 2) · ×1
  • Duplicated block (31–33 lines × 2) packages/flutter/lib/src/material/range_slider_parts.dart:603 — packages/flutter/lib/src/material/range_slider_parts.dart:603-635 | packages/flutter/lib/src/material/range_slider_parts.dart:1019-1049 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:603` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:295 — dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:295-325 | dev/devicelab/lib/tasks/build_android_host_app_with_module_aar.dart:390-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) packages/flutter/lib/src/widgets/text_selection.dart:847 — packages/flutter/lib/src/widgets/text_selection.dart:847-875 | packages/flutter/lib/src/widgets/text_selection.dart:983-1010 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/widgets/text_selection.dart:847` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–28 lines × 2) · ×1
  • Duplicated block (22–28 lines × 2) dev/tools/gen_defaults/lib/range_slider_template.dart:70 — dev/tools/gen_defaults/lib/range_slider_template.dart:70-97 | dev/tools/gen_defaults/lib/slider_template.dart:85-106 — before extracting anything, compare `dev/tools/gen_defaults/lib/range_slider_template.dart` and `dev/tools/gen_defaults/lib/slider_template.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/range_slider_template.dart:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) packages/flutter/lib/src/cupertino/text_field.dart:970 — packages/flutter/lib/src/cupertino/text_field.dart:970-994 | packages/flutter/lib/src/material/text_field.dart:1072-1098 — `packages/flutter/lib/src/cupertino/text_field.dart` and `packages/flutter/lib/src/material/text_field.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 214 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/text_field.dart:1072` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24–26 lines × 4) · ×1
  • Duplicated block (24–26 lines × 4) packages/flutter/lib/src/material/range_slider_parts.dart:1448 — packages/flutter/lib/src/material/range_slider_parts.dart:1448-1473 | packages/flutter/lib/src/material/range_slider_parts.dart:1581-1604 | packages/flutter/lib/src/material/slider_parts.dart:904-927 | packages/flutter/lib/src/material/slider_parts.dart:1374-1399 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1448` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20–25 lines × 2) · ×1
  • Duplicated block (20–25 lines × 2) dev/tools/gen_defaults/lib/action_chip_template.dart:20 — dev/tools/gen_defaults/lib/action_chip_template.dart:20-39 | dev/tools/gen_defaults/lib/filter_chip_template.dart:20-44 — before extracting anything, compare `dev/tools/gen_defaults/lib/action_chip_template.dart` and `dev/tools/gen_defaults/lib/filter_chip_template.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/action_chip_template.dart:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 4) · ×1
  • Duplicated block (24 lines × 4) packages/flutter/lib/src/material/range_slider_parts.dart:1404 — packages/flutter/lib/src/material/range_slider_parts.dart:1404-1427 | packages/flutter/lib/src/material/range_slider_parts.dart:1528-1551 | packages/flutter/lib/src/material/slider_parts.dart:851-874 | packages/flutter/lib/src/material/slider_parts.dart:1330-1353 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) packages/flutter_tools/lib/src/build_system/targets/ios.dart:825 — packages/flutter_tools/lib/src/build_system/targets/ios.dart:825-848 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:667-688 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/ios.dart` and `packages/flutter_tools/lib/src/build_system/targets/macos.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) engine/src/flutter/lib/ui/semantics.dart:1624 — engine/src/flutter/lib/ui/semantics.dart:1624-1646 | engine/src/flutter/lib/web_ui/lib/semantics.dart:565-587 | engine/src/flutter/lib/web_ui/lib/semantics.dart:592-614 — before extracting anything, compare `engine/src/flutter/lib/ui/semantics.dart` and `engine/src/flutter/lib/web_ui/lib/semantics.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) packages/flutter/lib/src/cupertino/date_picker.dart:1310 — packages/flutter/lib/src/cupertino/date_picker.dart:1310-1331 | packages/flutter/lib/src/cupertino/date_picker.dart:1753-1774 | packages/flutter/lib/src/cupertino/date_picker.dart:2096-2117 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/cupertino/date_picker.dart:1310` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) packages/flutter_tools/lib/src/asset.dart:812 — packages/flutter_tools/lib/src/asset.dart:812-833 | packages/flutter_tools/lib/src/asset.dart:835-854 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20–21 lines × 3) · ×1
  • Duplicated block (20–21 lines × 3) packages/flutter/lib/src/services/raw_keyboard_ios.dart:220 — packages/flutter/lib/src/services/raw_keyboard_ios.dart:220-240 | packages/flutter/lib/src/services/raw_keyboard_macos.dart:224-244 | packages/flutter/lib/src/services/raw_keyboard_windows.dart:176-195 — before extracting anything, compare `packages/flutter/lib/src/services/raw_keyboard_ios.dart` and `packages/flutter/lib/src/services/raw_keyboard_macos.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/services/raw_keyboard_ios.dart:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) packages/flutter/lib/src/material/range_slider_parts.dart:1419 — packages/flutter/lib/src/material/range_slider_parts.dart:1419-1438 | packages/flutter/lib/src/material/range_slider_parts.dart:1543-1562 | packages/flutter/lib/src/material/slider_parts.dart:866-885 | packages/flutter/lib/src/material/slider_parts.dart:1345-1364 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:404-423 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:1419` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–20 lines × 3) · ×1
  • Duplicated block (17–20 lines × 3) packages/flutter/lib/src/cupertino/desktop_text_selection.dart:193 — packages/flutter/lib/src/cupertino/desktop_text_selection.dart:193-209 | packages/flutter/lib/src/cupertino/text_selection.dart:299-315 | packages/flutter/lib/src/material/desktop_text_selection.dart:201-220 — before extracting anything, compare `packages/flutter/lib/src/cupertino/desktop_text_selection.dart` and `packages/flutter/lib/src/cupertino/text_selection.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/desktop_text_selection.dart:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (3–20 lines × 4) · ×1
  • Duplicated block (3–20 lines × 4) packages/flutter/lib/src/material/date_picker_theme.dart:796 — packages/flutter/lib/src/material/date_picker_theme.dart:796-799 | packages/flutter/lib/src/material/dialog_theme.dart:291-310 | packages/flutter/lib/src/material/dialog_theme.dart:510-529 | packages/flutter/lib/src/material/drawer_theme.dart:166-168 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/date_picker_theme.dart:796` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/dialog_theme.dart:290` calls `add`, `ColorProperty` and `packages/flutter/lib/src/material/date_picker_theme.dart:795` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) packages/flutter_tools/lib/src/commands/build_ios_framework.dart:575 — packages/flutter_tools/lib/src/commands/build_ios_framework.dart:575-594 | packages/flutter_tools/lib/src/commands/build_macos_framework.dart:120-137 — before extracting anything, compare `packages/flutter_tools/lib/src/commands/build_ios_framework.dart` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:575` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter_tools/lib/src/commands/build_ios_framework.dart:573` calls `printStatus` and `packages/flutter_tools/lib/src/commands/build_macos_framework.dart:120` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 14) · ×1
  • Duplicated block (19 lines × 14) packages/flutter/lib/src/gestures/events.dart:847 — packages/flutter/lib/src/gestures/events.dart:847-865 | packages/flutter/lib/src/gestures/events.dart:943-961 | packages/flutter/lib/src/gestures/events.dart:1035-1053 | packages/flutter/lib/src/gestures/events.dart:1151-1169 | packages/flutter/lib/src/gestures/events.dart:1297-1315 | packages/flutter/lib/src/gestures/events.dart:1443-1461 | packages/flutter/lib/src/gestures/events.dart:1551-1569 | packages/flutter/lib/src/gestures/events.dart:1829-1847 | packages/flutter/lib/src/gestures/events.dart:1952-1970 | packages/flutter/lib/src/gestures/events.dart:2044-2062 | packages/flutter/lib/src/gestures/events.dart:2138-2156 | packages/flutter/lib/src/gestures/events.dart:2240-2258 | packages/flutter/lib/src/gestures/events.dart:2374-2392 | packages/flutter/lib/src/gestures/events.dart:2458-2476 — all 14 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) packages/flutter/lib/src/material/list_tile.dart:1067 — packages/flutter/lib/src/material/list_tile.dart:1067-1086 | packages/flutter/lib/src/material/list_tile_theme.dart:297-315 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/list_tile.dart:1067` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18 lines × 15) · ×1
  • Duplicated block (18 lines × 15) packages/flutter/lib/src/gestures/events.dart:852 — packages/flutter/lib/src/gestures/events.dart:852-869 | packages/flutter/lib/src/gestures/events.dart:948-965 | packages/flutter/lib/src/gestures/events.dart:1040-1057 | packages/flutter/lib/src/gestures/events.dart:1156-1173 | packages/flutter/lib/src/gestures/events.dart:1302-1319 | packages/flutter/lib/src/gestures/events.dart:1448-1465 | packages/flutter/lib/src/gestures/events.dart:1556-1573 | packages/flutter/lib/src/gestures/events.dart:1674-1691 | packages/flutter/lib/src/gestures/events.dart:1834-1851 | packages/flutter/lib/src/gestures/events.dart:1957-1974 | packages/flutter/lib/src/gestures/events.dart:2049-2066 | packages/flutter/lib/src/gestures/events.dart:2143-2160 | packages/flutter/lib/src/gestures/events.dart:2245-2262 | packages/flutter/lib/src/gestures/events.dart:2379-2396 | packages/flutter/lib/src/gestures/events.dart:2463-2480 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) packages/flutter/lib/src/rendering/sliver_fill.dart:210 — packages/flutter/lib/src/rendering/sliver_fill.dart:210-223 | packages/flutter/lib/src/rendering/sliver_fill.dart:297-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/rendering/sliver_fill.dart:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–16 lines × 5) · ×1
  • Duplicated block (14–16 lines × 5) engine/src/flutter/lib/web_ui/lib/src/engine/semantics/text_field.dart:209 — engine/src/flutter/lib/web_ui/lib/src/engine/semantics/text_field.dart:209-222 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:1693-1708 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2145-2160 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2291-2306 | engine/src/flutter/lib/web_ui/lib/src/engine/text_editing/text_editing.dart:2357-2372 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/semantics/text_field.dart:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) packages/flutter/lib/src/material/slider_parts.dart:720 — packages/flutter/lib/src/material/slider_parts.dart:720-734 | packages/flutter/lib/src/material/slider_parts.dart:801-815 | packages/flutter/lib/src/material/slider_parts.dart:998-1012 | packages/flutter/lib/src/material/slider_parts.dart:1283-1297 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:156-170 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:205-219 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:259-273 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:528-542 — before extracting anything, compare `packages/flutter/lib/src/material/slider_parts.dart` and `packages/flutter/lib/src/material/slider_value_indicator_shape.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/slider_parts.dart:720` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–15 lines × 6) · ×1
  • Duplicated block (13–15 lines × 6) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:700 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:700-712 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:806-818 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:977-989 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1056-1068 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1331-1345 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1357-1371 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1331` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1330` calls `pushOffset` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:699` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:142 — engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:142-156 | engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:218-232 | engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:407-421 | engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart:194-208 | engine/src/flutter/lib/web_ui/lib/text.dart:376-390 — `engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart` and `engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/lib/web_ui/lib/src/engine/pointer_converter.dart:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 5) · ×1
  • Duplicated block (14–15 lines × 5) packages/flutter/lib/src/material/range_slider_parts.dart:624 — packages/flutter/lib/src/material/range_slider_parts.dart:624-638 | packages/flutter/lib/src/material/range_slider_parts.dart:1040-1053 | packages/flutter/lib/src/material/slider_parts.dart:317-331 | packages/flutter/lib/src/material/slider_parts.dart:451-465 | packages/flutter/lib/src/material/slider_parts.dart:1088-1102 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/range_slider_parts.dart:624` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 7) · ×1
  • Duplicated block (13 lines × 7) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:700 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:700-712 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:806-818 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:977-989 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1056-1068 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1331-1343 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1357-1369 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2189-2201 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1330` calls `pushOffset` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:699` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×1
  • Duplicated block (12–13 lines × 4) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:674 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:674-686 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:779-791 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:940-951 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1018-1029 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:238 — packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:238-250 | packages/flutter/lib/src/widgets/_accessibility_evaluations.dart:835-845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 5) · ×1
  • Duplicated block (11–12 lines × 5) packages/flutter/lib/src/material/date_picker_theme.dart:1150 — packages/flutter/lib/src/material/date_picker_theme.dart:1150-1160 | packages/flutter/lib/src/material/date_picker_theme.dart:1221-1231 | packages/flutter/lib/src/material/date_picker_theme.dart:1341-1351 | packages/flutter/lib/src/material/date_picker_theme.dart:1408-1418 | packages/flutter/lib/src/material/icon_button.dart:1218-1229 — before extracting anything, compare `packages/flutter/lib/src/material/date_picker_theme.dart` and `packages/flutter/lib/src/material/icon_button.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/date_picker_theme.dart:1150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–12 lines × 3) · ×1
  • Duplicated block (8–12 lines × 3) dev/integration_tests/new_gallery/lib/pages/home.dart:883 — dev/integration_tests/new_gallery/lib/pages/home.dart:883-894 | packages/flutter/lib/src/material/carousel.dart:1542-1549 | packages/flutter/lib/src/widgets/page_view.dart:620-631 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/new_gallery/lib/pages/home.dart:883` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1130 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1130-1139 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1459-1470 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1482-1493 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1459` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) packages/flutter/lib/src/rendering/proxy_box.dart:1632 — packages/flutter/lib/src/rendering/proxy_box.dart:1632-1642 | packages/flutter/lib/src/rendering/proxy_box.dart:1736-1746 | packages/flutter/lib/src/rendering/proxy_box.dart:2011-2021 | packages/flutter/lib/src/rendering/proxy_box.dart:2191-2201 | packages/flutter/lib/src/rendering/proxy_box.dart:2297-2307 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–18 lines × 3) · ×1
  • Duplicated block (14–18 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:27 — engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:27-40 | engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_app_extension_scenario.dart:24-37 | engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart:30-47 — before extracting anything, compare `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart` and `engine/src/flutter/testing/ios_scenario_app/lib/src/darwin_system_font.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/bogus_font_text.dart:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:831 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:831-838 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:851-861 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:831` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • Duplicated block (10 lines × 6) packages/flutter/lib/src/material/button.dart:523 — packages/flutter/lib/src/material/button.dart:523-532 | packages/flutter/lib/src/material/button_style_button.dart:711-720 | packages/flutter/lib/src/material/time_picker.dart:913-922 | packages/flutter/lib/src/material/toggle_buttons.dart:1677-1686 | packages/flutter/lib/src/rendering/animated_size.dart:402-411 | packages/flutter/lib/src/rendering/shifted_box.dart:1089-1098 — before extracting anything, compare `packages/flutter/lib/src/material/button.dart` and `packages/flutter/lib/src/material/button_style_button.dart` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/button.dart:523` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–10 lines × 5) · ×1
  • Duplicated block (9–10 lines × 5) packages/flutter/lib/src/material/elevated_button.dart:551 — packages/flutter/lib/src/material/elevated_button.dart:551-559 | packages/flutter/lib/src/material/outlined_button.dart:493-501 | packages/flutter/lib/src/material/switch.dart:2269-2278 | packages/flutter/lib/src/material/tabs.dart:2833-2842 | packages/flutter/lib/src/material/text_button.dart:526-534 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/elevated_button.dart:551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) packages/flutter/lib/src/gestures/events.dart:1073 — packages/flutter/lib/src/gestures/events.dart:1073-1082 | packages/flutter/lib/src/gestures/events.dart:1189-1198 | packages/flutter/lib/src/gestures/events.dart:1335-1344 | packages/flutter/lib/src/gestures/events.dart:1590-1599 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/gestures/events.dart:1073` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×1
  • Duplicated block (8–10 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1096 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1096-1103 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1401-1410 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1421-1430 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1401` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 7) · ×1
  • Duplicated block (9 lines × 7) packages/flutter/lib/src/material/date_picker_theme.dart:1152 — packages/flutter/lib/src/material/date_picker_theme.dart:1152-1160 | packages/flutter/lib/src/material/date_picker_theme.dart:1223-1231 | packages/flutter/lib/src/material/date_picker_theme.dart:1343-1351 | packages/flutter/lib/src/material/date_picker_theme.dart:1410-1418 | packages/flutter/lib/src/material/filled_button.dart:568-576 | packages/flutter/lib/src/material/icon_button.dart:1220-1228 | packages/flutter/lib/src/material/icon_button.dart:1241-1249 — before extracting anything, compare `packages/flutter/lib/src/material/date_picker_theme.dart` and `packages/flutter/lib/src/material/icon_button.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/date_picker_theme.dart:1151` calls `contains` and `packages/flutter/lib/src/material/filled_button.dart:567` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) packages/flutter/lib/src/material/date_picker_theme.dart:1162 — packages/flutter/lib/src/material/date_picker_theme.dart:1162-1170 | packages/flutter/lib/src/material/date_picker_theme.dart:1233-1241 | packages/flutter/lib/src/material/date_picker_theme.dart:1353-1361 | packages/flutter/lib/src/material/date_picker_theme.dart:1420-1428 | packages/flutter/lib/src/material/icon_button.dart:1099-1107 | packages/flutter/lib/src/material/icon_button.dart:1373-1381 — before extracting anything, compare `packages/flutter/lib/src/material/date_picker_theme.dart` and `packages/flutter/lib/src/material/icon_button.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) packages/flutter_tools/lib/src/build_system/targets/linux.dart:115 — packages/flutter_tools/lib/src/build_system/targets/linux.dart:115-122 | packages/flutter_tools/lib/src/build_system/targets/macos.dart:402-410 | packages/flutter_tools/lib/src/build_system/targets/windows.dart:129-136 — before extracting anything, compare `packages/flutter_tools/lib/src/build_system/targets/linux.dart` and `packages/flutter_tools/lib/src/build_system/targets/windows.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_tools/lib/src/build_system/targets/linux.dart:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 9) · ×1
  • Duplicated block (8 lines × 9) packages/flutter/lib/src/material/elevated_button.dart:551 — packages/flutter/lib/src/material/elevated_button.dart:551-558 | packages/flutter/lib/src/material/icon_button.dart:1090-1097 | packages/flutter/lib/src/material/icon_button.dart:1232-1239 | packages/flutter/lib/src/material/outlined_button.dart:493-500 | packages/flutter/lib/src/material/slider.dart:2227-2234 | packages/flutter/lib/src/material/slider.dart:2316-2323 | packages/flutter/lib/src/material/switch.dart:2269-2276 | packages/flutter/lib/src/material/tabs.dart:2833-2840 | packages/flutter/lib/src/material/text_button.dart:526-533 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/outlined_button.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/elevated_button.dart:551` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `packages/flutter/lib/src/material/icon_button.dart:1088` calls `contains` and `packages/flutter/lib/src/material/elevated_button.dart:549` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) packages/flutter/lib/src/gestures/events.dart:1071 — packages/flutter/lib/src/gestures/events.dart:1071-1078 | packages/flutter/lib/src/gestures/events.dart:1187-1194 | packages/flutter/lib/src/gestures/events.dart:1333-1340 | packages/flutter/lib/src/gestures/events.dart:1479-1486 | packages/flutter/lib/src/gestures/events.dart:1588-1595 | packages/flutter/lib/src/gestures/events.dart:1706-1713 | packages/flutter/lib/src/gestures/events.dart:2494-2501 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–21 lines × 2) · ×1
  • Duplicated block (18–21 lines × 2) dev/tools/gen_defaults/lib/date_picker_template.dart:142 — dev/tools/gen_defaults/lib/date_picker_template.dart:142-162 | dev/tools/gen_defaults/lib/date_picker_template.dart:209-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/tools/gen_defaults/lib/date_picker_template.dart:142` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) packages/flutter/lib/src/material/elevated_button.dart:602 — packages/flutter/lib/src/material/elevated_button.dart:602-608 | packages/flutter/lib/src/material/filled_button.dart:620-626 | packages/flutter/lib/src/material/filled_button.dart:761-767 | packages/flutter/lib/src/material/outlined_button.dart:530-536 | packages/flutter/lib/src/material/text_button.dart:563-569 — before extracting anything, compare `packages/flutter/lib/src/material/elevated_button.dart` and `packages/flutter/lib/src/material/filled_button.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/elevated_button.dart:602` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 8) · ×1
  • Duplicated block (11–12 lines × 8) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:884 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:884-894 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:914-924 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:950-961 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:991-1001 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1028-1039 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1070-1080 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1104-1114 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1141-1151 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:884` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 7) · ×1
  • Duplicated block (6 lines × 7) packages/flutter/lib/src/material/carousel.dart:1601 — packages/flutter/lib/src/material/carousel.dart:1601-1606 | packages/flutter/lib/src/material/carousel.dart:1882-1887 | packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:355-360 | packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart:438-443 | packages/flutter/lib/src/widgets/nested_scroll_view.dart:596-601 | packages/flutter/lib/src/widgets/page_view.dart:312-317 | packages/flutter/lib/src/widgets/page_view.dart:534-539 — there are 7 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:154 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:154-159 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:182-187 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:260-265 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1844-1850 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1917-1923 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:2392-2397 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:154` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:181` calls `drawCircle`, `Offset`, `Paint` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:153` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–16 lines × 2) · ×1
  • Duplicated block (10–16 lines × 2) dev/tools/gen_defaults/lib/action_chip_template.dart:66 — dev/tools/gen_defaults/lib/action_chip_template.dart:66-81 | dev/tools/gen_defaults/lib/filter_chip_template.dart:83-92 — before extracting anything, compare `dev/tools/gen_defaults/lib/action_chip_template.dart` and `dev/tools/gen_defaults/lib/filter_chip_template.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (3–6 lines × 3) · ×1
  • Duplicated block (3–6 lines × 3) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1817 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1817-1819 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1875-1880 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1945-1950 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1875` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1875` calls `endRecording` and `engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1817` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 10) · ×1
  • Duplicated block (7 lines × 10) engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:594 — engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:594-600 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:645-651 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:887-893 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:917-923 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:954-960 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:994-1000 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1032-1038 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1073-1079 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1107-1113 | engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:1144-1150 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) packages/flutter/lib/src/material/date_picker_theme.dart:791 — packages/flutter/lib/src/material/date_picker_theme.dart:791-795 | packages/flutter/lib/src/material/dialog_theme.dart:285-289 | packages/flutter/lib/src/material/dialog_theme.dart:504-508 | packages/flutter/lib/src/material/navigation_bar_theme.dart:219-221 | packages/flutter/lib/src/material/navigation_drawer_theme.dart:199-201 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/date_picker_theme.dart:791` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/lib/src/material/date_picker_theme.dart:795` calls `add`, `DoubleProperty` and `packages/flutter/lib/src/material/navigation_bar_theme.dart:221` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–5 lines × 4) · ×1
  • Duplicated block (3–5 lines × 4) packages/flutter/lib/src/material/checkbox.dart:760 — packages/flutter/lib/src/material/checkbox.dart:760-762 | packages/flutter/lib/src/material/checkbox.dart:767-771 | packages/flutter/lib/src/material/chip.dart:2158-2160 | packages/flutter/lib/src/material/chip.dart:2165-2169 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/lib/src/material/checkbox.dart:767` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (95 lines × 2) · ×1
  • Duplicated block (95 lines × 2) dev/tools/localization/localizations_utils.dart:31 — dev/tools/localization/localizations_utils.dart:31-125 | packages/flutter_tools/lib/src/localizations/localizations_utils.dart:30-124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `a` to `FileSystemEntity` in one and `File` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×1
  • Duplicated block (5 lines × 7) packages/flutter/lib/src/material/elevated_button_theme.dart:79 — packages/flutter/lib/src/material/elevated_button_theme.dart:79-83 | packages/flutter/lib/src/material/filled_button_theme.dart:75-79 | packages/flutter/lib/src/material/icon_button_theme.dart:75-79 | packages/flutter/lib/src/material/menu_button_theme.dart:89-93 | packages/flutter/lib/src/material/outlined_button_theme.dart:79-83 | packages/flutter/lib/src/material/segmented_button_theme.dart:99-103 | packages/flutter/lib/src/material/text_button_theme.dart:75-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) packages/flutter/lib/src/material/range_slider_parts.dart:1265 — packages/flutter/lib/src/material/range_slider_parts.dart:1265-1275 | packages/flutter/lib/src/material/range_slider_parts.dart:1341-1351 | packages/flutter/lib/src/material/slider_parts.dart:789-799 | packages/flutter/lib/src/material/slider_parts.dart:1271-1281 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:247-257 | packages/flutter/lib/src/material/slider_value_indicator_shape.dart:516-526 — before extracting anything, compare `packages/flutter/lib/src/material/range_slider_parts.dart` and `packages/flutter/lib/src/material/slider_parts.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 316 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×1
  • Duplicated block (7 lines × 8) examples/flutter_view/macos/Runner/AppDelegate.swift:10 — examples/flutter_view/macos/Runner/AppDelegate.swift:10-16 | examples/hello_world/macos/Runner/AppDelegate.swift:10-16 | examples/image_list/macos/Runner/AppDelegate.swift:10-16 | examples/layers/macos/Runner/AppDelegate.swift:10-16 | examples/platform_channel/macos/Runner/AppDelegate.swift:10-16 | examples/platform_view/macos/Runner/AppDelegate.swift:10-16 | packages/flutter/examples/api/macos/Runner/AppDelegate.swift:10-16 | packages/flutter_tools/templates/app/macos.tmpl/Runner/AppDelegate.swift:6-12 — before extracting anything, compare `examples/flutter_view/macos/Runner/AppDelegate.swift` and `examples/hello_world/macos/Runner/AppDelegate.swift` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Near-duplicate member pair (34 shared lines) · ×1
  • Near-duplicate member pair (34 shared lines) examples/multiple_windows/lib/app/popup_window_content.dart:33 — examples/multiple_windows/lib/app/popup_window_content.dart:33-106 | examples/multiple_windows/lib/app/tooltip_window_content.dart:20-67 — These two members are variants of one another: 34 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:69 — dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:69-91 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_main.dart:43-65 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:99-121 | dev/integration_tests/android_engine_test/lib/hcpp/tap_color_change_main.dart:50-72 | dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart:69-91 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:71-93 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:101-123 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:131-153 | dev/integration_tests/android_engine_test/lib/platform_view/hide_show_hide_main.dart:77-99 | dev/integration_tests/android_engine_test/lib/platform_view/hybrid_composition_platform_view_main.dart:36-58 | dev/integration_tests/hybrid_android_views/lib/android_platform_view.dart:37-72 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication · Edited copy of a member (81 corresponding lines) · ×1
  • Edited copy of a member (81 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/data_table_demo.dart:178 — dev/integration_tests/flutter_gallery/lib/demo/material/data_table_demo.dart:178-258 | dev/integration_tests/new_gallery/lib/demos/material/data_table_demo.dart:126-211 — These two members are one piece of code written twice and then edited apart: 81 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (93 corresponding lines) · ×1
  • Edited copy of a member (93 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:237 — dev/integration_tests/flutter_gallery/lib/demo/material/cards_demo.dart:237-329 | dev/integration_tests/new_gallery/lib/demos/material/cards_demo.dart:256-353 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (80 corresponding lines) · ×1
  • Edited copy of a member (80 corresponding lines) packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.0.dart:107 — packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.0.dart:107-200 | packages/flutter/examples/api/lib/material/menu_anchor/menu_anchor.1.dart:137-216 — These two members are one piece of code written twice and then edited apart: 80 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (69 corresponding lines) · ×1
  • Edited copy of a member (69 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:105 — dev/integration_tests/flutter_gallery/lib/demo/shrine/backdrop.dart:105-173 | dev/integration_tests/new_gallery/lib/studies/shrine/backdrop.dart:72-159 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) dev/integration_tests/android_views/lib/motion_events_page.dart:67 — dev/integration_tests/android_views/lib/motion_events_page.dart:67-132 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:47-112 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (64 corresponding lines) · ×1
  • Edited copy of a member (64 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/banner_demo.dart:41 — dev/integration_tests/flutter_gallery/lib/demo/material/banner_demo.dart:41-104 | dev/integration_tests/new_gallery/lib/demos/material/banner_demo.dart:60-136 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) packages/flutter/examples/api/lib/cupertino/list_section/list_section_base.0.dart:23 — packages/flutter/examples/api/lib/cupertino/list_section/list_section_base.0.dart:23-74 | packages/flutter/examples/api/lib/cupertino/list_section/list_section_inset.0.dart:23-74 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×1
  • Edited copy of a member (63 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/tabs_demo.dart:136 — dev/integration_tests/flutter_gallery/lib/demo/material/tabs_demo.dart:136-198 | packages/flutter/examples/api/lib/widgets/nested_scroll_view/nested_scroll_view.0.dart:23-139 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/text_form_field_demo.dart:320 — dev/integration_tests/flutter_gallery/lib/demo/material/text_form_field_demo.dart:320-361 | dev/integration_tests/new_gallery/lib/demos/material/text_field_demo.dart:370-408 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart:26 — packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.0.dart:26-76 | packages/flutter/examples/api/lib/cupertino/context_menu/cupertino_context_menu.1.dart:51-115 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 47+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 47+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:125 — dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:125-172 | dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:174-220 | dev/integration_tests/flutter_gallery/lib/demo/material/buttons_demo.dart:222-269 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 45+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 45+ corresponding lines) examples/multiple_windows/lib/app/window_settings_dialog.dart:130 — examples/multiple_windows/lib/app/window_settings_dialog.dart:130-174 | examples/multiple_windows/lib/app/window_settings_dialog.dart:176-220 | examples/multiple_windows/lib/app/window_settings_dialog.dart:222-272 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 45 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 35+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 35+ corresponding lines) dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:44 — dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:44-78 | dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:86-120 | dev/integration_tests/new_gallery/lib/demos/material/button_demo.dart:128-162 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) packages/flutter/examples/api/lib/widgets/scrollbar/raw_scrollbar.0.dart:42 — packages/flutter/examples/api/lib/widgets/scrollbar/raw_scrollbar.0.dart:42-101 | packages/flutter/examples/api/lib/widgets/scrollbar/raw_scrollbar.desktop.0.dart:42-104 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 34+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 34+ corresponding lines) dev/integration_tests/flutter_gallery/lib/gallery/options.dart:220 — dev/integration_tests/flutter_gallery/lib/gallery/options.dart:220-253 | dev/integration_tests/flutter_gallery/lib/gallery/options.dart:262-299 | dev/integration_tests/flutter_gallery/lib/gallery/options.dart:308-345 | dev/integration_tests/flutter_gallery/lib/gallery/options.dart:395-430 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 32+ corresponding lines) dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:127 — dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:127-160 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:162-194 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:196-228 | dev/integration_tests/flutter_gallery/lib/demo/cupertino/cupertino_picker_demo.dart:230-261 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 31+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 31+ corresponding lines) dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:53 — dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:53-83 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:85-115 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:117-148 | dev/integration_tests/new_gallery/lib/demos/cupertino/cupertino_picker_demo.dart:150-181 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 23+ corresponding lines) packages/flutter/examples/api/lib/cupertino/radio/cupertino_radio.0.dart:40 — packages/flutter/examples/api/lib/cupertino/radio/cupertino_radio.0.dart:40-66 | packages/flutter/examples/api/lib/cupertino/radio/cupertino_radio.toggleable.0.dart:39-69 | packages/flutter/examples/api/lib/material/radio/radio.0.dart:37-59 | packages/flutter/examples/api/lib/material/radio_list_tile/radio_list_tile.0.dart:37-59 | packages/flutter/examples/api/lib/widgets/radio_group/radio_group.0.dart:52-76 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 19+ corresponding lines) packages/flutter/examples/api/lib/material/autocomplete/autocomplete.0.dart:14 — packages/flutter/examples/api/lib/material/autocomplete/autocomplete.0.dart:14-32 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.1.dart:14-32 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.2.dart:17-35 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.3.dart:20-40 | packages/flutter/examples/api/lib/material/autocomplete/autocomplete.4.dart:21-44 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) engine/src/flutter/lib/web_ui/dev/test_runner.dart:166 — engine/src/flutter/lib/web_ui/dev/test_runner.dart:166-175 | engine/src/flutter/lib/web_ui/dev/test_runner.dart:177-186 | engine/src/flutter/lib/web_ui/dev/test_runner.dart:188-197 | engine/src/flutter/lib/web_ui/dev/test_runner.dart:199-208 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (88 lines × 2) · ×1
  • Duplicated block (88 lines × 2) examples/multiple_windows/lib/app/popup_window_edit_dialog.dart:113 — examples/multiple_windows/lib/app/popup_window_edit_dialog.dart:113-200 | examples/multiple_windows/lib/app/tooltip_window_edit_dialog.dart:113-200 — before extracting anything, compare `examples/multiple_windows/lib/app/popup_window_edit_dialog.dart` and `examples/multiple_windows/lib/app/tooltip_window_edit_dialog.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) dev/integration_tests/android_views/lib/motion_events_page.dart:74 — dev/integration_tests/android_views/lib/motion_events_page.dart:74-132 | dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart:54-112 — before extracting anything, compare `dev/integration_tests/android_views/lib/motion_events_page.dart` and `dev/integration_tests/hybrid_android_views/lib/motion_events_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_views/lib/motion_events_page.dart:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) dev/manual_tests/lib/star_border.dart:268 — dev/manual_tests/lib/star_border.dart:268-317 | packages/flutter/examples/api/lib/painting/star_border/star_border.0.dart:191-240 — before extracting anything, compare `dev/manual_tests/lib/star_border.dart` and `packages/flutter/examples/api/lib/painting/star_border/star_border.0.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/manual_tests/lib/star_border.dart:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:153 — dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart:153-193 | dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:391-431 — before extracting anything, compare `dev/integration_tests/flutter_gallery/lib/demo/material/slider_demo.dart` and `dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (34 lines × 3) · ×1
  • Duplicated block (34 lines × 3) packages/flutter/examples/api/lib/material/dialog/show_dialog.0.dart:38 — packages/flutter/examples/api/lib/material/dialog/show_dialog.0.dart:38-71 | packages/flutter/examples/api/lib/material/dialog/show_dialog.1.dart:41-74 | packages/flutter/examples/api/lib/material/dialog/show_dialog.2.dart:44-77 — before extracting anything, compare `packages/flutter/examples/api/lib/material/dialog/show_dialog.0.dart` and `packages/flutter/examples/api/lib/material/dialog/show_dialog.1.dart` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/dialog/show_dialog.0.dart:38` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29 lines × 4) · ×1
  • Duplicated block (29 lines × 4) packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:50 — packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:50-78 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart:51-79 | packages/flutter/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.2.dart:47-75 | packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.1.dart:50-78 — before extracting anything, compare `packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart` and `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–24 lines × 5) · ×1
  • Duplicated block (23–24 lines × 5) dev/integration_tests/android_engine_test/lib/hcpp/platform_view_clippath_main.dart:250 — dev/integration_tests/android_engine_test/lib/hcpp/platform_view_clippath_main.dart:250-273 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_cliprect_surfaceview_main.dart:132-154 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_fractional_size_main.dart:153-175 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_opacity_main.dart:92-114 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_transform_main.dart:169-191 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×1
  • Duplicated block (16–20 lines × 2) dev/integration_tests/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart:121 — dev/integration_tests/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart:121-140 | packages/flutter/examples/api/lib/widgets/page/page_can_pop.0.dart:58-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/flutter_gallery/lib/demo/material/full_screen_dialog_demo.dart:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) dev/integration_tests/wide_gamut_test/lib/main.dart:346 — dev/integration_tests/wide_gamut_test/lib/main.dart:346-364 | dev/integration_tests/wide_gamut_test/lib/main.dart:371-389 | dev/integration_tests/wide_gamut_test/lib/main.dart:397-415 | dev/integration_tests/wide_gamut_test/lib/main.dart:422-440 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/wide_gamut_test/lib/main.dart:346` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `dev/integration_tests/wide_gamut_test/lib/main.dart:396` calls `Alignment` and `dev/integration_tests/wide_gamut_test/lib/main.dart:370` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:88 — packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:88-105 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.0.dart:40-57 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.1.dart:40-57 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart:89-106 — before extracting anything, compare `packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart` and `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `context` to `context` in one and `BuildContext` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (17–18 lines × 3) · ×1
  • Duplicated block (17–18 lines × 3) packages/flutter/examples/api/lib/material/scaffold/scaffold.of.0.dart:44 — packages/flutter/examples/api/lib/material/scaffold/scaffold.of.0.dart:44-61 | packages/flutter/examples/api/lib/material/scaffold/scaffold.of.1.dart:42-58 | packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.0.dart:41-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/scaffold/scaffold.of.0.dart:44` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) packages/flutter/examples/api/lib/widgets/sliver/sliver_constrained_cross_axis.0.dart:33 — packages/flutter/examples/api/lib/widgets/sliver/sliver_constrained_cross_axis.0.dart:33-46 | packages/flutter/examples/api/lib/widgets/sliver/sliver_cross_axis_group.0.dart:32-46 | packages/flutter/examples/api/lib/widgets/sliver/sliver_main_axis_group.0.dart:37-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/widgets/sliver/sliver_constrained_cross_axis.0.dart:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 7) · ×1
  • Duplicated block (14 lines × 7) packages/flutter/examples/api/lib/material/app/app.0.dart:64 — packages/flutter/examples/api/lib/material/app/app.0.dart:64-77 | packages/flutter/examples/api/lib/material/bottom_sheet/show_bottom_sheet.0.dart:66-79 | packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart:67-80 | packages/flutter/examples/api/lib/material/expansion_tile/expansion_tile.2.dart:61-74 | packages/flutter/examples/api/lib/material/popup_menu/popup_menu.2.dart:72-85 | packages/flutter/examples/api/lib/material/scaffold/scaffold_messenger_state.show_snack_bar.2.dart:63-76 | packages/flutter/examples/api/lib/material/scaffold/scaffold_state.show_bottom_sheet.1.dart:66-79 — before extracting anything, compare `packages/flutter/examples/api/lib/material/app/app.0.dart` and `packages/flutter/examples/api/lib/material/expansion_tile/expansion_tile.2.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter/examples/api/lib/material/app/app.0.dart:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter/examples/api/lib/material/bottom_sheet/show_modal_bottom_sheet.2.dart:81` calls `ElevatedButton`, `Text` and `packages/flutter/examples/api/lib/material/popup_menu/popup_menu.2.dart:86` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–14 lines × 2) · ×1
  • Duplicated block (9–14 lines × 2) examples/texture/lib/main.dart:55 — examples/texture/lib/main.dart:55-68 | examples/texture/lib/main.dart:69-77 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/texture/lib/main.dart:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) packages/flutter_test/lib/src/binding.dart:347 — packages/flutter_test/lib/src/binding.dart:347-358 | packages/flutter_test/lib/src/binding.dart:531-543 | packages/flutter_test/lib/src/binding.dart:803-815 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `packages/flutter_test/lib/src/binding.dart:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `packages/flutter_test/lib/src/binding.dart:544` calls `_addChildToParent` and `packages/flutter_test/lib/src/binding.dart:361` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 11) · ×1
  • Duplicated block (12 lines × 11) dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:69 — dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:69-80 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_main.dart:43-54 | dev/integration_tests/android_engine_test/lib/hcpp/platform_view_overlapping_main.dart:99-110 | dev/integration_tests/android_engine_test/lib/hcpp/tap_color_change_main.dart:50-61 | dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart:69-80 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:71-82 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:101-112 | dev/integration_tests/android_engine_test/lib/hcpp/upgrade_legacy_pv_types_main.dart:131-142 | dev/integration_tests/android_engine_test/lib/platform_view/hide_show_hide_main.dart:77-88 | dev/integration_tests/android_engine_test/lib/platform_view/hybrid_composition_platform_view_main.dart:36-47 | dev/integration_tests/hybrid_android_views/lib/android_platform_view.dart:37-48 — before extracting anything, compare `dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart` and `dev/integration_tests/android_engine_test/lib/hcpp/tlhc_with_fallback_to_hc_errors_with_hcpp_enabled.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `dev/integration_tests/android_engine_test/lib/hcpp/hc_errors_with_hcpp_enabled.dart:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 25) · ×1
  • Duplicated block (8 lines × 25) packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_alternative.0.dart:14 — packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_alternative.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_case_sensitive_forms.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_character_variant.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_contextual_alternates.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_denominator.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_fractions.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_historical_forms.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_historical_ligatures.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_lining_figures.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_locale_aware.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_notational_forms.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_numerators.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_oldstyle_figures.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_ordinal_forms.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_proportional_figures.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_scientific_inferiors.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_slashed_zero.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_stylistic_alternates.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_stylistic_set.1.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_subscripts.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_superscripts.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_swash.0.dart:14-21 | packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_tabular_figures.0.dart:14-21 — before extracting anything, compare `packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart` and `packages/flutter/examples/api/lib/ui/text/font_feature.font_feature_denominator.0.dart` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
IC1 · Incompleteness & stubs · Empty method body · ×1
  • Empty method body — does nothing with its inputs dev/packages_autoroller/bin/packages_autoroller.dart:137 — `validateTokenFile` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
P3 · Security & performance tooling · Analyzer excludes 1 path(s) that do not exist · ×1
  • Analyzer excludes 1 path(s) that do not exist engine/src/flutter/analysis_options.yaml:1 — `engine/src/flutter/analysis_options.yaml` excludes `prebuilts` from analysis, and no such path is in the repository. These entries are dead configuration: they silence nothing today, and each one is a name the analyzer will silently start honouring the moment a directory of that name appears — so the file's exclusion list is wider than anything anybody decided. Delete the entries that no longer name anything, and keep the ones that do.
P4 · Deployment & Rollback · No deployment automation · ×1
  • No deployment automation — No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 11 plain JS — the untyped files are engine/src/flutter/lib/web_ui/flutter_js/src/browser_environment.js, engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/flutter.js, engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js, engine/src/flutter/lib/web_ui/flutter_js/src/loader.js (+5 more).
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 11) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 11) engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js:9 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function load (cyclomatic 12, cognitive 14) · ×1
  • Complex function load (cyclomatic 12, cognitive 14) engine/src/flutter/lib/web_ui/flutter_js/src/loader.js:85 — load has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · engine/src/flutter/skwasm/library_skwasm_support.js · ×1
  • engine/src/flutter/skwasm/library_skwasm_support.js: 467 lines of code engine/src/flutter/skwasm/library_skwasm_support.js:1 — engine/src/flutter/skwasm/library_skwasm_support.js has 467 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No lint or typecheck script · ×1
  • No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~489 LoC) · ×1
  • Dead file (~489 LoC) engine/src/flutter/skwasm/library_skwasm_support.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~218 LoC) · ×1
  • Dead file (~218 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~206 LoC) · ×1
  • Dead file (~206 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/loader.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/flutter.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~115 LoC) · ×1
  • Dead file (~115 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/instantiate_wasm.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/skwasm_loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~104 LoC) · ×1
  • Dead file (~104 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/browser_environment.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~91 LoC) · ×1
  • Dead file (~91 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/skwasm_loader.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~55 LoC) · ×1
  • Dead file (~55 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/utils.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/entrypoint_loader.js, engine/src/flutter/lib/web_ui/flutter_js/src/loader.js and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~44 LoC) · ×1
  • Dead file (~44 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/canvaskit_loader.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~41 LoC) · ×1
  • Dead file (~41 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/trusted_types.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (engine/src/flutter/lib/web_ui/flutter_js/src/loader.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~13 LoC) · ×1
  • Dead file (~13 LoC) engine/src/flutter/lib/web_ui/flutter_js/src/flutter.js — no import path from any entry point (1 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X27 · Collection changed while being enumerated · Collection is structurally changed while it is being enumerated · ×1
  • Collection is structurally changed while it is being enumerated engine/src/build/android/gyp/util/build_utils.py:297 — `unsorted_deps.items()` is a live view over `unsorted_deps` by the `for` on line 297, and line 300 calls `del unsorted_deps[…]` inside the loop body — a change to the size of a dict this file builds. The loop's next step raises `RuntimeError: dictionary changed size during iteration`, so every pass that reaches this call ends the loop by exception and the remaining items are never seen.
Minor — 729 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×544
  • Orphaned file dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_container_transition.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/material/button_bar.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/widgets/sliver_persistent_header.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/widgets/container.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/rendering/debug.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/material/ink_sparkle.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/material/flexible_space_bar.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/widgets/snapshot_widget.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file dev/integration_tests/new_gallery/lib/studies/fortnightly/shared.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter_test/lib/src/test_async_utils.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter_driver/lib/src/extension/extension.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/widgets/text_editing_intents.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/widgets/table.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/gestures/velocity_tracker.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file engine/src/flutter/lib/ui/pointer.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/material/material_button.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/material/tab_controller.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter_tools/lib/src/base/analyze_size.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/rendering/mouse_tracker.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/material/date.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/services/raw_keyboard_macos.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file dev/snippets/lib/src/data_types.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/services/asset_bundle.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/flutter/lib/src/widgets/scroll_configuration.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 519 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart:801 — `!(alignment == ui.PlaceholderAlignment.aboveBaseline || alignment == ui.PlaceholderAlignment.belowBaseline || alignment == ui.PlaceholderAli…` appears character-identically in 2 files — engine/src/flutter/lib/web_ui/lib/src/engine/primitives/paragraph.dart, engine/src/flutter/lib/web_ui/lib/src/engine/web_paragraph/paragraph.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/range_slider.dart:1372 — `!_active && _state.valueIndicatorController.isCompleted` appears character-identically in 2 files — packages/flutter/lib/src/material/range_slider.dart, packages/flutter/lib/src/material/slider.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate engine/src/flutter/lib/ui/channel_buffers.dart:136 — `!_draining && _channelCallbackRecord != null` appears character-identically in 2 files — engine/src/flutter/lib/ui/channel_buffers.dart, engine/src/flutter/lib/web_ui/lib/channel_buffers.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/text_field.dart:1464 — `!_effectiveFocusNode.hasFocus && _effectiveFocusNode.canRequestFocus` appears character-identically in 2 files — packages/flutter/lib/src/cupertino/text_field.dart, packages/flutter/lib/src/material/text_field.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/text_field.dart:1201 — `!_selectionGestureDetectorBuilder.shouldShowSelectionToolbar || !_selectionGestureDetectorBuilder.shouldShowSelectionHandles` appears character-identically in 2 files — packages/flutter/lib/src/cupertino/text_field.dart, packages/flutter/lib/src/material/text_field.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/spell_check_suggestions_toolbar.dart:114 — `!editableTextState.widget.readOnly && !editableTextState.widget.obscureText` appears character-identically in 2 files — packages/flutter/lib/src/cupertino/spell_check_suggestions_toolbar.dart, packages/flutter/lib/src/material/spell_check_suggestions_toolbar.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/text_field.dart:325 — `!expands || (maxLines == null && minLines == null)` appears character-identically in 6 files — packages/flutter/lib/src/cupertino/text_field.dart, packages/flutter/lib/src/cupertino/text_form_field_row.dart, packages/flutter/lib/src/material/text_field.dart, packages/flutter/lib/src/material/text_form_field.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter_tools/lib/src/commands/build_ios_framework.dart:726 — `!force && (gitTagVersion.x == null || gitTagVersion.y == null || gitTagVersion.z == null || gitTagVersion.commits != 0)` appears character-identically in 2 files — packages/flutter_tools/lib/src/commands/build_ios_framework.dart, packages/flutter_tools/lib/src/commands/build_macos_framework.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/text_field.dart:332 — `!identical(textInputAction, TextInputAction.newline) || maxLines == 1 || !identical(keyboardType, TextInputType.text)` appears character-identically in 2 files — packages/flutter/lib/src/cupertino/text_field.dart, packages/flutter/lib/src/material/text_field.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/calendar_date_picker.dart:857 — `!nextDate.isBefore(widget.firstDate) && !nextDate.isAfter(widget.lastDate)` appears character-identically in 2 files — packages/flutter/lib/src/material/calendar_date_picker.dart, packages/flutter/lib/src/material/date_picker.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/rendering/list_wheel_viewport.dart:175 — `!renderChildrenOutsideViewport || clipBehavior == Clip.none` appears character-identically in 2 files — packages/flutter/lib/src/rendering/list_wheel_viewport.dart, packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/button.dart:333 — `!states.contains(WidgetState.disabled) && kIsWeb` appears character-identically in 3 files — packages/flutter/lib/src/cupertino/button.dart, packages/flutter/lib/src/cupertino/menu_anchor.dart, packages/flutter/lib/src/cupertino/radio.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/widgets/selectable_region.dart:2607 — `(a.top - b.top < _kSelectableVerticalComparingThreshold && a.bottom - b.bottom > -_kSelectableVerticalComparingThreshold) || (b.top - a.top …` appears character-identically in 2 files — packages/flutter/lib/src/widgets/selectable_region.dart, packages/flutter/lib/src/widgets/text.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/carousel.dart:1295 — `(itemExtent != null && itemExtentBuilder == null) || (itemExtent == null && itemExtentBuilder != null)` appears character-identically in 2 files — packages/flutter/lib/src/material/carousel.dart, packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/reorderable_list.dart:119 — `(itemExtent == null && prototypeItem == null) || (itemExtent == null && itemExtentBuilder == null) || (prototypeItem == null && itemExtentBu…` appears character-identically in 3 files — packages/flutter/lib/src/material/reorderable_list.dart, packages/flutter/lib/src/widgets/reorderable_list.dart, packages/flutter/lib/src/widgets/scroll_view.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/text_field.dart:321 — `(maxLines == null) || (minLines == null) || (maxLines >= minLines)` appears character-identically in 7 files — packages/flutter/lib/src/cupertino/text_field.dart, packages/flutter/lib/src/cupertino/text_form_field_row.dart, packages/flutter/lib/src/material/selectable_text.dart, packages/flutter/lib/src/material/text_field.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate engine/src/flutter/lib/ui/platform_dispatcher.dart:2628 — `(minWidth <= size.width) && (size.width <= maxWidth) && (minHeight <= size.height) && (size.height <= maxHeight)` appears character-identically in 3 files — engine/src/flutter/lib/ui/platform_dispatcher.dart, engine/src/flutter/lib/web_ui/lib/src/engine/window.dart, packages/flutter/lib/src/rendering/box.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/route.dart:170 — `(nextRoute is! PageRoute<T>) || !nextRoute.fullscreenDialog` appears character-identically in 2 files — packages/flutter/lib/src/cupertino/route.dart, packages/flutter/lib/src/material/page.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/rendering/custom_paint.dart:787 — `(oldChildrenTop <= oldChildrenBottom) && (newChildrenTop <= newChildrenBottom)` appears character-identically in 2 files — packages/flutter/lib/src/rendering/custom_paint.dart, packages/flutter/lib/src/widgets/framework.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/reorderable_list.dart:129 — `(onReorderItem != null && onReorder == null) || (onReorderItem == null && onReorder != null)` appears character-identically in 2 files — packages/flutter/lib/src/material/reorderable_list.dart, packages/flutter/lib/src/widgets/reorderable_list.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/rendering/box.dart:2322 — `(sizedByParent && debugDoingThisResize) || (!sizedByParent && debugDoingThisLayout)` appears character-identically in 2 files — packages/flutter/lib/src/rendering/box.dart, packages/flutter/lib/src/rendering/sliver.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/cupertino/checkbox.dart:384 — `(states.contains(WidgetState.selected) || states.contains(WidgetState.focused)) && !states.contains(WidgetState.disabled)` appears character-identically in 2 files — packages/flutter/lib/src/cupertino/checkbox.dart, packages/flutter/lib/src/cupertino/radio.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/carousel.dart:1464 — `(targetLastIndexForPaint != null && lastIndex >= targetLastIndexForPaint) || constraints.scrollOffset > 0.0` appears character-identically in 2 files — packages/flutter/lib/src/material/carousel.dart, packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate engine/src/flutter/lib/ui/geometry.dart:1306 — `(tlRadiusX == 0.0 || tlRadiusY == 0.0) && (trRadiusX == 0.0 || trRadiusY == 0.0) && (blRadiusX == 0.0 || blRadiusY == 0.0) && (brRadiusX == …` appears character-identically in 2 files — engine/src/flutter/lib/ui/geometry.dart, engine/src/flutter/lib/web_ui/lib/geometry.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/flutter/lib/src/material/carousel.dart:1542 — `(velocity <= 0.0 && metrics.pixels <= metrics.minScrollExtent) || (velocity >= 0.0 && metrics.pixels >= metrics.maxScrollExtent)` appears character-identically in 2 files — packages/flutter/lib/src/material/carousel.dart, packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Disabled test · ×30
  • Disabled test dev/benchmarks/test_apps/stocks/test_driver/stock_view_test.dart:44 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/bots/test/analyze_snippet_code_test.dart:84 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/bots/test/analyze_snippet_code_test.dart:114 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/bots/test/sdk_directory_has_space_test.dart:20 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/integration_tests/android_engine_test/test_driver/platform_view/hybrid_composition_platform_view_main_test.dart:62 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/integration_tests/android_engine_test/test_driver/platform_view/hybrid_composition_platform_view_main_test.dart:81 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/integration_tests/android_views/test_driver/main_test.dart:67 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/integration_tests/flutter_gallery/test/accessibility_test.dart:64 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/integration_tests/flutter_gallery/test/accessibility_test.dart:308 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/tools/test/format_test.dart:95 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test dev/tools/test/format_test.dart:118 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/engine/pointer_binding/event_position_helper_test.dart:195 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/engine/pointer_binding/event_position_helper_test.dart:203 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/engine/text_editing_test.dart:3621 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/ui/paragraph_performance_test.dart:83 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/ui/paragraph_performance_test.dart:92 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/ui/paragraph_performance_test.dart:101 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/ui/paragraph_performance_test.dart:139 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/ui/paragraph_performance_test.dart:173 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/webparagraph/paragraph_performance_test.dart:83 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/webparagraph/paragraph_performance_test.dart:92 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/webparagraph/paragraph_performance_test.dart:101 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/webparagraph/paragraph_performance_test.dart:139 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test engine/src/flutter/lib/web_ui/test/webparagraph/paragraph_performance_test.dart:173 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/flutter/examples/api/test/widgets/text_magnifier/text_magnifier.0_test.dart:108 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • + 5 more in this group — see findings.md.
AX6 · Interface segregation · Fat interface · ×27
  • Fat interface: GalleryLocalizations (802 abstract methods) dev/integration_tests/new_gallery/lib/gallery_localizations.dart:14 — `GalleryLocalizations` declares 802 abstract methods: `githubRepo`, `aboutDialogDescription`, `deselect`, `notSelected`, `select`, `selectable`, `selected`, `signIn`, `bannerDemoText`, `bannerDemoResetText`, `bannerDemoMultipleText`, `bannerDemoLeadingText`, `dismiss`, `backToGallery`, `cardsDemoExplore`, `cardsDemoExploreSemantics`, `cardsDemoShareSemantics`, `cardsDemoTappable`, `cardsDemoTravelDestinationTitle1`, `cardsDemoTravelDestinationDescription1`, `cardsDemoTravelDestinationCity1`, `cardsDemoTravelDestinationLocation1`, `cardsDemoTravelDestinationTitle2`, `cardsDemoTravelDestinationDescription2`, `cardsDemoTravelDestinationCity2`, `cardsDemoTravelDestinationLocation2`, `cardsDemoTravelDestinationTitle3`, `cardsDemoTravelDestinationDescription3`, `homeHeaderGallery`, `homeHeaderCategories`, `shrineDescription`, `fortnightlyDescription`, `rallyDescription`, `replyDescription`, `rallyAccountDataChecking`, `rallyAccountDataHomeSavings`, `rallyAccountDataCarSavings`, `rallyAccountDataVacation`, `rallyAccountDetailDataAnnualPercentageYield`, `rallyAccountDetailDataInterestRate`, and 762 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: CupertinoLocalizations (39 abstract methods) packages/flutter/lib/src/cupertino/localizations.dart:67 — `CupertinoLocalizations` declares 39 abstract methods: `datePickerYear`, `datePickerMonth`, `datePickerStandaloneMonth`, `datePickerDayOfMonth`, `datePickerMediumDate`, `datePickerHour`, `datePickerHourSemanticsLabel`, `datePickerMinute`, `datePickerMinuteSemanticsLabel`, `datePickerDateOrder`, `datePickerDateTimeOrder`, `anteMeridiemAbbreviation`, `postMeridiemAbbreviation`, `todayLabel`, `alertDialogLabel`, `tabSemanticsLabel`, `timerPickerHour`, `timerPickerMinute`, `timerPickerSecond`, `timerPickerHourLabel`, `timerPickerHourLabels`, `timerPickerMinuteLabel`, `timerPickerMinuteLabels`, `timerPickerSecondLabel`, `timerPickerSecondLabels`, `cutButtonLabel`, `copyButtonLabel`, `pasteButtonLabel`, `clearButtonLabel`, `noSpellCheckReplacementsLabel`, `selectAllButtonLabel`, `lookUpButtonLabel`, `searchWebButtonLabel`, `shareButtonLabel`, `searchTextFieldPlaceholderLabel`, `modalBarrierDismissLabel`, `menuDismissLabel`, `cancelButtonLabel`, `backButtonLabel`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ChipAttributes (21 abstract methods) packages/flutter/lib/src/material/chip.dart:52 — `ChipAttributes` declares 21 abstract methods: `label`, `avatar`, `labelStyle`, `side`, `shape`, `clipBehavior`, `focusNode`, `autofocus`, `color`, `backgroundColor`, `padding`, `visualDensity`, `labelPadding`, `materialTapTargetSize`, `elevation`, `shadowColor`, `surfaceTintColor`, `iconTheme`, `avatarBoxConstraints`, `chipAnimationStyle`, `mouseCursor`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: CalendarDelegate (17 abstract methods) packages/flutter/lib/src/material/date.dart:16 — `CalendarDelegate` declares 17 abstract methods: `now`, `dateOnly`, `monthDelta`, `addMonthsToMonthDate`, `addDaysToDate`, `firstDayOffset`, `getDaysInMonth`, `getMonth`, `getDay`, `formatMonthYear`, `formatMediumDate`, `formatShortMonthDay`, `formatShortDate`, `formatFullDate`, `formatCompactDate`, `parseCompactDate`, `dateHelpText`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: MaterialLocalizations (149 abstract methods) packages/flutter/lib/src/material/material_localizations.dart:47 — `MaterialLocalizations` declares 149 abstract methods: `openAppDrawerTooltip`, `backButtonTooltip`, `clearButtonTooltip`, `closeButtonTooltip`, `deleteButtonTooltip`, `moreButtonTooltip`, `nextMonthTooltip`, `previousMonthTooltip`, `firstPageTooltip`, `lastPageTooltip`, `nextPageTooltip`, `previousPageTooltip`, `showMenuTooltip`, `aboutListTileTitle`, `licensesPageTitle`, `licensesPackageDetailText`, `pageRowsInfoTitle`, `rowsPerPageTitle`, `tabLabel`, `selectedRowCountTitle`, `cancelButtonLabel`, `closeButtonLabel`, `continueButtonLabel`, `copyButtonLabel`, `cutButtonLabel`, `scanTextButtonLabel`, `okButtonLabel`, `pasteButtonLabel`, `selectAllButtonLabel`, `lookUpButtonLabel`, `searchWebButtonLabel`, `shareButtonLabel`, `viewLicensesButtonLabel`, `anteMeridiemAbbreviation`, `postMeridiemAbbreviation`, `timePickerHourModeAnnouncement`, `timePickerMinuteModeAnnouncement`, `modalBarrierDismissLabel`, `menuDismissLabel`, `drawerLabel`, and 109 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BuildContext (21 abstract methods) packages/flutter/lib/src/widgets/framework.dart:2223 — `BuildContext` declares 21 abstract methods: `widget`, `owner`, `mounted`, `debugDoingBuild`, `findRenderObject`, `size`, `dependOnInheritedElement`, `dependOnInheritedWidgetOfExactType`, `getInheritedWidgetOfExactType`, `getElementForInheritedWidgetOfExactType`, `findAncestorWidgetOfExactType`, `findAncestorStateOfType`, `findRootAncestorStateOfType`, `findAncestorRenderObjectOfType`, `visitAncestorElements`, `visitChildElements`, `dispatchNotification`, `describeElement`, `describeWidget`, `describeMissingAncestor`, `describeOwnershipChain`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: PaintPattern (25 abstract methods) packages/flutter_test/lib/src/mock_canvas.dart:102 — `PaintPattern` declares 25 abstract methods: `transform`, `translate`, `scale`, `rotate`, `save`, `restore`, `saveRestore`, `clipRect`, `clipPath`, `rect`, `clipRRect`, `rrect`, `drrect`, `rsuperellipse`, `clipRSuperellipse`, `circle`, `path`, `line`, `arc`, `paragraph`, `shadow`, `image`, `drawImageRect`, `something`, `everything`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Terminal (16 abstract methods) packages/flutter_tools/lib/src/base/terminal.dart:69 — `Terminal` declares 16 abstract methods: `supportsColor`, `isCliAnimationEnabled`, `applyFeatureFlags`, `supportsEmoji`, `preferredStyle`, `usesTerminalUi`, `stdinHasTerminal`, `warningMark`, `successMark`, `bolden`, `color`, `clearScreen`, `singleCharMode`, `keystrokes`, `readLine`, `promptForCharInput`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Device (18 abstract methods) packages/flutter_tools/lib/src/device.dart:600 — `Device` declares 18 abstract methods: `name`, `isLocalEmulator`, `emulatorId`, `isSupportedForProject`, `isAppInstalled`, `isLatestBuildInstalled`, `installApp`, `uninstallApp`, `isSupported`, `targetPlatform`, `cpuArch`, `sdkNameAndVersion`, `getLogReader`, `portForwarder`, `clearLogs`, `startApp`, `stopApp`, `dispose`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: FeatureFlags (21 abstract methods) packages/flutter_tools/lib/src/features.dart:15 — `FeatureFlags` declares 21 abstract methods: `isLinuxEnabled`, `isMacOSEnabled`, `isWebEnabled`, `isWindowsEnabled`, `isAndroidEnabled`, `isIOSEnabled`, `isFuchsiaEnabled`, `areCustomDevicesEnabled`, `isCliAnimationEnabled`, `isNativeAssetsEnabled`, `isRecordUseEnabled`, `isSwiftPackageManagerEnabled`, `isOmitLegacyVersionFileEnabled`, `isWindowingEnabled`, `isLLDBDebuggingEnabled`, `isUISceneMigrationEnabled`, `isRiscv64SupportEnabled`, `isMacOSArm64OnlyEnabled`, `isHcppEnabled`, `isToolExtensionsEnabled`, `isEnabled`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: ResidentHandlers (18 abstract methods) packages/flutter_tools/lib/src/resident_runner.dart:554 — `ResidentHandlers` declares 18 abstract methods: `flutterDevices`, `hotMode`, `supportsServiceProtocol`, `isRunningDebug`, `isRunningProfile`, `isRunningRelease`, `stayResident`, `supportsRestart`, `canHotReload`, `supportsDetach`, `reloadIsRestart`, `logger`, `fileSystem`, `printHelp`, `cleanupAfterSignal`, `detach`, `exit`, `runSourceGenerators`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: SceneBuilder (18 abstract methods) engine/src/flutter/lib/ui/compositing.dart:240 — `SceneBuilder` declares 18 abstract methods: `pushTransform`, `pushOffset`, `pushClipRect`, `pushClipRRect`, `pushClipRSuperellipse`, `pushClipPath`, `pushOpacity`, `pushColorFilter`, `pushImageFilter`, `pushBackdropFilter`, `pushShaderMask`, `pop`, `addRetained`, `addPerformanceOverlay`, `addPicture`, `addTexture`, `addPlatformView`, `build`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Path (29 abstract methods) engine/src/flutter/lib/ui/painting.dart:2886 — `Path` declares 29 abstract methods: `fillType`, `moveTo`, `relativeMoveTo`, `lineTo`, `relativeLineTo`, `quadraticBezierTo`, `relativeQuadraticBezierTo`, `cubicTo`, `relativeCubicTo`, `conicTo`, `relativeConicTo`, `arcTo`, `arcToPoint`, `relativeArcToPoint`, `addRect`, `addOval`, `addArc`, `addPolygon`, `addRRect`, `addRSuperellipse`, `addPath`, `extendWithPath`, `close`, `reset`, `contains`, `shift`, `transform`, `getBounds`, `computeMetrics`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Canvas (39 abstract methods) engine/src/flutter/lib/ui/painting.dart:6865 — `Canvas` declares 39 abstract methods: `save`, `saveLayer`, `restore`, `restoreToCount`, `getSaveCount`, `translate`, `scale`, `rotate`, `skew`, `transform`, `getTransform`, `clipRect`, `clipRRect`, `clipRSuperellipse`, `clipPath`, `getLocalClipBounds`, `getDestinationClipBounds`, `drawColor`, `drawLine`, `drawPaint`, `drawRect`, `drawRRect`, `drawDRRect`, `drawRSuperellipse`, `drawOval`, `drawCircle`, `drawArc`, `drawPath`, `drawImage`, `drawImageRect`, `drawImageNine`, `drawPicture`, `drawParagraph`, `drawPoints`, `drawRawPoints`, `drawVertices`, `drawAtlas`, `drawRawAtlas`, `drawShadow`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Paragraph (22 abstract methods) engine/src/flutter/lib/ui/text.dart:3049 — `Paragraph` declares 22 abstract methods: `width`, `height`, `longestLine`, `minIntrinsicWidth`, `maxIntrinsicWidth`, `alphabeticBaseline`, `ideographicBaseline`, `didExceedMaxLines`, `layout`, `getBoxesForRange`, `getBoxesForPlaceholders`, `getPositionForOffset`, `getClosestGlyphInfoForOffset`, `getGlyphInfoAt`, `getWordBoundary`, `getLineBoundary`, `computeLineMetrics`, `getLineMetricsAt`, `numberOfLines`, `getLineNumberAt`, `dispose`, `debugDisposed`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Canvas (39 abstract methods) engine/src/flutter/lib/web_ui/lib/canvas.dart:55 — `Canvas` declares 39 abstract methods: `save`, `saveLayer`, `restore`, `getSaveCount`, `restoreToCount`, `translate`, `scale`, `rotate`, `skew`, `transform`, `getTransform`, `clipRect`, `clipRRect`, `clipRSuperellipse`, `clipPath`, `getLocalClipBounds`, `getDestinationClipBounds`, `drawColor`, `drawLine`, `drawPaint`, `drawRect`, `drawRRect`, `drawRSuperellipse`, `drawDRRect`, `drawOval`, `drawCircle`, `drawArc`, `drawPath`, `drawImage`, `drawImageRect`, `drawImageNine`, `drawPicture`, `drawParagraph`, `drawPoints`, `drawRawPoints`, `drawVertices`, `drawAtlas`, `drawRawAtlas`, `drawShadow`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: SceneBuilder (19 abstract methods) engine/src/flutter/lib/web_ui/lib/compositing.dart:35 — `SceneBuilder` declares 19 abstract methods: `pushOffset`, `pushTransform`, `pushClipRect`, `pushClipRRect`, `pushClipRSuperellipse`, `pushClipPath`, `pushOpacity`, `pushColorFilter`, `pushImageFilter`, `pushBackdropFilter`, `pushShaderMask`, `addRetained`, `pop`, `addPerformanceOverlay`, `addPicture`, `addTexture`, `addPlatformView`, `build`, `setProperties`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: FragmentShader (19 abstract methods) engine/src/flutter/lib/web_ui/lib/painting.dart:1183 — `FragmentShader` declares 19 abstract methods: `setFloat`, `setImageSampler`, `dispose`, `debugDisposed`, `getUniformFloat`, `getUniformVec2`, `getUniformVec3`, `getUniformVec4`, `getUniformMat2`, `getUniformMat3`, `getUniformMat4`, `getUniformFloatArray`, `getUniformVec2Array`, `getUniformVec3Array`, `getUniformVec4Array`, `getUniformMat2Array`, `getUniformMat3Array`, `getUniformMat4Array`, `getImageSampler`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Path (29 abstract methods) engine/src/flutter/lib/web_ui/lib/path.dart:9 — `Path` declares 29 abstract methods: `fillType`, `moveTo`, `relativeMoveTo`, `lineTo`, `relativeLineTo`, `quadraticBezierTo`, `relativeQuadraticBezierTo`, `cubicTo`, `relativeCubicTo`, `conicTo`, `relativeConicTo`, `arcTo`, `arcToPoint`, `relativeArcToPoint`, `addRect`, `addOval`, `addArc`, `addPolygon`, `addRRect`, `addRSuperellipse`, `addPath`, `extendWithPath`, `close`, `reset`, `contains`, `shift`, `transform`, `getBounds`, `computeMetrics`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: PlatformDispatcher (47 abstract methods) engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:30 — `PlatformDispatcher` declares 47 abstract methods: `onPlatformConfigurationChanged`, `displays`, `views`, `view`, `implicitView`, `engineId`, `onMetricsChanged`, `onViewFocusChange`, `requestViewFocusChange`, `onBeginFrame`, `onDrawFrame`, `onPointerDataPacket`, `onKeyData`, `onReportTimings`, `sendPlatformMessage`, `sendPortPlatformMessage`, `registerBackgroundIsolate`, `onPlatformMessage`, `scheduleFrame`, `scheduleWarmUpFrame`, `lineHeightScaleFactorOverride`, `letterSpacingOverride`, `wordSpacingOverride`, `paragraphSpacingOverride`, `accessibilityFeatures`, `onAccessibilityFeaturesChanged`, `updateSemantics`, `locale`, `locales`, `computePlatformResolvedLocale`, `onLocaleChanged`, `alwaysUse24HourFormat`, `textScaleFactor`, `onTextScaleFactorChanged`, `platformBrightness`, `onPlatformBrightnessChanged`, `systemFontFamily`, `onSystemFontFamilyChanged`, `onAlwaysUse24HourFormatChanged`, `semanticsEnabled`, and 7 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BackendCanvas (37 abstract methods) engine/src/flutter/lib/web_ui/lib/src/engine/backend/canvas.dart:16 — `BackendCanvas` declares 37 abstract methods: `save`, `saveLayer`, `saveLayerWithFilter`, `restore`, `restoreToCount`, `getSaveCount`, `translate`, `scale`, `rotate`, `skew`, `transform`, `getTransform`, `clipRect`, `clipRRect`, `clipPath`, `getDestinationClipBounds`, `clear`, `quickReject`, `drawColor`, `drawLine`, `drawPaint`, `drawRect`, `drawRRect`, `drawDRRect`, `drawOval`, `drawCircle`, `drawArc`, `drawPath`, `drawImage`, `drawImageRect`, `drawImageNine`, `drawPicture`, `drawParagraph`, `drawPoints`, `drawVertices`, `drawAtlas`, `drawShadow`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BackendParagraph (21 abstract methods) engine/src/flutter/lib/web_ui/lib/src/engine/backend/paragraph.dart:9 — `BackendParagraph` declares 21 abstract methods: `dispose`, `width`, `height`, `longestLine`, `minIntrinsicWidth`, `maxIntrinsicWidth`, `alphabeticBaseline`, `ideographicBaseline`, `didExceedMaxLines`, `numberOfLines`, `layout`, `getUnresolvedCodePoints`, `getBoxesForPlaceholders`, `getBoxesForRange`, `getPositionForOffset`, `getClosestGlyphInfoForOffset`, `getGlyphInfoAt`, `getWordBoundary`, `computeLineMetrics`, `getLineMetricsAt`, `getLineNumberAt`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BackendPathBuilder (30 abstract methods) engine/src/flutter/lib/web_ui/lib/src/engine/backend/path.dart:26 — `BackendPathBuilder` declares 30 abstract methods: `fillType`, `moveTo`, `relativeMoveTo`, `lineTo`, `relativeLineTo`, `quadraticBezierTo`, `relativeQuadraticBezierTo`, `cubicTo`, `relativeCubicTo`, `conicTo`, `relativeConicTo`, `arcTo`, `arcToPoint`, `relativeArcToPoint`, `addRect`, `addOval`, `addArc`, `addPolygon`, `addRRect`, `addRSuperellipse`, `shiftInPlace`, `transformInPlace`, `addPath`, `extendWithPath`, `close`, `reset`, `contains`, `getBounds`, `build`, `dispose`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: BackendFragmentShader (16 abstract methods) engine/src/flutter/lib/web_ui/lib/src/engine/backend/shader.dart:26 — `BackendFragmentShader` declares 16 abstract methods: `setFloat`, `setImageSampler`, `getUniformFloat`, `getUniformVec2`, `getUniformVec3`, `getUniformVec4`, `getUniformMat2`, `getUniformMat3`, `getUniformMat4`, `getUniformFloatArray`, `getUniformVec2Array`, `getUniformVec3Array`, `getUniformVec4Array`, `getUniformMat2Array`, `getUniformMat3Array`, `getUniformMat4Array`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: Renderer (34 abstract methods) engine/src/flutter/lib/web_ui/lib/src/engine/renderer.dart:20 — `Renderer` declares 34 abstract methods: `rendererTag`, `fontCollection`, `pictureToImageSurface`, `debugResetRasterizer`, `createPaint`, `createVertices`, `createPictureRecorder`, `createCanvas`, `createSceneBuilder`, `createGradientLinear`, `createGradientRadial`, `createGradientConical`, `createGradientSweep`, `createBlurImageFilter`, `createDilateImageFilter`, `createErodeImageFilter`, `createMatrixImageFilter`, `createComposeImageFilter`, `createColorFilterImageFilter`, `createColorFilter`, `createMaskFilter`, `isMultiThreaded`, `supportsResizingAnimatedImages`, `supportsAnimatedImages`, `createAnimatedImage`, `createImageFromImageSource`, `decodeBackendImageFromPixels`, `createImageShader`, `clearFragmentProgramCache`, `createFragmentProgram`, `pathConstructors`, `createParagraphBuilder`, `createWebParagraphPainter`, `dumpDebugInfo`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • + 2 more in this group — see findings.md.
D19 · Documentation Quality · Documentation · ×25
  • Documentation: no build, run or usage example dev/benchmarks/imitation_game_flutter/README.md:1 — `imitation_game_flutter` is a Flutter application (`lib/main.dart`) and neither `dev/benchmarks/imitation_game_flutter/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/forbidden_from_release_tests/README.md:1 — `forbidden_from_release_tests` is runnable (`executables:` or `bin/` in its pub package) and neither `dev/forbidden_from_release_tests/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/android_verified_input/README.md:1 — `android_verified_input` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/android_verified_input/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/channels/README.md:1 — `channels` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/channels/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/data_asset_app/README.md:1 — `data_asset_app` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/data_asset_app/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/flavors/README.md:1 — `flavors` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/flavors/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/flutter_gallery/README.md:1 — `flutter_gallery` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/flutter_gallery/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/ios_add2app_life_cycle/flutterapp/README.md:1 — `flutterapp` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/ios_add2app_life_cycle/flutterapp/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/ios_app_with_extensions/README.md:1 — `ios_app_with_extensions` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/ios_app_with_extensions/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/ios_platform_view_tests/README.md:1 — `ios_platform_view_tests` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/ios_platform_view_tests/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/ios_universal_link/README.md:1 — `ios_universal_link` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/ios_universal_link/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/keyboard_hot_restart/README.md:1 — `keyboard_hot_restart` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/keyboard_hot_restart/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/link_hook/README.md:1 — `link_hook` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `dev/integration_tests/link_hook/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/new_gallery/README.md:1 — `new_gallery` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/new_gallery/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/platform_interaction/README.md:1 — `platform_interaction` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/platform_interaction/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/release_smoke_test/README.md:1 — `release_smoke_test` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/release_smoke_test/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/spell_check/README.md:1 — `spell_check` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/spell_check/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/integration_tests/windows_startup_test/README.md:1 — `windows_startup_test` is a Flutter application (`lib/main.dart`) and neither `dev/integration_tests/windows_startup_test/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/tools/android_driver_extensions/README.md:1 — `android_driver_extensions` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `dev/tools/android_driver_extensions/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example dev/tools/vitool/README.md:1 — `vitool` is runnable (`executables:` or `bin/` in its pub package) and neither `dev/tools/vitool/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example engine/src/flutter/ci/README.md:1 — `ci` is runnable (`executables:` or `bin/` in its pub package) and neither `engine/src/flutter/ci/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example engine/src/flutter/shell/platform/fuchsia/dart_pkg/zircon/README.md:1 — `zircon` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `engine/src/flutter/shell/platform/fuchsia/dart_pkg/zircon/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example engine/src/flutter/sky/packages/sky_engine/README.md:1 — `sky_engine` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `engine/src/flutter/sky/packages/sky_engine/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example engine/src/flutter/testing/benchmark/README.md:1 — `benchmark` is runnable (`executables:` or `bin/` in its pub package) and neither `engine/src/flutter/testing/benchmark/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/flutter/README.md:1 — `flutter` is a published pub package (`pubspec.yaml` without `publish_to: none`) and neither `packages/flutter/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D16 · Bus Factor · Off-boarding risk · ×9
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 52 significant file(s) lose their only recent owner: dev/integration_tests/widget_preview_scaffold/lib/src/widget_preview_rendering.dart, packages/flutter_tools/lib/src/experimental/extension_device_manager.dart, packages/flutter_tools/lib/src/ios/ios_deploy.dart, packages/flutter_tools/lib/src/widget_preview/preview_code_generator.dart, packages/flutter_tools/lib/src/commands/upgrade.dart, packages/flutter_tools/lib/src/experimental/extension_discovery.dart, packages/flutter_tools/packages/flutter_tools_core/lib/src/build.dart, packages/flutter/lib/src/widget_previews/widget_previews.dart (+44 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 8 significant file(s) lose their only recent owner: packages/flutter_tools/lib/src/runner/options/common_options.dart, packages/flutter_tools/lib/src/runner/options/option_descriptor.dart, packages/flutter/lib/src/foundation/persistent_hash_map.dart, packages/flutter/lib/src/widgets/inherited_model.dart, engine/src/flutter/lib/web_ui/lib/src/engine/text/line_breaker.dart, packages/flutter/lib/src/painting/_web_image_info_web.dart, dev/benchmarks/microbenchmarks/lib/foundation/inherited_model_bench.dart, engine/src/flutter/lib/web_ui/lib/src/engine/semantics/list.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 8 significant file(s) lose their only recent owner: engine/src/flutter/lib/gpu/lib/src/formats.dart, engine/src/flutter/lib/gpu/lib/src/context.dart, engine/src/flutter/lib/gpu/lib/src/command_buffer.dart, engine/src/flutter/lib/gpu/lib/src/texture.dart, engine/src/flutter/lib/gpu/lib/src/shader.dart, engine/src/flutter/lib/gpu/lib/src/vertex_layout.dart, engine/src/flutter/lib/gpu/lib/src/shader_library.dart, engine/src/flutter/lib/gpu/lib/src/binding_set.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 8 significant file(s) lose their only recent owner: engine/src/flutter/lib/web_ui/lib/src/engine/image_format_detector.dart, engine/src/flutter/lib/web_ui/lib/src/engine/primitives/shader.dart, engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/fragment_shader.dart, packages/integration_test/lib/integration_test_driver_extended.dart, engine/src/flutter/lib/web_ui/lib/src/engine/primitives/image_filter.dart, packages/integration_test/lib/src/_callback_web.dart, packages/flutter_test/lib/src/image.dart, engine/src/flutter/lib/web_ui/lib/src/engine/canvaskit/picture_recorder.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 7 significant file(s) lose their only recent owner: dev/bots/suite_runners/run_android_hardware_smoke_tests.dart, dev/integration_tests/android_hardware_smoke_test/lib/goldens.dart, dev/integration_tests/android_hardware_smoke_test/android/app/src/main/kotlin/com/example/android_hardware_smoke_test/MainActivity.kt, dev/integration_tests/android_hardware_smoke_test/lib/constants.dart, dev/integration_tests/android_hardware_smoke_test/lib/platform_view.dart, dev/integration_tests/android_hardware_smoke_test/lib/pixel_exact_local_file_comparator.dart, dev/integration_tests/android_hardware_smoke_test/lib/vector_drawings_canvas.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 5 significant file(s) lose their only recent owner: packages/flutter/lib/src/gestures/events.dart, packages/flutter/lib/src/painting/flutter_logo.dart, engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java, packages/flutter/lib/src/widgets/dual_transition_builder.dart, packages/flutter/lib/src/foundation/key.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 5 significant file(s) lose their only recent owner: dev/tools/android_driver_extensions/lib/src/backend/android/adb.dart, engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorView.java, engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/mutatorsstack/FlutterMutatorsStack.java, engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewsControllerDelegator.java, dev/integration_tests/android_engine_test/lib/hcpp/platform_view_cliprect_surfaceview_main.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 4 significant file(s) lose their only recent owner: dev/bots/prepare_package/archive_creator.dart, engine/src/flutter/tools/pkg/engine_build_configs/lib/src/update_compdb.dart, engine/src/flutter/sky/tools/sky_utils.py, engine/src/flutter/shell/platform/darwin/ios/framework/Source/LaunchEngine.swift. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 3 significant file(s) lose their only recent owner: engine/src/flutter/shell/platform/android/io/flutter/view/BaseRoleConfigurator.java, packages/flutter/lib/src/widgets/accessibility_inspector.dart, engine/src/flutter/shell/platform/android/io/flutter/view/SliderRoleConfigurator.java. Pair on, review, or document these before any departure.
IC1 · Incompleteness & stubs · Member throws UnsupportedError · ×7
  • Member throws UnsupportedError dev/devicelab/lib/framework/devices.dart:1160 — `tap`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError dev/devicelab/lib/framework/devices.dart:1165 — `getMemoryStats`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError dev/devicelab/lib/framework/devices.dart:1445 — `getMemoryStats`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError engine/src/flutter/lib/web_ui/lib/painting.dart:902 — `decodeImageFromPixelsSync`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError engine/src/flutter/lib/web_ui/lib/src/engine/layer/layer_scene_builder.dart:232 — `setProperties`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/flutter/lib/src/widgets/pop_scope.dart:175 — `onPopInvoked`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/flutter/lib/src/widgets/widget_inspector.dart:2816 — `createElement`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×5
  • Projects may be oversized for their cohesion packages/flutter/pubspec.yaml:1 — `packages/flutter` (478974 LoC, 2190 module-visible types across 16 directories) overshoots its size bounds. 5 of 63 build unit(s) (Gradle, Python, pub) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion packages/flutter_tools/pubspec.yaml:1 — `packages/flutter_tools` (183213 LoC, 737 module-visible types across 29 directories) overshoots its size bounds. 5 of 63 build unit(s) (Gradle, Python, pub) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion engine/src/flutter/lib/web_ui/pubspec.yaml:1 — `engine/src/flutter/lib/web_ui` (68136 LoC, 1085 module-visible types across 29 directories) overshoots its size bounds. 5 of 63 build unit(s) (Gradle, Python, pub) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion engine/src/flutter/shell/platform/android/build.gradle:1 — `engine/src/flutter/shell/platform/android` (40848 LoC, 279 module-visible types across 30 directories) overshoots its size bounds. 5 of 63 build unit(s) (Gradle, Python, pub) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion engine/src/flutter/pubspec.yaml:1 — `engine/src/flutter` (34387 LoC, 243 module-visible types across 23 directories) overshoots its size bounds. 5 of 63 build unit(s) (Gradle, Python, pub) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×5
  • Diagnostic log message is built whether or not it is wanted packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:646 — `fine` at line 646 is called with an argument built by `command.join('…')` (line 646), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:651 — `fine` at line 651 is called with an argument built by `command.join('…')` (line 652), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart:693 — `fine` at line 693 is called with an argument built by `command.join('…')` (line 693), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted packages/fuchsia_remote_debug_protocol/lib/src/runners/ssh_command_runner.dart:91 — `fine` at line 91 is called with an argument built by `args.join('…')` (line 91), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted dev/devicelab/lib/framework/metrics_result_writer.dart:72 — `fine` at line 72 is called with an argument built by `json.encode(updateRequest)` (line 72), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because fine is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on.
P10 · Library API & versioning · Implementation type on the public API · ×4
  • Implementation type on the public API engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart:1405 — 2 public types in `repository.web_ui` are marked as implementation by their own namespace, folder or name: `HttpFetchResponseImpl` (engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart:1405, name ends in `Impl`), `HttpFetchPayloadImpl` (engine/src/flutter/lib/web_ui/lib/src/engine/dom.dart:1504, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API engine/src/flutter/shell/platform/android/debug/io/flutter/embedding/engine/flags/FlutterEngineFlagsProviderImpl.java:15 — 1 public type in `io.flutter.embedding.engine.flags` is marked as implementation by its own namespace, folder or name: `FlutterEngineFlagsProviderImpl` (engine/src/flutter/shell/platform/android/debug/io/flutter/embedding/engine/flags/FlutterEngineFlagsProviderImpl.java:15, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewRegistryImpl.java:10 — 1 public type in `io.flutter.plugin.platform` is marked as implementation by its own namespace, folder or name: `PlatformViewRegistryImpl` (engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformViewRegistryImpl.java:10, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API packages/flutter_tools/lib/src/isolated/build_targets.dart:17 — 2 public types in `repository.src` are marked as implementation by their own namespace, folder or name: `BuildTargetsImpl` (packages/flutter_tools/lib/src/isolated/build_targets.dart:17, name ends in `Impl`), `FlutterNativeAssetsBuildRunnerImpl` (packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart:594, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×3
  • Hand-rolled JSON/XML parsing via regex packages/flutter_tools/lib/src/macos/build_macos.dart:563 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/flutter_tools/lib/src/ios/simulators.dart:1119 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex dev/devicelab/lib/framework/ios.dart:343 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
D21 · Naming Consistency · `_deviceID` spells `ID` where 700 names in the project spell it `Id` · ×2
  • `_deviceID` spells `ID` where 700 names in the project spell it `Id` packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:15 — 700 of 702 names in project repository.src spell the token `Id` (700 of 702; unit: names in project repository.src containing `Id`). Peers: AndroidSemanticsAction._kActionById (dev/integration_tests/android_semantics_testing/lib/src/constants.dart:135); repository.src.ByNativeIntegerId (dev/tools/android_driver_extensions/lib/src/common.dart:105); MultiPlatformViewWithoutOverlaysScenario.MultiPlatformViewWithoutOverlaysScenario(firstId) (engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:193); MultiPlatformViewWithoutOverlaysScenario.MultiPlatformViewWithoutOverlaysScenario(secondId) (engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:193); MultiPlatformViewWithoutOverlaysScenario.firstId (engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:200). Rename to `_deviceId`. [rule N6]
  • `_deviceID` spells `ID` where 700 names in the project spell it `Id` packages/flutter_tools/lib/src/migrations/lldb_init_migration.dart:31 — 700 of 702 names in project repository.src spell the token `Id` (700 of 702; unit: names in project repository.src containing `Id`). Peers: AndroidSemanticsAction._kActionById (dev/integration_tests/android_semantics_testing/lib/src/constants.dart:135); repository.src.ByNativeIntegerId (dev/tools/android_driver_extensions/lib/src/common.dart:105); MultiPlatformViewWithoutOverlaysScenario.MultiPlatformViewWithoutOverlaysScenario(firstId) (engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:193); MultiPlatformViewWithoutOverlaysScenario.MultiPlatformViewWithoutOverlaysScenario(secondId) (engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:193); MultiPlatformViewWithoutOverlaysScenario.firstId (engine/src/flutter/testing/ios_scenario_app/lib/src/platform_view.dart:200). Rename to `_deviceId`. [rule N6]
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift engine/src/README.md:18 — engine/src/README.md links to `flutter/docs/testing/Testing-the-engine.md`, but `engine/src/flutter/docs/testing/Testing-the-engine.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev/integration_tests/android_hardware_smoke_test/README.md:504 — dev/integration_tests/android_hardware_smoke_test/README.md links to `../../../bots/suite_runners/run_android_hardware_smoke_tests.dart`, but `bots/suite_runners/run_android_hardware_smoke_tests.dart` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 29 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (137 single-owned of 1903 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1903 of the 2840 production source files in this repository met that bar). They are anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (2 file(s)), anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)) (+23 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: packages/flutter/lib/src/painting/borders.dart, packages/flutter/lib/src/painting/stadium_border.dart, dev/bots/luci_resultdb.dart, dev/bots/tool_subsharding.dart, dev/manual_tests/lib/material_arc.dart, dev/integration_tests/new_gallery/lib/demos/material/dialog_demo.dart, packages/flutter/lib/src/widgets/context_menu_button_item.dart, engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateViewController.swift (+29 more).
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found packages/flutter_tools/templates/xcode/ios/custom_application_bundle/Runner.xcodeproj.tmpl/project.pbxproj:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `packages/flutter_tools/templates/xcode/ios/custom_application_bundle/Runner.xcodeproj.tmpl/project.pbxproj` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `_readMacOsKeyCodes` spells `Os` where 18 names in the project spell it `OS` · ×1
  • `_readMacOsKeyCodes` spells `Os` where 18 names in the project spell it `OS` dev/tools/gen_keycodes/lib/logical_key_data.dart:186 — 18 of 19 names in project repository spell the token `OS` (18 of 19; unit: names in project repository containing `OS`). Peers: KeyboardMapsCodeGenerator._macOSScanCodeMap (dev/tools/gen_keycodes/lib/keyboard_maps_code_gen.dart:205); KeyboardMapsCodeGenerator._macOSNumpadMap (dev/tools/gen_keycodes/lib/keyboard_maps_code_gen.dart:219); KeyboardMapsCodeGenerator._macOSFunctionKeyMap (dev/tools/gen_keycodes/lib/keyboard_maps_code_gen.dart:233); KeyboardMapsCodeGenerator._macOSKeyCodeMap (dev/tools/gen_keycodes/lib/keyboard_maps_code_gen.dart:246); KeyboardMapsCodeGenerator._iOSScanCodeMap (dev/tools/gen_keycodes/lib/keyboard_maps_code_gen.dart:257). Rename to `_readMacOSKeyCodes`. [rule N6]
D21 · Naming Consistency · `_suiteID` spells `ID` where 126 names in the project spell it `Id` · ×1
  • `_suiteID` spells `ID` where 126 names in the project spell it `Id` engine/src/flutter/lib/web_ui/dev/test_platform.dart:860 — 126 of 127 names in project repository.web_ui spell the token `Id` (126 of 127; unit: names in project repository.web_ui containing `Id`). Peers: SceneBuilder.pushBackdropFilter(backdropId) (engine/src/flutter/lib/web_ui/lib/compositing.dart:71); SceneBuilder.addTexture(textureId) (engine/src/flutter/lib/web_ui/lib/compositing.dart:93); SceneBuilder.addPlatformView(viewId) (engine/src/flutter/lib/web_ui/lib/compositing.dart:101); PlatformDispatcher.engineId (engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:44); PlatformDispatcher.requestViewFocusChange(viewId) (engine/src/flutter/lib/web_ui/lib/platform_dispatcher.dart:52). Rename to `_suiteId`. [rule N6]
D21 · Naming Consistency · `detailPageFABGutterWidth` spells `FAB` where 23 names in the project spell it `Fab` · ×1
  • `detailPageFABGutterWidth` spells `FAB` where 23 names in the project spell it `Fab` packages/flutter/lib/src/material/about.dart:1533 — 23 of 24 names in project repository.src spell the token `Fab` (23 of 24; unit: names in project repository.src containing `Fab`). Peers: repository.src.StandardFabLocation (packages/flutter/lib/src/material/floating_action_button_location.dart:453); repository.src._StartTopFabLocation (packages/flutter/lib/src/material/floating_action_button_location.dart:704); repository.src._MiniStartTopFabLocation (packages/flutter/lib/src/material/floating_action_button_location.dart:711); repository.src._CenterTopFabLocation (packages/flutter/lib/src/material/floating_action_button_location.dart:719); repository.src._MiniCenterTopFabLocation (packages/flutter/lib/src/material/floating_action_button_location.dart:726). Rename to `detailPageFabGutterWidth`. [rule N6]
D21 · Naming Consistency · `toJSON` spells `JSON` where 141 names in the project spell it `Json` · ×1
  • `toJSON` spells `JSON` where 141 names in the project spell it `Json` packages/flutter/lib/src/services/text_input.dart:1160 — 141 of 142 names in project repository.src spell the token `Json` (141 of 142; unit: names in project repository.src containing `Json`). Peers: EditorTheme.toJson (dev/integration_tests/widget_preview_scaffold/lib/src/dtd/editor_service.dart:172); ThemeChangedEvent.toJson (dev/integration_tests/widget_preview_scaffold/lib/src/dtd/editor_service.dart:193); ActiveLocation.toJson (dev/integration_tests/widget_preview_scaffold/lib/src/dtd/editor_service.dart:230); TextDocument.toJson (dev/integration_tests/widget_preview_scaffold/lib/src/dtd/editor_service.dart:254); EditorSelection.toJson (dev/integration_tests/widget_preview_scaffold/lib/src/dtd/editor_service.dart:287). Rename to `toJson`. [rule N6]
D21 · Naming Consistency · `Dart2JSTarget` spells `JS` where 23 names in the project spell it `Js` · ×1
  • `Dart2JSTarget` spells `JS` where 23 names in the project spell it `Js` packages/flutter_tools/lib/src/build_system/targets/web.dart:270 — 23 of 25 names in project repository.src spell the token `Js` (23 of 25; unit: names in project repository.src containing `Js`). Peers: BuildInfo.BuildInfo(deprecatedJsInterop) (packages/flutter_tools/lib/src/build_info.dart:31); BuildInfo.deprecatedJsInterop (packages/flutter_tools/lib/src/build_info.dart:212); LinkHooks.recordedUsesJsFileName (packages/flutter_tools/lib/src/build_system/targets/native_assets.dart:151); Dart2JSTarget._mainJsRegex (packages/flutter_tools/lib/src/build_system/targets/web.dart:274); Dart2JSTarget._mainJsMapRegex (packages/flutter_tools/lib/src/build_system/targets/web.dart:275). Rename to `Dart2JsTarget`. [rule N6]
D21 · Naming Consistency · `ddcModuleLoaderJS` spells `JS` where 23 names in the project spell it `Js` · ×1
  • `ddcModuleLoaderJS` spells `JS` where 23 names in the project spell it `Js` packages/flutter_tools/lib/src/isolated/devfs_web.dart:456 — 23 of 25 names in project repository.src spell the token `Js` (23 of 25; unit: names in project repository.src containing `Js`). Peers: BuildInfo.BuildInfo(deprecatedJsInterop) (packages/flutter_tools/lib/src/build_info.dart:31); BuildInfo.deprecatedJsInterop (packages/flutter_tools/lib/src/build_info.dart:212); LinkHooks.recordedUsesJsFileName (packages/flutter_tools/lib/src/build_system/targets/native_assets.dart:151); Dart2JSTarget._mainJsRegex (packages/flutter_tools/lib/src/build_system/targets/web.dart:274); Dart2JSTarget._mainJsMapRegex (packages/flutter_tools/lib/src/build_system/targets/web.dart:275). Rename to `ddcModuleLoaderJs`. [rule N6]
D21 · Naming Consistency · `getPotentialSDKFix` spells `SDK` where 29 names in the project spell it `Sdk` · ×1
  • `getPotentialSDKFix` spells `SDK` where 29 names in the project spell it `Sdk` packages/flutter_tools/gradle/src/main/kotlin/DependencyVersionChecker.kt:76 — 29 of 30 names in project gradle spell the token `Sdk` (29 of 30; unit: names in project gradle containing `Sdk`). Peers: AgpCommonExtensionWrapper.compileSdk (packages/flutter_tools/gradle/src/main/kotlin/AgpCommonExtensionWrapper.kt:25); AgpCommonExtensionWrapper.compileSdkPreview (packages/flutter_tools/gradle/src/main/kotlin/AgpCommonExtensionWrapper.kt:44); com.flutter.gradle.CompileSdkVersion (packages/flutter_tools/gradle/src/main/kotlin/CompileSdkVersion.kt:12); DependencyVersionChecker.warnMinSdkVersion (packages/flutter_tools/gradle/src/main/kotlin/DependencyVersionChecker.kt:110); DependencyVersionChecker.errorMinSdkVersion (packages/flutter_tools/gradle/src/main/kotlin/DependencyVersionChecker.kt:113). Rename to `getPotentialSdkFix`. [rule N6]
D24 · Comment Value · redundant comment · ×1
  • redundant comment dev/docs/assets/snippets.js:40 — "Finds a sibling to given element with the given id." repeats the code it sits on: 4 of its 5 words (finds, sibling, element, id) are already in `function findSiblingWithId(element, id)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 544 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: dev/integration_tests/new_gallery/lib/demos/reference/motion_demo_container_transition.dart, packages/flutter/lib/src/material/button_bar.dart, dev/integration_tests/new_gallery/lib/demos/material/sliders_demo.dart, packages/flutter/lib/src/widgets/sliver_persistent_header.dart, packages/flutter/lib/src/widgets/container.dart, packages/flutter/lib/src/rendering/debug.dart, packages/flutter/lib/src/material/ink_sparkle.dart, packages/flutter/lib/src/material/flexible_space_bar.dart (and 536 more) (631 orphaned of 1911 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1911 of the 2840 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M1 · Documentation (README) · Thin README · ×1
  • Thin README README.md:1 — The root README is 18 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 9/86 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `dev/bots`, `dev/customer_testing`, `dev/forbidden_from_release_tests`, `dev/integration_tests/android_engine_test` and 72 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST .github/workflows/cp-trigger.yml:17 — No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 27 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch npm/pip/gradle · ×1
  • Dependabot does not watch npm/pip/gradle REDACTED:5 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `pip`, `gradle`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected dev/docs/firebase.json:1 — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `firebase.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
S1 · Web-Security Posture · No inbound request validation detected · ×1
  • No inbound request validation detected — No handler of this repository's Dart server answers 400, 413 or 422 (`Response.badRequest`, `HttpStatus.badRequest`, `statusCode = 400`) and no validation package (luthor, acanthis, ez_validator, json_schema, …) is imported — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: pubspec.yaml:167 — depends on `shelf`.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch packages/flutter/lib/src/services/process_text.dart:126 — `queryTextActions` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/history-2.json --exit-code 0 --source .1artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=12800" --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/history-3.json --exit-code 0 --source .2artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=17000 --max-count=51200" --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/history-4.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-4.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=68200 --max-count=24611" --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/history-5.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-5.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-c0a4315db7124434a8bad01a3e2d6b06/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude engine/src/flutter/shell/platform/fuchsia/dart_pkg/zircon_ffi/lib --exclude engine/src/flutter/tools/gen_web_locale_keymap/data --exclude packages/flutter/lib/src/material/animated_icons/data --exclude packages/flutter_localizations/lib/fix_data --exclude packages/flutter_tools/templates/add_to_app/darwin/Plugins --exclude packages/flutter_tools/templates/add_to_app/darwin/Tools --exclude packages/flutter_tools/templates/module/android/host_app_editable --exclude packages/flutter_tools/templates/module/android/host_app_ephemeral --exclude packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/src --exclude packages/flutter_tools/templates/plugin/lib/src .11artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .36artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `dev/benchmarks/imitation_game_swiftui/hello_world_swiftui/ContentView.swift`, `engine/src/flutter/skwasm/library_skwasm_support.js` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e89c-71bc-73e1-a8a6-0d2a9057f774 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md