Public report of FriesI23/mhabit, 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 reportMeasured 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, 19:37 UTC · Survey ID cd_61c17a4abbea4404a7fe9bdc1dee534e
FriesI23/mhabit
Measured 17 November 2026, 19:36 UTC, at code version 04e078a
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 0.8 since the last survey
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 large codebase: 101,854 lines of product code in 13 projects, tests not counted · Estimated rebuild effort: about 1.7 person-years · Weakest lens: Production Readiness, 63.1
Findings by how serious they are
106 critical508 serious39 minor
12 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 19:36 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.
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 ▸
56of 56 dimensions measured by tools.
643of 653 findings point to an exact file and line, so you can open each one in the code. The other 10 concern the repository as a whole, such as missing documentation.
56dimensions across 6 lenses, read from 101,854 lines of product code in 13 projects.
FriesI23/mhabit falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 68.9 out of 100 and is rated Adequate, and 104 of its 106 critical findings are security problems.
Production Readiness, at 63.1, is the weakest lens and counts most in the score. The best first step is fixing the password or key in the code, worth about 4.8 points. Fixing the package under a licence on your banned list comes next, worth about 2.9 points. Raising Production Readiness to 70 would lift the score to about 71.1.
Seventy-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Nineteen secrets can leak from the build pipeline, and six pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline. Pinning each tool to an exact version, limiting each secret to its own step and passing outside input through environment variables would close these risks. Updating the vulnerable packages would fix the three packages with a known security hole, and the three pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The package under a licence on your banned list needs replacing, or clearing with your legal team.
The product code is 101,854 lines, about €250,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 forThe 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.
If Production Readiness rose from 63.1 to 70, the lowest score rated Strong, the score would rise from 68.9 to about 71.1.
Code composition: what the lines of code are
Product code 52%Tests 48%
New since the last survey: 168 findings
These 168 critical or serious findings weren't in the previous survey, on 5 November 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · FileTooLong: _widgets/app_support.dart lib/pages/common/_widgets/app_support.dart
God Classes · FileTooLong: app/entry.dart lib/entries/app/entry.dart
Code Duplication · Edited copy of a member (64 corresponding lines) lib/pages/common/_widgets/not_found_image.dart
Code Duplication · Edited copy of a member (38 corresponding lines) lib/pages/habits_display/page_today.dart
Code Duplication · Edited copy of a member (53 corresponding lines) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart
Code Duplication · Edited copy of a member (37 corresponding lines) lib/pages/group_manage/_widgets/group_manage_sliver.dart
Code Duplication · Edited copy of a member (40 corresponding lines) lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart
Code Duplication · Edited copy of a member (46 corresponding lines) lib/pages/app_settings/page.dart
Code Duplication · Edited copy of a member (36 corresponding lines) lib/pages/habits_status_changer/_providers/habit_status_changer.dart
Code Duplication · Edited copy of a member (49 corresponding lines) lib/reminders/notification_service.dart
Code Duplication · Edited copy of a member (43 corresponding lines) lib/pages/habit_detail/_widgets/habit_heatmap.dart
Code Duplication · Edited copies of one member (3 members, 41+ corresponding lines) lib/pages/habits_display/page_habits.dart
Code Duplication · Edited copy of a member (41 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart
Code Duplication · Edited copy of a member (34 corresponding lines) lib/storage/db_helper_builder.dart
Code Duplication · Edited copy of a member (47 corresponding lines) lib/models/_score/score.dart
Code Duplication · Edited copy of a member (33 corresponding lines) lib/pages/group_manage/_widgets/group_manage_grid_item.dart
Code Duplication · Edited copy of a member (29 corresponding lines) lib/pages/habits_display/page_habits.dart
Code Duplication · Edited copy of a member (28 corresponding lines) lib/pages/habits_display/_providers/habits_today.dart
Code Duplication · Edited copy of a member (32 corresponding lines) lib/models/_app_sync_tasks/webdav_app_sync_models.dart
Code Duplication · Edited copy of a member (34 corresponding lines) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart
Code Duplication · Edited copy of a member (47 corresponding lines) lib/reminders/notification_service.dart
Code Duplication · Edited copy of a member (28 corresponding lines) lib/models/habit_summary.dart
Code Duplication · Edited copy of a member (27 corresponding lines) lib/pages/habit_edit/_providers/habit_form.dart
Code Duplication · Edited copy of a member (32 corresponding lines) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart
Code Duplication · Edited copy of a member (34 corresponding lines) lib/providers/workflow/group_manager.dart
Code Duplication · Edited copy of a member (26 corresponding lines) lib/pages/habits_display/page_habits.dart
Code Duplication · Edited copies of one member (6 members, 30+ corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart
Code Duplication · Edited copy of a member (26 corresponding lines) lib/pages/app_date_format/_widgets/app_date_format_settings.dart
Code Duplication · Edited copy of a member (27 corresponding lines) lib/storage/db/handlers/habit.dart
Code Duplication · Edited copy of a member (26 corresponding lines) lib/pages/app_settings/_widgets/app_setting_ui_style.dart
Code Duplication · Edited copy of a member (29 corresponding lines) lib/pages/app_debugger/_widgets/change_logs_switcher_tile.dart
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart
Code Duplication · Edited copy of a member (29 corresponding lines) lib/models/habit_reminder.dart
Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) lib/pages/habits_display/_providers/habit_summary.dart
Code Duplication · Edited copy of a member (22 corresponding lines) lib/pages/group_manage/providers.dart
Code Duplication · Edited copy of a member (27 corresponding lines) lib/widgets/_widgets/month_picker_cell.dart
Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) lib/providers/workflow/habits_file_exporter.dart
Code Duplication · Edited copy of a member (28 corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart
Code Duplication · Edited copy of a member (19 corresponding lines) lib/pages/habits_display/page_habits.dart
Code Duplication · Edited copy of a member (33 corresponding lines) lib/models/_score/score.dart
Code Duplication · Edited copy of a member (27 corresponding lines) lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) lib/pages/habit_edit/_widgets/habit_edit_daily_goal_tile.dart
Code Duplication · Edited copy of a member (26 corresponding lines) lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart
Code Duplication · Edited copy of a member (18 corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart
Code Duplication · Edited copy of a member (19 corresponding lines) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart
Code Duplication · Edited copy of a member (16 corresponding lines) packages/mhabit_adaptive_ui/lib/src/window_control/occlusion_toolbar.dart
Code Duplication · Edited copy of a member (27 corresponding lines) lib/pages/app_sync_server_editor/page.dart
Code Duplication · Edited copy of a member (17 corresponding lines) lib/widgets/_widgets/month_picker_cell.dart
Code Duplication · Edited copy of a member (22 corresponding lines) lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart
Code Duplication · Edited copy of a member (14 corresponding lines) lib/models/cache.dart
Code Duplication · Edited copy of a member (26 corresponding lines) lib/pages/app_settings/_widgets/app_setting_display_op_tile.dart
Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart
Code Duplication · Edited copy of a member (13 corresponding lines) lib/reminders/providers/noti_app_sync_provider.dart
Code Duplication · Edited copy of a member (26 corresponding lines) lib/widgets/_widgets/adaptive_confirm_dialog.dart
Code Duplication · Edited copy of a member (19 corresponding lines) lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart
Code Duplication · Edited copy of a member (20 corresponding lines) lib/pages/app_settings/_widgets/app_setting_theme_color.dart
Code Duplication · Edited copy of a member (16 corresponding lines) lib/pages/habits_display/page_habits.dart
Code Duplication · Edited copy of a member (23 corresponding lines) packages/mhabit_color_builder/lib/custom_color_builder.dart
Code Duplication · Edited copy of a member (19 corresponding lines) lib/pages/common/_widgets/habit_record_number_picker.dart
Code Duplication · Edited copy of a member (20 corresponding lines) packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_modal_content.dart
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) lib/logging/loggers/text_logger.dart
Code Duplication · Edited copy of a member (24 corresponding lines) packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar_actions.dart
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart
Code Duplication · Edited copies of one member (6 members, 15+ corresponding lines) lib/pages/app_date_format/_widgets/app_date_format_settings.dart
Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) lib/pages/app_sync_server_editor/page.dart
Code Duplication · Edited copy of a member (23 corresponding lines) lib/pages/group_manage/_providers/group_manage.dart
Code Duplication · Edited copy of a member (23 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart
Code Duplication · Edited copy of a member (20 corresponding lines) lib/widgets/_widgets/group_color_picker.dart
Code Duplication · Edited copy of a member (22 corresponding lines) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_app_bar.dart
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) lib/pages/app_about/_widgets/app_about_contact_email_tile.dart
Code Duplication · Edited copy of a member (16 corresponding lines) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart
Code Duplication · Edited copy of a member (20 corresponding lines) lib/pages/common/_widgets/sync_now_tile.dart
Code Duplication · Edited copy of a member (20 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart
Code Duplication · Edited copy of a member (16 corresponding lines) lib/pages/app_sync/_widgets/app_sync_app_bar.dart
Code Duplication · Edited copy of a member (16 corresponding lines) lib/pages/group_manage/_widgets/group_manage_item_actions.dart
Code Duplication · Edited copy of a member (15 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart
Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) lib/providers/workflow/app_reminder.dart
Code Duplication · Edited copy of a member (11 corresponding lines) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart
Code Duplication · Edited copy of a member (18 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart
Code Duplication · Edited copy of a member (15 corresponding lines) lib/pages/habits_display/page_today.dart
Code Duplication · Edited copy of a member (13 corresponding lines) lib/pages/habit_edit/_widgets/habit_edit_frequency_tile.dart
Code Duplication · Edited copy of a member (14 corresponding lines) lib/storage/db/handlers/group.dart
Code Duplication · Edited copy of a member (12 corresponding lines) lib/pages/app_sync_server_editor/_widgets/app_sync_server_path.dart
Code Duplication · Edited copy of a member (9 corresponding lines) lib/models/cache.dart
Code Duplication · Edited copy of a member (18 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart
Code Duplication · Edited copy of a member (14 corresponding lines) lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart
Code Duplication · Edited copy of a member (12 corresponding lines) lib/models/habit_export.dart
Code Duplication · Edited copy of a member (16 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart
Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) lib/reminders/providers/noti_app_sync_provider.dart
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) lib/models/app_event.dart
Code Duplication · Edited copy of a member (17 corresponding lines) lib/pages/app_settings/_widgets/app_setting_display_op_tile.dart
Code Duplication · Edited copy of a member (17 corresponding lines) packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart
Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) lib/pages/app_about/_widgets/app_about_donate_tile.dart
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) lib/storage/db/handlers/habit.dart
Code Duplication · Edited copy of a member (12 corresponding lines) lib/pages/habit_edit/page.dart
Code Duplication · Edited copy of a member (8 corresponding lines) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart
Code Duplication · Edited copy of a member (11 corresponding lines) lib/pages/app_settings/page.dart
Code Duplication · Edited copy of a member (12 corresponding lines) lib/pages/app_sync_server_editor/_providers/app_sync_server_form.dart
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 6 findings
These 6 critical or serious findings were in the previous survey, on 5 November 2026, and are gone from this one.
€84,000 to €420,000, for 1,398 to 4,434 hours of work, about 1.7 person-years for 1 to 4 engineers
Difficulty of the problem
Standard, 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
×1.0 at a score of 69. 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.
Size
Large: 101,854 lines of product code
What it is not
Not 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
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 4.8 points · Low effort · Secret Scanning
2
Resolve the 1 Banned license finding(s) in License Compliance.
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.
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 €250,000 to build again, about 1.7 person-years of work. Its weakest lens is Production Readiness, at 63.1 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4.8 points for low effort, because it clears the 1 Secret Scanning findings. 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 7.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 171,990 lines over the last 90 days, which is about 697,515 lines a year. At that pace, the extra work comes to an estimated 34.9 to 232.5 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.
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.
23 modules, with 49 dependencies between them. One loop runs through 7 of the modules, marked above the diagonal.
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.
2 pairs of types, where a type in repository uses a type in packages~mhabit_desktop_window_chrome~macos~mhabit_desktop_window_chrome~mhabit_desktop_window_chrome.
repository uses packages~mhabit_desktop_window_chrome~macos~mhabit_desktop_window_chrome~mhabit_desktop_window_chrome, so a change to packages~mhabit_desktop_window_chrome~macos~mhabit_desktop_window_chrome~mhabit_desktop_window_chrome can break repository, while a change to repository can't break packages~mhabit_desktop_window_chrome~macos~mhabit_desktop_window_chrome~mhabit_desktop_window_chrome.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
repository.logging uses repository.common, so a change to repository.common can break repository.logging, while a change to repository.logging can't break repository.common.
Position
Below the diagonal: repository.logging uses a module listed above it, which is the healthy direction.
11→18 repository.logging uses repository.modelspart of a loop✕
Connections
2 pairs of types, where a type in repository.logging uses a type in repository.models.
repository.logging uses repository.models, so a change to repository.models can break repository.logging, while a change to repository.logging can't break repository.models.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository.reminders uses repository.common, so a change to repository.common can break repository.reminders, while a change to repository.reminders can't break repository.common.
Position
Below the diagonal: repository.reminders uses a module listed above it, which is the healthy direction.
12→18 repository.reminders uses repository.modelspart of a loop✕
Connections
13 pairs of types, where a type in repository.reminders uses a type in repository.models.
repository.reminders uses repository.models, so a change to repository.models can break repository.reminders, while a change to repository.reminders can't break repository.models.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository.theme uses repository.common, so a change to repository.common can break repository.theme, while a change to repository.theme can't break repository.common.
Position
Below the diagonal: repository.theme uses a module listed above it, which is the healthy direction.
13→18 repository.theme uses repository.modelspart of a loop✕
Connections
1 pair of types, where a type in repository.theme uses a type in repository.models.
repository.theme uses repository.models, so a change to repository.models can break repository.theme, while a change to repository.theme can't break repository.models.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository.utils uses repository.common, so a change to repository.common can break repository.utils, while a change to repository.utils can't break repository.common.
Position
Below the diagonal: repository.utils uses a module listed above it, which is the healthy direction.
14→18 repository.utils uses repository.modelspart of a loop✕
Connections
1 pair of types, where a type in repository.utils uses a type in repository.models.
repository.utils uses repository.models, so a change to repository.models can break repository.utils, while a change to repository.utils can't break repository.models.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository.providers uses repository.common, so a change to repository.common can break repository.providers, while a change to repository.providers can't break repository.common.
Position
Below the diagonal: repository.providers uses a module listed above it, which is the healthy direction.
repository.providers uses repository.logging, so a change to repository.logging can break repository.providers, while a change to repository.providers can't break repository.logging.
Position
Below the diagonal: repository.providers uses a module listed above it, which is the healthy direction.
repository.providers uses repository.reminders, so a change to repository.reminders can break repository.providers, while a change to repository.providers can't break repository.reminders.
Position
Below the diagonal: repository.providers uses a module listed above it, which is the healthy direction.
repository.providers uses repository.theme, so a change to repository.theme can break repository.providers, while a change to repository.providers can't break repository.theme.
Position
Below the diagonal: repository.providers uses a module listed above it, which is the healthy direction.
repository.providers uses repository.utils, so a change to repository.utils can break repository.providers, while a change to repository.providers can't break repository.utils.
Position
Below the diagonal: repository.providers uses a module listed above it, which is the healthy direction.
repository.providers uses repository.src, so a change to repository.src can break repository.providers, while a change to repository.providers can't break repository.src.
Position
Below the diagonal: repository.providers uses a module listed above it, which is the healthy direction.
16→17 repository.providers uses repository.storagepart of a loop✕
Connections
28 pairs of types, where a type in repository.providers uses a type in repository.storage. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository.providers uses repository.storage, so a change to repository.storage can break repository.providers, while a change to repository.providers can't break repository.storage.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→18 repository.providers uses repository.modelspart of a loop✕
Connections
43 pairs of types, where a type in repository.providers uses a type in repository.models. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository.providers uses repository.models, so a change to repository.models can break repository.providers, while a change to repository.providers can't break repository.models.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository.storage uses repository.common, so a change to repository.common can break repository.storage, while a change to repository.storage can't break repository.common.
Position
Below the diagonal: repository.storage uses a module listed above it, which is the healthy direction.
repository.storage uses repository.src, so a change to repository.src can break repository.storage, while a change to repository.storage can't break repository.src.
Position
Below the diagonal: repository.storage uses a module listed above it, which is the healthy direction.
repository.storage uses repository.providers, so a change to repository.providers can break repository.storage, while a change to repository.storage can't break repository.providers.
Position
Below the diagonal: repository.storage uses a module listed above it, which is the healthy direction.
17→18 repository.storage uses repository.modelspart of a loop✕
Connections
11 pairs of types, where a type in repository.storage uses a type in repository.models.
repository.storage uses repository.models, so a change to repository.models can break repository.storage, while a change to repository.storage can't break repository.models.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository.models uses repository.common, so a change to repository.common can break repository.models, while a change to repository.models can't break repository.common.
Position
Below the diagonal: repository.models uses a module listed above it, which is the healthy direction.
repository.models uses repository.extensions, so a change to repository.extensions can break repository.models, while a change to repository.models can't break repository.extensions.
Position
Below the diagonal: repository.models uses a module listed above it, which is the healthy direction.
repository.models uses repository.reminders, so a change to repository.reminders can break repository.models, while a change to repository.models can't break repository.reminders.
Position
Below the diagonal: repository.models uses a module listed above it, which is the healthy direction.
repository.models uses repository.src, so a change to repository.src can break repository.models, while a change to repository.models can't break repository.src.
Position
Below the diagonal: repository.models uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in repository.models uses a type in repository.storage. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository.models uses repository.storage, so a change to repository.storage can break repository.models, while a change to repository.models can't break repository.storage.
Position
Below the diagonal: repository.models uses a module listed above it, which is the healthy direction.
repository.annotations uses repository.models, so a change to repository.models can break repository.annotations, while a change to repository.annotations can't break repository.models.
Position
Below the diagonal: repository.annotations uses a module listed above it, which is the healthy direction.
repository.routes uses repository.src, so a change to repository.src can break repository.routes, while a change to repository.routes can't break repository.src.
Position
Below the diagonal: repository.routes uses a module listed above it, which is the healthy direction.
repository.routes uses repository.providers, so a change to repository.providers can break repository.routes, while a change to repository.routes can't break repository.providers.
Position
Below the diagonal: repository.routes uses a module listed above it, which is the healthy direction.
repository.routes uses repository.models, so a change to repository.models can break repository.routes, while a change to repository.routes can't break repository.models.
Position
Below the diagonal: repository.routes uses a module listed above it, which is the healthy direction.
repository.widgets uses repository.theme, so a change to repository.theme can break repository.widgets, while a change to repository.widgets can't break repository.theme.
Position
Below the diagonal: repository.widgets uses a module listed above it, which is the healthy direction.
repository.widgets uses repository.providers, so a change to repository.providers can break repository.widgets, while a change to repository.widgets can't break repository.providers.
Position
Below the diagonal: repository.widgets uses a module listed above it, which is the healthy direction.
repository.widgets uses repository.models, so a change to repository.models can break repository.widgets, while a change to repository.widgets can't break repository.models.
Position
Below the diagonal: repository.widgets uses a module listed above it, which is the healthy direction.
repository.pages uses repository.common, so a change to repository.common can break repository.pages, while a change to repository.pages can't break repository.common.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.pages uses repository.logging, so a change to repository.logging can break repository.pages, while a change to repository.pages can't break repository.logging.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.pages uses repository.theme, so a change to repository.theme can break repository.pages, while a change to repository.pages can't break repository.theme.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.pages uses repository.src, so a change to repository.src can break repository.pages, while a change to repository.pages can't break repository.src.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
58 pairs of types, where a type in repository.pages uses a type in repository.providers. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository.pages uses repository.providers, so a change to repository.providers can break repository.pages, while a change to repository.pages can't break repository.providers.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.pages uses repository.storage, so a change to repository.storage can break repository.pages, while a change to repository.pages can't break repository.storage.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
188 pairs of types, where a type in repository.pages uses a type in repository.models. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
repository.pages uses repository.models, so a change to repository.models can break repository.pages, while a change to repository.pages can't break repository.models.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.pages uses repository.routes, so a change to repository.routes can break repository.pages, while a change to repository.pages can't break repository.routes.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.pages uses repository.widgets, so a change to repository.widgets can break repository.pages, while a change to repository.pages can't break repository.widgets.
Position
Below the diagonal: repository.pages uses a module listed above it, which is the healthy direction.
repository.entries uses repository, so a change to repository can break repository.entries, while a change to repository.entries can't break repository.
Position
Below the diagonal: repository.entries uses a module listed above it, which is the healthy direction.
repository.entries uses repository.src, so a change to repository.src can break repository.entries, while a change to repository.entries can't break repository.src.
Position
Below the diagonal: repository.entries uses a module listed above it, which is the healthy direction.
repository.entries uses repository.providers, so a change to repository.providers can break repository.entries, while a change to repository.entries can't break repository.providers.
Position
Below the diagonal: repository.entries uses a module listed above it, which is the healthy direction.
repository.entries uses repository.models, so a change to repository.models can break repository.entries, while a change to repository.entries can't break repository.models.
Position
Below the diagonal: repository.entries uses a module listed above it, which is the healthy direction.
repository.entries uses repository.routes, so a change to repository.routes can break repository.entries, while a change to repository.entries can't break repository.routes.
Position
Below the diagonal: repository.entries uses a module listed above it, which is the healthy direction.
repository.entries uses repository.pages, so a change to repository.pages can break repository.entries, while a change to repository.entries can't break repository.pages.
Position
Below the diagonal: repository.entries uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
100
High / Critical
A03:2025 — Software Supply Chain Failures
23
High / Critical
A07:2025 — Authentication Failures
1
High / Critical
Roadmap
Top priorities: Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED; 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; Resolve the 1 Banned license finding(s) in License Compliance.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
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.
Resolve the 2 `_groupUuidMapping` spells `Uuid` where 26 names in the project spell it… finding(s) in Naming Consistency — start with habit_import.dart (2).
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 — 106
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 — 508
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 — 39
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 12
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 56 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 — 56 dimensions across the health lenses
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
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, 643 of 653 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
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: the Python half could not be measured — the pytest suite ran no test, so nothing was measured (its dependency install failed (pip exit 1: Failed building wheel for mhabit-python-scripts), so its suite was not run against dependencies it does not declare). Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
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) 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.
D14 License Compliance — 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 declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its pub package dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — 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 declares a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems), but the licence verdict published here was taken over its pub package dependencies. Nothing was read about its Bundler dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (60 contributor(s) across 1198 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 59 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
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. 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 — 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
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. `ios/HabitWidget/App/HabitWidgetActionRunner.swift`, `ios/HabitWidget/Extension/HabitWidget.swift`, `ios/HabitWidget/Shared/HabitWidgetActionIntent.swift`, `ios/HabitWidget/Shared/HabitWidgetConfiguration.swift`, `ios/HabitWidget/Shared/HabitWidgetHold.swift`, … (+5 more) 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.
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: a native UI project (pubspec.yaml). 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).
C1 Data Protection — 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. 'package:sqflite_common_ffi' is imported (lib/utils/app_path_provider.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C3 Audit Trail — 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. 'package:sqflite_common_ffi' is imported (lib/utils/app_path_provider.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C4 Data Retention — 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. 'package:sqflite_common_ffi' is imported (lib/utils/app_path_provider.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C5 Data-Subject Rights — 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. 'package:sqflite_common_ffi' is imported (lib/utils/app_path_provider.dart:19), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
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.
X2 Cancellation propagation — 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 reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
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.
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.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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.
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.
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.
31 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was _PageState.build at 42. A further 1 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 HabitWidgetText.englishDefault at 28 — they are counted neither in the figure above nor in this dimension's score.
+ 26 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with _PageState.build (cyclomatic 42), _PageState.build (cyclomatic 41), _DatePickerDialogState.build (cyclomatic 32). — 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 3 together lifts Cyclomatic Complexity from 6.9 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 36 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 41 bodies over 15 down to 15 or less in Cognitive Complexity — start with HabitWidgetService.perform (cognitive 55), _PageState.build (cognitive 43), _PageState.build (cognitive 42). — 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 41 together lifts Cognitive Complexity from 6.6 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.2 / 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.
Resolve the 23 FileTooLong finding(s) in God Classes — start with page.dart (3), habit_summary.dart (2), page_habits.dart. — One of this dimension's main actionable groups (23 warning-level).
Resolve the 18 MethodTooLong finding(s) in God Classes — start with page.dart (3), date_picker.dart (2), cupertino_navigation_shell.dart. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 12 TooManyMethods finding(s) in God Classes — start with habit_summary.dart (2), habit_detail.dart, page_habits.dart. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
109 duplicated block group(s) detected. 8.0 % of the production lines (8,145 of 101,854) are in a reported copy. A further 155 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (12 corresponding lines) · ×11lib/pages/app_sync_server_editor/_widgets/app_sync_server_path.dart:70
Edited copy of a member (9 corresponding lines) · ×11lib/models/cache.dart:40
Edited copy of a member (26 corresponding lines) · ×6lib/pages/habits_display/page_habits.dart:408
+ 102 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with app_sync_logger.dart (5), page.dart (2), app_sync_server_path.dart. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 11 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with app_sync_server_form_input.dart (2), cache.dart, page.dart. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 8 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with app_event.dart, app_about_license_thirdparty_tile.dart, group_edit_form.dart. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.5 / 10Strong✓ 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.
11 production modules (Gradle+SwiftPM+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; 2 module(s) off the main sequence, with abstractness counted on 9 of the 11 (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: mhabit_color_annotation · ×2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 39 Low cohesion finding(s) in Cohesion (LCOM4) — start with page.dart (3), date_picker.dart (3), score.dart (2). — One of this dimension's main actionable groups (39 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
2 outdated direct gem(s), 0 pinning defect(s). 5 declaration(s) graded against rubygems.org, 5 of them against a version resolved in a committed REDACTED. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Outdated: dotenv · ×2
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
1 of 243 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 17 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 53 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one. 3 of them carry no licence pub.dev recognises; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's pub package dependencies and nothing else. The repository also declares a Gradle build (build.gradle/build.gradle.kts) and a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
Banned license: win2iana_tz_converter
What to do
Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Top hotspots: lib/pages/app_settings/page.dart (12×42=504); lib/pages/habit_detail/page.dart (6×41=246); packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart (10×17=170) Repeated repair below the complexity floor: packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart (4 of 6 changes were fixes); lib/pages/habits_display/_providers/habit_summary.dart (4 of 5 changes were fixes); lib/common/app_info.dart (3 of 5 changes were fixes)
Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with page.dart (2), cupertino_sliver_select_app_bar.dart, cupertino_adaptive_modal.dart. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 4 Repeated repair finding(s) in Churn × Complexity Hotspots — start with cupertino_floating_surface.dart, habit_summary.dart, app_info.dart. — 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.
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.
28 deducted task-comment markers across 101854 LoC (0.0/KLoC) → score 9.9. 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.
Resolve the 25 TodoComment finding(s) in Explicit Debt — start with consts.dart (5), page.dart (3), habit_color_picker.dart (2). — One of this dimension's main actionable groups (25 warning-level).
Resolve the 3 FixmeComment finding(s) in Explicit Debt — start with adaptive_modal_material_bridge.dart, filterable_menu_field.dart, webdav_app_sync_task.dart. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
2 of 2 documentation facets pass in full. 31 document(s) read across 12 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
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.
No ADRs foundmacos/Runner.xcodeproj/project.pbxproj:1
What to do
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.
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.
2 naming inconsistencies among 28 declarations measured against a convention their peers follow.
`_groupUuidMapping` spells `Uuid` where 26 names in the project spell it `UUID` · ×2lib/models/habit_import.dart:27
What to do
Resolve the 2 `_groupUuidMapping` spells `Uuid` where 26 names in the project spell it… finding(s) in Naming Consistency — start with habit_import.dart (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
2 of 13 build units (Bundler, Gradle, Python, SwiftPM, pub) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×2pubspec.yaml:1
What to do
Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with pubspec.yaml (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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).
100 finding(s): 0 critical, 100 high, 0 medium, 0 low. 66 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 5 file(s) — `.github/scripts/pr-test-build-dedup.sh` (lines 8–107), `android/gradlew` (line 74, line 181), `macos/RunnerTests/RunnerTests.swift` (line 65), `tools/config/screenshot_seed.yaml`, `tools/config/screenshot_seed_natural_sort.yaml` — 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 7 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
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (4), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED, REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 4 REDACTED finding(s) charged to Static Analysis (SAST) — the other 66 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (70 issue-level, 4 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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 REDACTED 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.
Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 393 of the 675 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 4 Change coupling finding(s) in Change Coupling — start with habit_edit_repl_rcd_cal.dart (2), page.dart (2). — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 8 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.
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.
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.
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.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
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.
`AppLoggerMananger` declares 21 abstract methods: `logger`, `debugger`, `build`, `value`, `navi`, `db`, `profile`, `load`, `notify`, `import`, `export`, `habit`, `habitWidget`, `network`, `json`, `l10n`, `cache`, `appsync`, `appsynctask`, `changeLogger`, `changeLoggerByType`. 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. — lib/logging/logger_manager.dart:31
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ 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.
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.
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.
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.
`_decodeChildFromPayload` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — lib/reminders/notification_data.dart:61
`toJson`'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. — lib/annotations/_json_converters/contributor_converter.dart:90
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.
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.
What to do
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.
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.
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.
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.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
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.
Do you agree with this assessment?
P2 · Observability5.5 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `macos`, `packages/mhabit_desktop_window_chrome`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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.
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 17 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. — REDACTED:4
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `pip`, `gitsubmodule`, 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:2
What to do
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 `pip`, `gitsubmodule` — 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.
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.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
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.
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.
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.
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.
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.
`_HabitEditReplacementRecordCalendarDialog` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_heatmapScrollController` itself (line 86, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_heatmapScrollController.dispose()`, 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, `ScrollController` 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: `_heatmapScrollController.dispose();` in `dispose()` before `super.dispose()`. — lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:86
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.
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.
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.
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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — 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.
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.
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. (×2) — packages/mhabit_desktop_window_chrome/lib/src/desktop_window_chrome.dart:93, packages/mhabit_desktop_window_chrome/lib/src/desktop_window_title_bar.dart:145
`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. (×3) — packages/mhabit_desktop_window_chrome/lib/src/desktop_window_title_bar.dart:121, lib/storage/db/db_helper.dart:522, lib/models/_app_sync_tasks/webdav_app_sync_models.dart:58
`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. — android/app/src/main/kotlin/io/github/friesi23/mhabit/AnimationScaleStreamHandler.kt:70
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
Unscored — 2 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.
X10 Duplicated predicate — 20 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 — 4 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.
C3 Audit Trail — Not assessed: this repository stores data through 'package:sqflite_common_ffi' (lib/utils/app_path_provider.dart:19) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
C4 Data Retention — Not assessed: this repository stores data through 'package:sqflite_common_ffi' (lib/utils/app_path_provider.dart:19) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
C5 Data-Subject Rights — Not assessed: this repository stores data through 'package:sqflite_common_ffi' (lib/utils/app_path_provider.dart:19) but declares no persisted model this check reads (Drift tables, ObjectBox/Floor @Entity, Isar @collection and Hive @HiveType classes, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 56 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 web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. 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 class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state 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.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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 — Not assessed: this repository stores data through 'package:sqflite_common_ffi' (lib/utils/app_path_provider.dart:19) but declares no persisted model this check reads (Drift tables, Isar/ObjectBox/Floor/Hive entities, Serverpod table models). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server another machine can reach (no HttpServer or shelf server bound beyond loopback, no dart_frog route, no Serverpod endpoint, no Conduit, Alfred or Angel application) and keeps no data in a hosted backend. Access control is therefore N/A here — a Flutter app or pub package is authorized by the server it calls, not by itself; hiding a screen authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
D10 Test Quality — ~95753 lines of test source are present (.dart) 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
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
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"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .dart, .kt, .py, .rb, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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.
D32 Data Compliance (PII/GDPR) — 10 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 — Python suite
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
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 — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Dart, JVM, Ruby, Swift source, so there is no service whose uptime a failing dependency could take down
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for classes extending benchmark_harness's `BenchmarkBase`, `AsyncBenchmarkBase` or `PerfBenchmarkBase` (directly or through a base of your own), `benchmark(…)` calls under the pub `benchmark` package, Flutter's `benchmarkWidgets`, `watchPerformance` or `traceAction` in a test importing flutter_test, integration_test or flutter_driver, or benchmark_harness, benchmark or web_benchmarks in a pubspec.yaml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
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.
S1 Web-Security Posture — No web surface: 649 Dart file(s) were read for weak hashes and ciphers, key material fixed in the source and disabled TLS certificate validation, and none was found. This repository serves no HTTP of its own — no server framework among its pubspec dependencies, no `HttpServer` bound and no shelf, dart_frog or serverpod import in its production source or `bin/`, no web build target — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — 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.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Dart was read, and it logs through none: package:logging, package:logger, talker and dart:developer take one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. Sentry's structured logs (`Sentry.logger`) would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Banned license: win2iana_tz_converter — `win2iana_tz_converter` 0.1.3 is resolved by this repository's pubspec.lock outside its dev_dependencies, and every licence pub.dev detected in it is one this policy bans (`lgpl-3.0`). Where a package carries several licences it is charged only when all of them are banned. Replace the package, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Boundary-crossing change coupling: REDACTED ↔ page.dart REDACTED:1— `REDACTED` (context models) and `lib/pages/app_sync/page.dart` (context pages) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 7 shared commits counted here, the most recent 3 are `e12793f9` feat: replace DateTime.now() with AppClock().now() (#430); `22b01841` feat: add pre-config confirm process (at that commit the files were still `lib/model/app_sync_server.dart` and `lib/view/page_app_sync.dart`); `04d653c7` feat: add delete server process (at that commit the files were still `lib/model/app_sync_server.dart` and `lib/view/page_app_sync.dart`) — run `git show` on any of them.
Low cohesion: _PageState (LCOM4 18) lib/pages/app_settings/page.dart:106— _PageState's methods fall into 18 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 18 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: HabitsTabPageState (LCOM4 18) lib/pages/habits_display/page_habits.dart:84— HabitsTabPageState's methods fall into 18 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 18 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: NotificationServiceImpl (LCOM4 11) lib/reminders/notification_service.dart:103— NotificationServiceImpl's methods fall into 11 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 11 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: HabitsManager (LCOM4 9) lib/providers/workflow/habits_manager.dart:391— HabitsManager's methods fall into 9 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 9 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: _PageState (LCOM4 8) lib/pages/habit_edit/page.dart:81— _PageState's methods fall into 8 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 8 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: HabitDetailViewModel (LCOM4 7) lib/pages/habit_detail/_providers/habit_detail.dart:104— HabitDetailViewModel's methods fall into 7 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 7 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: CupertinoAdaptiveModalRoute (LCOM4 7) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:162— CupertinoAdaptiveModalRoute's methods fall into 7 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 7 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: NormalHabitScore (LCOM4 6) lib/models/_score/score.dart:75— NormalHabitScore's methods fall into 6 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 6 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: NegativeHabitScore (LCOM4 6) lib/models/_score/score.dart:245— NegativeHabitScore's methods fall into 6 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 6 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: _AppLoggerManager (LCOM4 5) lib/logging/logger_manager.dart:128— _AppLoggerManager's methods fall into 5 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 5 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: LoopCsvImporter (LCOM4 5) lib/models/loop_import.dart:73— LoopCsvImporter's methods fall into 5 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 5 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: AppSyncServerFormViewModel (LCOM4 5) lib/pages/app_sync_server_editor/_providers/app_sync_server_form.dart:26— AppSyncServerFormViewModel's methods fall into 5 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 5 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: _PageState (LCOM4 5) lib/pages/group_manage/page.dart:51— _PageState's methods fall into 5 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 5 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: TodayTabPageState (LCOM4 5) lib/pages/habits_display/page_today.dart:56— TodayTabPageState's methods fall into 5 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 5 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: SyncDBHelper (LCOM4 5) lib/storage/db/handlers/sync.dart:114— SyncDBHelper's methods fall into 5 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 5 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: AppSyncTaskFramework (LCOM4 4) lib/models/_app_sync_tasks/app_sync_task.dart:60— AppSyncTaskFramework's methods fall into 4 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 4 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: _WebDavAppSyncCellInfo (LCOM4 4) lib/models/_app_sync_tasks/webdav_app_sync_models.dart:106— _WebDavAppSyncCellInfo's methods fall into 4 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 4 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: WebDavAppSyncTaskMultiResult (LCOM4 4) lib/models/_app_sync_tasks/webdav_app_sync_task_status.dart:156— WebDavAppSyncTaskMultiResult's methods fall into 4 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 4 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: PositiveHabitDailyGoalData (LCOM4 4) lib/models/habit_daily_goal.dart:118— PositiveHabitDailyGoalData's methods fall into 4 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 4 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: NegativeHabitDailyGoalData (LCOM4 4) lib/models/habit_daily_goal.dart:162— NegativeHabitDailyGoalData's methods fall into 4 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 4 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: NegativeHabitDailyRecordForm (LCOM4 4) lib/models/habit_daily_record_form.dart:93— NegativeHabitDailyRecordForm's methods fall into 4 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 4 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: HabitFormViewModel (LCOM4 4) lib/pages/habit_edit/_providers/habit_form.dart:75— HabitFormViewModel's methods fall into 4 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 4 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: HabitSummaryViewModel (LCOM4 4) lib/pages/habits_display/_providers/habit_summary.dart:134— HabitSummaryViewModel's methods fall into 4 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 4 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: HabitDisplaySearchActions (LCOM4 4) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:130— HabitDisplaySearchActions's methods fall into 4 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 4 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: HabitDisplaySelectActions (LCOM4 4) lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:88— HabitDisplaySelectActions's methods fall into 4 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 4 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.
TodoComment packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_scaffold.dart:40— // TODO(adaptive-ui::apple): apple style (FAB behavior / safe-area). — 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 lib/widgets/_widgets/date_picker.dart:762— // TODO(TahaTesser): This is an eye-balled M3 entry mode button padding — 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 lib/pages/habits_status_changer/_widgets/date_picker_tile.dart:82— // TODO(mhabit-adaptive-dialog): Adapt the SDK date picker separately; — 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 lib/pages/habits_display/_widgets/habit_display_group_type_picker.dart:69— // TODO(mhabit-adaptive-dialog): Adapt the group-mode selector; preserve DisplayGroupModeOption — 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 lib/pages/habits_display/_widgets/habit_display_stats_menu.dart:28— // TODO(mhabit-adaptive-dialog): Migrate as a statistics subview/AdaptiveModal, not a confirm; — 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 lib/pages/habit_edit/page.dart:198— // TODO(mhabit-adaptive-dialog): Adapt the SDK time picker separately; — 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 lib/pages/habit_edit/_widgets/habit_color_picker.dart:26— // TODO(mhabit-adaptive-dialog): Adapt the color selector and history controls together; preserve — 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 lib/pages/habit_edit/_widgets/habit_color_picker.dart:116— // TODO(mhabit-adaptive-dialog): Adapt this nested color editor while retaining third-party layout — 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 lib/pages/habit_edit/_widgets/habit_date_picker.dart:28— // TODO(mhabit-adaptive-dialog): Adapt the dedicated date/datetime picker controls; preserve date — 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 lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:30— // TODO(mhabit-adaptive-dialog): Adapt frequency form controls before choosing the modal surface; — 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 lib/pages/habit_edit/_widgets/habit_reminder_type_picker.dart:22— // TODO(mhabit-adaptive-dialog): Adapt reminder-rule controls as a picker; preserve the reminder — 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 lib/pages/habit_edit/_widgets/habit_target_days_picker.dart:33— // TODO(mhabit-adaptive-dialog): Adapt the target-days picker, preserving days/input-type drafts — 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 lib/pages/habit_edit/_widgets/habit_type_picker.dart:20— // TODO(mhabit-adaptive-dialog): Adapt this simple type selector; preserve HabitType/null results — 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 lib/pages/habit_detail/page.dart:252— // TODO(mhabit-adaptive-dialog): Phase 3-8g: migrate only this archive confirmation to an anchored — 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 lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:36— // TODO(mhabit-adaptive-dialog): Migrate as a record-editing subview/AdaptiveModal; retain the — 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 lib/pages/common/_widgets/habit_record_number_picker.dart:36— // TODO(mhabit-adaptive-dialog): Adapt the numeric picker and step controls; preserve the — 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 lib/pages/common/_widgets/habit_record_reason_modifier.dart:26— // TODO(mhabit-adaptive-dialog): Adapt this text-input dialog and its controls, preserving the — 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 lib/pages/common/_widgets/notification_activated.dart:25— // TODO(mhabit-adaptive-dialog): Migrate as a notification-debugging list/AdaptiveModal; — 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 lib/pages/common/_widgets/notification_pending_requests.dart:23— // TODO(mhabit-adaptive-dialog): Migrate as a notification-debugging list/AdaptiveModal; — 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 lib/pages/app_sync_server_editor/page.dart:57— // TODO(mhabit-adaptive-dialog): Remove the forced Material style with Group Edit/Modify — 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 lib/common/consts.dart:99— // TODO(l10n::cy): remove kDebugMode below after translation — 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 lib/common/consts.dart:102— // TODO(l10n::eo): remove kDebugMode below after translation — 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 lib/common/consts.dart:105— // TODO(l10n::eu): remove kDebugMode below after translation — 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 lib/common/consts.dart:113— // TODO(l10n::nb_NO): remove kDebugMode below after translation — 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 lib/common/consts.dart:115— // TODO(l10n::nl): remove kDebugMode below after translation — 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.
FileTooLong: habits_display/page_habits.dart lib/pages/habits_display/page_habits.dart— FileTooLong — 1302 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: HabitsTabPageState (84-1229). The bar is 500 significant lines; this is 802 over it, 2.60× 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: _providers/habit_summary.dart lib/pages/habits_display/_providers/habit_summary.dart— FileTooLong — 1104 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: HabitSummaryViewModel (134-1251). The bar is 500 significant lines; this is 604 over it, 2.21× 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: _app_sync_tasks/webdav_app_sync_models.dart lib/models/_app_sync_tasks/webdav_app_sync_models.dart— FileTooLong — 911 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 411 over it, 1.82× 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: habit_detail/page.dart lib/pages/habit_detail/page.dart— FileTooLong — 898 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: _PageState (115-1066). The bar is 500 significant lines; this is 398 over it, 1.80× 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/app_support.dart lib/pages/common/_widgets/app_support.dart— FileTooLong — 876 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 376 over it, 1.75× 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/cupertino_search_toolbar.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_search_toolbar.dart— FileTooLong — 832 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 332 over it, 1.66× 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: app_settings/page.dart lib/pages/app_settings/page.dart— FileTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: _PageState (106-1090). The bar is 500 significant lines; this is 299 over it, 1.60× 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: adaptive/adaptive_sheet.dart packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 270 over it, 1.54× 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: workflow/app_sync.dart lib/providers/workflow/app_sync.dart— FileTooLong — 765 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 265 over it, 1.53× 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/cupertino_adaptive_modal.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart— FileTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 263 over it, 1.53× 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: reminders/notification_service.dart lib/reminders/notification_service.dart— FileTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 251 over it, 1.50× 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: window_control/material_app_bar.dart packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart— FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: WindowControlSliverAppBar (232-772). The bar is 500 significant lines; this is 199 over it, 1.40× 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/import_habits_confirm.dart lib/pages/app_settings/_widgets/import_habits_confirm.dart— FileTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 177 over it, 1.35× 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: models/habit_summary.dart lib/models/habit_summary.dart— FileTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 166 over it, 1.33× 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: _providers/habit_detail.dart lib/pages/habit_detail/_providers/habit_detail.dart— FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: HabitDetailViewModel (104-699). The bar is 500 significant lines; this is 165 over it, 1.33× 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: workflow/habits_manager.dart lib/providers/workflow/habits_manager.dart— FileTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: HabitsManager (391-872). The bar is 500 significant lines; this is 103 over it, 1.21× 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: providers/noti_app_sync_provider.dart lib/reminders/providers/noti_app_sync_provider.dart— FileTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 67 over it, 1.13× 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/cupertino_adaptive_navigation_bar.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_navigation_bar.dart— FileTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 54 over it, 1.11× 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: app/entry.dart lib/entries/app/entry.dart— FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 37 over it, 1.07× 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: habits_display/page_today.dart lib/pages/habits_display/page_today.dart— FileTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 23 over it, 1.05× 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: habit_edit/page.dart lib/pages/habit_edit/page.dart— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 11 over it, 1.02× 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/date_picker.dart lib/widgets/_widgets/date_picker.dart— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: _DatePickerDialogState (81-524). The bar is 500 significant lines; this is 11 over it, 1.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: handlers/sync.dart lib/storage/db/handlers/sync.dart— FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: SyncDBHelper (114-651). The bar is 500 significant lines; this is 8 over it, 1.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.
MethodTooLong: _PageState.build lib/pages/habit_detail/page.dart:391— MethodTooLong — build runs 510 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 410 over it, 5.10× 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: _PageState.build lib/pages/app_settings/page.dart:592— MethodTooLong — build runs 374 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 274 over it, 3.74× 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 lib/widgets/_widgets/date_picker.dart:203— MethodTooLong — build runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× 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: _CupertinoNavigationShellState.build packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:219— MethodTooLong — build runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× 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: _HabitEditReplacementRecordCalendarDialog.build lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:200— MethodTooLong — build runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: HabitsTabPageState.build lib/pages/habits_display/page_habits.dart:1013— MethodTooLong — build runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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: _PageState.build lib/pages/habit_edit/page.dart:268— MethodTooLong — build runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× 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: HabitDisplaySelectActions.build lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:100— MethodTooLong — build runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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: _DonateContentState.build lib/pages/common/_widgets/donate_dialog.dart:148— MethodTooLong — build runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: ProxyGenerator.generateForAnnotatedElement packages/mhabit_proxy_builder/lib/proxy_generator.dart:81— MethodTooLong — generateForAnnotatedElement runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: SyncDBHelper.batchInsertOrUpdateHabitRecordsToDbTransaction lib/storage/db/handlers/sync.dart:352— MethodTooLong — batchInsertOrUpdateHabitRecordsToDbTransaction runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: HabitWidgetService.perform lib/providers/workflow/habit_widget.dart:54— MethodTooLong — perform runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: _DatePickerHeader.build lib/widgets/_widgets/date_picker.dart:632— MethodTooLong — build runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: WindowControlSliverAppBar._buildAppBar packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:505— MethodTooLong — _buildAppBar runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.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: CupertinoAdaptiveModal.build packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:823— MethodTooLong — build runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.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: _HabitTodayListCardState.build lib/pages/habits_display/_widgets/habit_today_list_card.dart:102— MethodTooLong — build runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: _HabitRecordCustomNumberPickerDialog.build lib/pages/common/_widgets/habit_record_number_picker.dart:231— MethodTooLong — build runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× 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: _CupertinoSliverSearchBarState._buildHeader packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_search_bar.dart:210— MethodTooLong — _buildHeader runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× 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.
Hotspot: lib/pages/app_settings/page.dart lib/pages/app_settings/page.dart:592— lib/pages/app_settings/page.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in _PageState.build at line 592. 1 of those changes was a fix/bug commit, and the other 11 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/pages/app_settings/page.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: lib/pages/habit_detail/page.dart lib/pages/habit_detail/page.dart:391— lib/pages/habit_detail/page.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in _PageState.build at line 391. 1 of those changes was a fix/bug commit, and the other 5 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/pages/habit_detail/page.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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart:396— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in _SelectToolbarLayoutDelegate.performLayout at line 396. 3 of those changes were fix/bug commits, and the other 7 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:823— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in CupertinoAdaptiveModal.build at line 823. 2 of those changes were fix/bug commits, and the other 4 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.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: lib/pages/common/_widgets/donate_dialog.dart lib/pages/common/_widgets/donate_dialog.dart:148— lib/pages/common/_widgets/donate_dialog.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in _DonateContentState.build 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/pages/common/_widgets/donate_dialog.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: lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:476— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in HabitDisplaySearchActions._appleIcon at line 476. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/pages/habits_display/_widgets/actions/habit_display_search_actions.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/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart:443— packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in MaterialAdaptiveModal.build at line 443. 1 of those changes was a fix/bug commit, and the other 2 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.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: ios/HabitWidget/App/HabitWidgetActionRunner.swift ios/HabitWidget/App/HabitWidgetActionRunner.swift:231— ios/HabitWidget/App/HabitWidgetActionRunner.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in HabitWidgetActionRunner.finish at line 231. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- ios/HabitWidget/App/HabitWidgetActionRunner.swift`: 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: lib/storage/db/db_helper.dart lib/storage/db/db_helper.dart:99— lib/storage/db/db_helper.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in _DBHelper._onUpgrade at line 99. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/storage/db/db_helper.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: ios/HabitWidget/Shared/HabitWidgetSnapshot.swift ios/HabitWidget/Shared/HabitWidgetSnapshot.swift:150— ios/HabitWidget/Shared/HabitWidgetSnapshot.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HabitWidgetHabit.init at line 150. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- ios/HabitWidget/Shared/HabitWidgetSnapshot.swift`: 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: lib/routes/app_navigation_coordinator.dart lib/routes/app_navigation_coordinator.dart:270— lib/routes/app_navigation_coordinator.dart changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AppNavigationCoordinator._goToPrimaryBranch at line 270. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/routes/app_navigation_coordinator.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: ios/HabitWidget/Shared/HabitWidgetActionIntent.swift ios/HabitWidget/Shared/HabitWidgetActionIntent.swift:125— ios/HabitWidget/Shared/HabitWidgetActionIntent.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in HabitWidgetActionIntent.perform at line 125. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- ios/HabitWidget/Shared/HabitWidgetActionIntent.swift`: 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.
TooManyMethods: HabitSummaryViewModel lib/pages/habits_display/_providers/habit_summary.dart:134— TooManyMethods — 95 methods. The bar is 30 methods; this is 65 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.
TooManyMethods: HabitDetailViewModel lib/pages/habit_detail/_providers/habit_detail.dart:104— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× 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: HabitsTabPageState lib/pages/habits_display/page_habits.dart:84— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 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.
TooManyMethods: HabitFormViewModel lib/pages/habit_edit/_providers/habit_form.dart:75— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.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: HabitDate lib/models/habit_date.dart:19— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.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: GroupManageViewModel lib/pages/group_manage/_providers/group_manage.dart:58— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.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: HabitsTodayViewModel lib/pages/habits_display/_providers/habits_today.dart:69— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: HabitStatusChangerViewModel lib/pages/habits_status_changer/_providers/habit_status_changer.dart:89— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.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.
TooManyMethods: HabitsManager lib/providers/workflow/habits_manager.dart:391— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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: HabitGroupModifyViewModel lib/pages/habits_display/_providers/habit_group_modify.dart:47— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: AppSyncOwner lib/providers/workflow/app_sync.dart:126— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: HabitSummaryData lib/models/habit_summary.dart:349— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×11
Edited copy of a member (12 corresponding lines) lib/pages/app_sync_server_editor/_widgets/app_sync_server_path.dart:70— lib/pages/app_sync_server_editor/_widgets/app_sync_server_path.dart:70-81 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_username.dart:64-75 — 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) lib/models/habit_export.dart:294— lib/models/habit_export.dart:294-305 | lib/models/habit_export.dart:314-326 — 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) lib/pages/habit_edit/page.dart:125— lib/pages/habit_edit/page.dart:125-136 | lib/pages/habit_edit/page.dart:138-153 — 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) lib/pages/app_sync_server_editor/_providers/app_sync_server_form.dart:170— lib/pages/app_sync_server_editor/_providers/app_sync_server_form.dart:170-181 | lib/pages/app_sync_server_editor/_providers/app_sync_server_form.dart:184-195 — 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) lib/providers/app_ui/habit_op_config.dart:46— lib/providers/app_ui/habit_op_config.dart:46-57 | lib/providers/app_ui/habit_op_config.dart:59-70 — 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) lib/pages/habit_detail/page.dart:254— lib/pages/habit_detail/page.dart:254-265 | lib/pages/habit_detail/page.dart:267-279 — 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) lib/logging/loggers/app_sync_logger.dart:74— lib/logging/loggers/app_sync_logger.dart:74-85 | lib/logging/loggers/value_change_logger.dart:84-97 — 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) lib/logging/loggers/app_sync_logger.dart:87— lib/logging/loggers/app_sync_logger.dart:87-98 | lib/logging/loggers/value_change_logger.dart:99-112 — 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) lib/logging/loggers/app_sync_logger.dart:100— lib/logging/loggers/app_sync_logger.dart:100-111 | lib/logging/loggers/value_change_logger.dart:114-127 — 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) lib/logging/loggers/app_sync_logger.dart:113— lib/logging/loggers/app_sync_logger.dart:113-124 | lib/logging/loggers/value_change_logger.dart:129-142 — 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) lib/logging/loggers/app_sync_logger.dart:126— lib/logging/loggers/app_sync_logger.dart:126-137 | lib/logging/loggers/value_change_logger.dart:144-157 — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×11
Edited copy of a member (9 corresponding lines) lib/models/cache.dart:40— lib/models/cache.dart:40-50 | lib/models/cache.dart:52-60 — 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) lib/pages/group_manage/page.dart:116— lib/pages/group_manage/page.dart:116-124 | lib/pages/group_manage/page.dart:126-137 — 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) lib/storage/profile/handlers/display_group_mode.dart:73— lib/storage/profile/handlers/display_group_mode.dart:73-81 | lib/storage/profile/handlers/display_sort_mode.dart:81-91 — 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/mhabit_adaptive_ui/lib/src/shell/adaptive_branch_route_observer.dart:42— packages/mhabit_adaptive_ui/lib/src/shell/adaptive_branch_route_observer.dart:42-50 | packages/mhabit_adaptive_ui/lib/src/shell/adaptive_branch_route_observer.dart:69-77 — 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) lib/pages/app_settings/_widgets/app_setting_notify_tile.dart:37— lib/pages/app_settings/_widgets/app_setting_notify_tile.dart:37-49 | lib/pages/app_settings/_widgets/app_setting_notify_tile.dart:55-63 — 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) lib/pages/common/_widgets/group_edit_form.dart:152— lib/pages/common/_widgets/group_edit_form.dart:152-163 | lib/pages/common/_widgets/group_edit_form.dart:165-173 — 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) lib/pages/habits_display/page_today.dart:320— lib/pages/habits_display/page_today.dart:320-328 | lib/pages/habits_display/page_today.dart:330-338 — 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) lib/pages/app_sync_server_editor/_widgets/app_sync_server_form_input.dart:64— lib/pages/app_sync_server_editor/_widgets/app_sync_server_form_input.dart:64-72 | lib/widgets/_widgets/text_editing_controller_widget.dart:109-117 — 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) lib/pages/habits_display/_providers/habit_summary.dart:755— lib/pages/habits_display/_providers/habit_summary.dart:755-764 | lib/pages/habits_display/_providers/habits_today.dart:344-352 — 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) lib/pages/app_sync_server_editor/_widgets/app_sync_server_form_input.dart:53— lib/pages/app_sync_server_editor/_widgets/app_sync_server_form_input.dart:53-62 | lib/widgets/_widgets/text_editing_controller_widget.dart:99-107 — 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) lib/models/_app_sync_tasks/webdav_app_sync_models.dart:355— lib/models/_app_sync_tasks/webdav_app_sync_models.dart:355-366 | lib/models/habit_export.dart:75-83 — 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.
Duplicated block (13 lines × 2) lib/models/app_event.dart:215— lib/models/app_event.dart:215-227 | lib/models/app_event.dart:255-267 — 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 (13 lines × 2) lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart:35— lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart:35-47 | lib/pages/app_about/_widgets/app_about_license_tile.dart:30-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 `lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart:35` 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) lib/pages/common/_widgets/group_edit_form.dart:181— lib/pages/common/_widgets/group_edit_form.dart:181-193 | lib/pages/common/_widgets/group_edit_form.dart:195-207 — 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 `lib/pages/common/_widgets/group_edit_form.dart:181` 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) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:292— lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:292-304 | lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:332-344 — 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 `lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:292` 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:299— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:299-311 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:207-219 — 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 `lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:299` 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 (13 lines × 2) lib/storage/db/handlers/sync.dart:620— lib/storage/db/handlers/sync.dart:620-632 | lib/storage/db/handlers/sync_group.dart:169-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.
Duplicated block (13 lines × 2) lib/widgets/_widgets/month_picker_cell.dart:45— lib/widgets/_widgets/month_picker_cell.dart:45-57 | lib/widgets/_widgets/week_picker_cell.dart:47-59 — before extracting anything, compare `lib/widgets/_widgets/month_picker_cell.dart` and `lib/widgets/_widgets/week_picker_cell.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.
Duplicated block (13 lines × 2) packages/mhabit_color_builder/lib/custom_color_builder.dart:202— packages/mhabit_color_builder/lib/custom_color_builder.dart:202-214 | packages/mhabit_color_builder/lib/custom_color_builder.dart:226-238 — 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/mhabit_color_builder/lib/custom_color_builder.dart:202` 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.
ClassTooLong: HabitsTabPageState lib/pages/habits_display/page_habits.dart:84— ClassTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 418 over it, 2.05× 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: HabitSummaryViewModel lib/pages/habits_display/_providers/habit_summary.dart:134— ClassTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded), 95 methods. The bar is 400 significant lines; this is 382 over it, 1.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: _PageState lib/pages/app_settings/page.dart:106— ClassTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 313 over it, 1.78× 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: _PageState lib/pages/habit_detail/page.dart:115— ClassTooLong — 712 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 312 over it, 1.78× 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: SyncDBHelper lib/storage/db/handlers/sync.dart:114— ClassTooLong — 428 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 28 over it, 1.07× 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: WindowControlSliverAppBar packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:228— ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 27 over it, 1.07× 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: HabitDetailViewModel lib/pages/habit_detail/_providers/habit_detail.dart:104— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 8 over it, 1.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.
Duplicated block (10 lines × 2) lib/models/habit_summary.dart:278— lib/models/habit_summary.dart:278-288 | lib/models/habit_summary.dart:308-317 — 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 `lib/models/habit_summary.dart:278` 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) lib/pages/app_settings/page.dart:746— lib/pages/app_settings/page.dart:746-755 | lib/pages/app_settings/page.dart:771-780 — 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 `lib/pages/app_settings/page.dart:746` 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) lib/pages/habit_detail/_providers/habit_detail.dart:523— lib/pages/habit_detail/_providers/habit_detail.dart:523-532 | lib/pages/habits_display/_providers/habit_summary.dart:853-862 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `lib/pages/habit_detail/_providers/habit_detail.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.
Duplicated block (10 lines × 2) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:88— lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:88-97 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:63-72 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail_freqchart.dart` and `lib/pages/habit_detail/_providers/habit_detail_scorechart.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. 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 `lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:88` 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) lib/providers/workflow/habits_manager.dart:432— lib/providers/workflow/habits_manager.dart:432-441 | lib/providers/workflow/habits_manager.dart:472-481 — 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 `lib/providers/workflow/habits_manager.dart:432` 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) lib/storage/db_helper_provider.dart:49— lib/storage/db_helper_provider.dart:49-58 | lib/storage/profile_provider.dart:99-108 — 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 `lib/storage/db_helper_provider.dart:49` 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) lib/pages/habit_detail/page.dart:180— lib/pages/habit_detail/page.dart:180-189 | lib/pages/habits_display/page_habits.dart:741-750 — 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.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×6
Edited copy of a member (26 corresponding lines) lib/pages/habits_display/page_habits.dart:408— lib/pages/habits_display/page_habits.dart:408-435 | lib/pages/habits_display/page_today.dart:370-395 — 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) lib/pages/app_date_format/_widgets/app_date_format_settings.dart:81— lib/pages/app_date_format/_widgets/app_date_format_settings.dart:81-112 | lib/pages/app_date_format/_widgets/app_date_format_settings.dart:118-143 — 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) lib/pages/app_settings/_widgets/app_setting_ui_style.dart:19— lib/pages/app_settings/_widgets/app_setting_ui_style.dart:19-44 | lib/pages/app_settings/_widgets/app_setting_ui_style.dart:53-83 — 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) lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:247— lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:247-272 | lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:288-315 — 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) lib/pages/app_settings/_widgets/app_setting_display_op_tile.dart:186— lib/pages/app_settings/_widgets/app_setting_display_op_tile.dart:186-213 | lib/pages/app_settings/_widgets/app_setting_expand_timer_delay_tile.dart:155-180 — 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) lib/widgets/_widgets/adaptive_confirm_dialog.dart:175— lib/widgets/_widgets/adaptive_confirm_dialog.dart:175-206 | lib/widgets/_widgets/adaptive_confirm_dialog.dart:336-361 — 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 (16 corresponding lines) · ×6
Edited copy of a member (16 corresponding lines) packages/mhabit_adaptive_ui/lib/src/window_control/occlusion_toolbar.dart:374— packages/mhabit_adaptive_ui/lib/src/window_control/occlusion_toolbar.dart:374-389 | packages/mhabit_adaptive_ui/lib/src/window_control/occlusion_toolbar.dart:444-464 — 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) lib/pages/habits_display/page_habits.dart:567— lib/pages/habits_display/page_habits.dart:567-582 | lib/pages/habits_display/page_today.dart:117-133 — 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) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:289— lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:289-304 | lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:329-344 — 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) lib/pages/app_sync/_widgets/app_sync_app_bar.dart:37— lib/pages/app_sync/_widgets/app_sync_app_bar.dart:37-59 | lib/pages/app_sync/_widgets/app_sync_app_bar.dart:65-80 — 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) lib/pages/group_manage/_widgets/group_manage_item_actions.dart:51— lib/pages/group_manage/_widgets/group_manage_item_actions.dart:51-66 | lib/pages/group_manage/_widgets/group_manage_item_actions.dart:112-133 — 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) lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:335— lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:335-353 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:355-370 — 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· Edited copy of a member (14 corresponding lines) · ×6
Edited copy of a member (14 corresponding lines) lib/models/cache.dart:65— lib/models/cache.dart:65-78 | lib/models/cache.dart:80-94 — 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) lib/storage/db/handlers/group.dart:31— lib/storage/db/handlers/group.dart:31-44 | lib/storage/db/handlers/habit.dart:181-195 — 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) lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:348— lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:348-361 | lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:363-376 — 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) lib/models/_app_sync_tasks/webdav_app_sync_task.dart:242— lib/models/_app_sync_tasks/webdav_app_sync_task.dart:242-255 | lib/models/_app_sync_tasks/webdav_app_sync_task.dart:499-512 — 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) lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:232— lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:232-245 | lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:419-437 — 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) lib/models/_score/calculator.dart:70— lib/models/_score/calculator.dart:70-83 | lib/models/_score/calculator.dart:85-98 — 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×6
Edited copy of a member (8 corresponding lines) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:430— lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:430-437 | lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:439-446 — 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) lib/models/habit_reminder.dart:117— lib/models/habit_reminder.dart:117-124 | lib/models/habit_reminder.dart:126-133 — 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) lib/pages/app_settings/_widgets/import_habits_confirm.dart:756— lib/pages/app_settings/_widgets/import_habits_confirm.dart:756-763 | lib/pages/app_settings/_widgets/import_habits_confirm.dart:840-849 — 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) lib/pages/group_manage/page.dart:55— lib/pages/group_manage/page.dart:55-63 | lib/pages/habits_display/_widgets/habit_display_group_modify_dialog.dart:278-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.
Edited copy of a member (8 corresponding lines) lib/pages/habits_display/_providers/habit_summary.dart:285— lib/pages/habits_display/_providers/habit_summary.dart:285-293 | lib/pages/habits_display/_providers/habits_today.dart:125-132 — 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_scaffold.dart:36— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_scaffold.dart:36-43 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sliver_search_bar.dart:142-149 — 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.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×6
Edited copy of a member (10 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart:439— lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart:439-450 | lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart:452-461 — 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) lib/storage/db/handlers/habit.dart:308— lib/storage/db/handlers/habit.dart:308-317 | lib/storage/db/handlers/habit.dart:319-328 — 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) lib/entries/app/navigation_destination.dart:26— lib/entries/app/navigation_destination.dart:26-35 | lib/entries/app/navigation_destination.dart:37-46 — 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) lib/pages/habits_display/_providers/habit_summary.dart:677— lib/pages/habits_display/_providers/habit_summary.dart:677-694 | lib/pages/habits_display/_providers/habits_today.dart:331-340 — 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) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:271— lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:271-280 | lib/pages/habit_edit/_widgets/habit_target_days_picker.dart:205-215 — 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) lib/pages/habit_edit/_widgets/habit_edit_daily_goal_extra_tile.dart:40— lib/pages/habit_edit/_widgets/habit_edit_daily_goal_extra_tile.dart:40-49 | lib/pages/habit_edit/_widgets/habit_edit_daily_goal_tile.dart:41-52 — 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.
Duplicated block (16 lines × 2) lib/providers/workflow/app_sync.dart:1012— lib/providers/workflow/app_sync.dart:1012-1027 | lib/providers/workflow/app_sync.dart:1041-1056 — 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 `lib/providers/workflow/app_sync.dart:1012` 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 after the matched lines, `lib/providers/workflow/app_sync.dart:1029` calls `add` and `lib/providers/workflow/app_sync.dart:1058` 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 (16 lines × 2) lib/reminders/notification_service.dart:373— lib/reminders/notification_service.dart:373-388 | lib/reminders/notification_service.dart:629-644 — 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 `lib/reminders/notification_service.dart:373` 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 (16 lines × 2) lib/widgets/_widgets/date_picker.dart:457— lib/widgets/_widgets/date_picker.dart:457-472 | lib/widgets/_widgets/date_picker.dart:497-512 — 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 `lib/widgets/_widgets/date_picker.dart:457` 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar.dart:217— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar.dart:217-232 | packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_search_toolbar.dart:469-484 — 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar.dart:217` 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:932— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:932-947 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:950-965 — 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:932` 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/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:142— packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:142-157 | packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:536-551 — 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/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:142` 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) lib/pages/common/_widgets/habit_record_number_picker.dart:143— lib/pages/common/_widgets/habit_record_number_picker.dart:143-157 | lib/pages/common/_widgets/habit_record_number_picker.dart:171-185 — 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 `lib/pages/common/_widgets/habit_record_number_picker.dart:143` 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) lib/pages/group_manage/_widgets/group_manage_sliver.dart:182— lib/pages/group_manage/_widgets/group_manage_sliver.dart:182-196 | lib/pages/group_manage/_widgets/group_manage_sliver.dart:279-293 — 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 `lib/pages/group_manage/_widgets/group_manage_sliver.dart:182` 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) lib/pages/habits_display/page_habits.dart:445— lib/pages/habits_display/page_habits.dart:445-459 | lib/pages/habits_display/page_today.dart:345-359 — 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 `lib/pages/habits_display/page_habits.dart:445` 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, `lib/pages/habits_display/page_today.dart:344` calls `now` and `lib/pages/habits_display/page_habits.dart:444` 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 (15 lines × 2) lib/storage/db/handlers/habit.dart:238— lib/storage/db/handlers/habit.dart:238-252 | lib/storage/db/handlers/habit.dart:266-280 — 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 `lib/storage/db/handlers/habit.dart:238` 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:695— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:695-709 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:745-759 — 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:695` 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) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart:468— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart:468-482 | packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart:501-515 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart:468` 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) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:431— lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:431-437 | lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:440-446 — 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 (7 lines × 2) lib/pages/habit_edit/_widgets/habit_edit_group_tile.dart:158— lib/pages/habit_edit/_widgets/habit_edit_group_tile.dart:158-164 | lib/pages/habit_edit/_widgets/habit_edit_group_tile.dart:188-194 — 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) lib/pages/habit_edit/page.dart:457— lib/pages/habit_edit/page.dart:457-463 | lib/utils/safe_sliver_tools.dart:25-31 — 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 (7 lines × 2) lib/pages/habits_display/page_habits.dart:1462— lib/pages/habits_display/page_habits.dart:1462-1468 | lib/pages/habits_status_changer/page.dart:509-515 — 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) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:204— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:204-210 | packages/mhabit_adaptive_ui/lib/src/material/material_navigation_shell.dart:106-112 — 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) lib/common/enums.dart:40— lib/common/enums.dart:40-47 | lib/models/habit_display.dart:72-78 — 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.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×5
Edited copy of a member (27 corresponding lines) lib/pages/habit_edit/_providers/habit_form.dart:383— lib/pages/habit_edit/_providers/habit_form.dart:383-411 | lib/pages/habit_edit/_providers/habit_form.dart:413-439 — 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) lib/storage/db/handlers/habit.dart:226— lib/storage/db/handlers/habit.dart:226-252 | lib/storage/db/handlers/habit.dart:254-280 — 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) lib/widgets/_widgets/month_picker_cell.dart:59— lib/widgets/_widgets/month_picker_cell.dart:59-85 | lib/widgets/_widgets/week_picker_cell.dart:61-87 — 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) lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:278— lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:278-304 | lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:604-636 — 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) lib/pages/app_sync_server_editor/page.dart:99— lib/pages/app_sync_server_editor/page.dart:99-128 | lib/pages/app_sync_server_editor/page.dart:133-159 — 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· Edited copy of a member (20 corresponding lines) · ×5
Edited copy of a member (20 corresponding lines) lib/pages/app_settings/_widgets/app_setting_theme_color.dart:166— lib/pages/app_settings/_widgets/app_setting_theme_color.dart:166-185 | lib/pages/app_settings/_widgets/app_setting_theme_color.dart:275-295 — 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_modal_content.dart:59— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_modal_content.dart:59-78 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_modal_content.dart:86-107 — 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) lib/widgets/_widgets/group_color_picker.dart:49— lib/widgets/_widgets/group_color_picker.dart:49-70 | lib/widgets/_widgets/group_icon_picker.dart:41-60 — 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) lib/pages/common/_widgets/sync_now_tile.dart:172— lib/pages/common/_widgets/sync_now_tile.dart:172-191 | lib/pages/common/_widgets/sync_now_tile.dart:208-229 — 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:538— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:538-559 | lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:561-580 — 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 (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart:155— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart:155-165 | packages/mhabit_adaptive_ui/lib/src/window_control/occlusion_layout.dart:368-380 — 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) lib/pages/app_settings/page.dart:155— lib/pages/app_settings/page.dart:155-166 | lib/pages/app_settings/page.dart:168-178 — 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) lib/models/_score/score.dart:86— lib/models/_score/score.dart:86-96 | lib/models/_score/score.dart:257-268 — 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) lib/reminders/notification_service.dart:293— lib/reminders/notification_service.dart:293-303 | lib/reminders/notification_service.dart:419-429 — 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) lib/providers/app_ui/app_compact_ui_switcher.dart:36— lib/providers/app_ui/app_compact_ui_switcher.dart:36-46 | lib/providers/app_ui/habits_record_scroll_behavior.dart:38-48 — 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.
Duplicated block (14 lines × 2) lib/models/_habit_repo_actions/change_record_status_action.dart:158— lib/models/_habit_repo_actions/change_record_status_action.dart:158-171 | lib/models/_habit_repo_actions/change_record_status_action.dart:254-267 — 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 `lib/models/_habit_repo_actions/change_record_status_action.dart:158` 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) lib/pages/group_manage/_widgets/group_manage_grid_item.dart:67— lib/pages/group_manage/_widgets/group_manage_grid_item.dart:67-80 | lib/pages/group_manage/_widgets/group_manage_list_item.dart:67-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 `lib/pages/group_manage/_widgets/group_manage_grid_item.dart:67` 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) lib/pages/habit_detail/_providers/habit_detail.dart:707— lib/pages/habit_detail/_providers/habit_detail.dart:707-720 | lib/pages/habit_detail/_providers/habit_detail.dart:736-749 — 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 `lib/pages/habit_detail/_providers/habit_detail.dart:707` 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) lib/pages/habit_edit/_providers/habit_form.dart:391— lib/pages/habit_edit/_providers/habit_form.dart:391-404 | lib/pages/habit_edit/_providers/habit_form.dart:422-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.
Duplicated block (14 lines × 2) lib/storage/profile/handlers/app_flags.dart:27— lib/storage/profile/handlers/app_flags.dart:27-40 | lib/storage/profile/handlers/habit_display_flags.dart:27-40 — before extracting anything, compare `lib/storage/profile/handlers/app_flags.dart` and `lib/storage/profile/handlers/habit_display_flags.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 (11 lines × 2) lib/pages/group_manage/_widgets/group_manage_grid_item.dart:55— lib/pages/group_manage/_widgets/group_manage_grid_item.dart:55-65 | lib/pages/group_manage/_widgets/group_manage_list_item.dart:55-65 — 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 `lib/pages/group_manage/_widgets/group_manage_grid_item.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 (11 lines × 2) lib/pages/habit_detail/_providers/habit_detail.dart:489— lib/pages/habit_detail/_providers/habit_detail.dart:489-499 | lib/pages/habits_display/_providers/habit_summary.dart:889-899 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `lib/pages/habit_detail/_providers/habit_detail.dart:489` 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:546— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:546-556 | lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:568-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.
Duplicated block (11 lines × 2) lib/reminders/providers/noti_app_sync_provider.dart:416— lib/reminders/providers/noti_app_sync_provider.dart:416-426 | lib/reminders/providers/noti_app_sync_provider.dart:640-650 — 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 `lib/reminders/providers/noti_app_sync_provider.dart:416` 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) lib/widgets/_widgets/date_picker_custom.dart:123— lib/widgets/_widgets/date_picker_custom.dart:123-133 | lib/widgets/_widgets/date_picker_custom.dart:137-147 — 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 `lib/widgets/_widgets/date_picker_custom.dart:123` 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) lib/logging/logger_manager.dart:90— lib/logging/logger_manager.dart:90-98 | lib/logging/logger_manager.dart:105-113 — 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 `lib/logging/logger_manager.dart:90` 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 × 2) lib/pages/group_manage/_widgets/group_manage_sliver.dart:209— lib/pages/group_manage/_widgets/group_manage_sliver.dart:209-217 | lib/pages/group_manage/_widgets/group_manage_sliver.dart:294-302 — 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 `lib/pages/group_manage/_widgets/group_manage_sliver.dart:209` 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) lib/pages/habit_detail/_providers/habit_detail.dart:319— lib/pages/habit_detail/_providers/habit_detail.dart:319-327 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:181-189 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_status_changer/_providers/habit_status_changer.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 82 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 `lib/pages/habit_detail/_providers/habit_detail.dart:319` 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) lib/storage/db_helper_provider.dart:60— lib/storage/db_helper_provider.dart:60-68 | lib/storage/profile_provider.dart:110-118 — 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 (9 lines × 2) lib/pages/habits_display/page_habits.dart:1354— lib/pages/habits_display/page_habits.dart:1354-1362 | lib/pages/habits_status_changer/page.dart:403-411 — 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) lib/pages/habit_detail/_providers/habit_detail.dart:622— lib/pages/habit_detail/_providers/habit_detail.dart:622-629 | lib/pages/habit_detail/_providers/habit_detail.dart:649-656 — 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 `lib/pages/habit_detail/_providers/habit_detail.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. 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) lib/pages/habits_display/page_today.dart:444— lib/pages/habits_display/page_today.dart:444-451 | lib/pages/habits_display/page_today.dart:566-573 — 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 `lib/pages/habits_display/page_today.dart:444` 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) lib/pages/group_manage/_providers/group_manage.dart:189— lib/pages/group_manage/_providers/group_manage.dart:189-196 | lib/pages/habits_display/_providers/habit_group_modify.dart:84-91 — 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) lib/pages/habit_detail/_providers/habit_detail.dart:228— lib/pages/habit_detail/_providers/habit_detail.dart:228-235 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:473-480 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_status_changer/_providers/habit_status_changer.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 82 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 (8 lines × 2) lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:89— lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:89-96 | lib/pages/habits_status_changer/page.dart:83-90 — 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.
Repeated repair: packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart:39— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.dart changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is CupertinoFloatingSurfaceGeometry.resolveOf at line 39), 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: “fix(ui): adapt iPhone Duo and foldable layouts (#691)”; “fix(adaptive-ui): refine dark navigation chrome”; “fix(adaptive-ui): improve dark navigation surfaces”; “fix(adaptive-ui): restore rectangular iPhone margins”. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_floating_surface.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: lib/pages/habits_display/_providers/habit_summary.dart lib/pages/habits_display/_providers/habit_summary.dart:358— lib/pages/habits_display/_providers/habit_summary.dart changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is HabitSummaryViewModel.loadData at line 358), 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: “fix(search): restore browsing after empty Apple search (#703)”; “fix(sync): decouple UI refresh from sync lifecycle (#672)”; “fix(ui): refine adaptive interactions and styling (#669)”; “fix(ui): align modal routes and selection notifications (#656)”. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/pages/habits_display/_providers/habit_summary.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: lib/common/app_info.dart lib/common/app_info.dart:104— lib/common/app_info.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 8 (its worst body is AppInfo.init at line 104), 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: “fix(ui): adapt iPhone Duo and foldable layouts (#691)”; “fix(ui): keep system bars visible during launch”; “fix(adaptive-ui): restore rectangular iPhone margins”. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- lib/common/app_info.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: packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_search_toolbar.dart packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_search_toolbar.dart:190— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_search_toolbar.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 _CupertinoSearchToolbarLayout.build at line 190), 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: “fix(ui): adapt iPhone Duo and foldable layouts (#691)”; “fix(ui): normalize Cupertino neutral button colors (#673)”; “fix(ui): refine adaptive interactions and styling (#669)”. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 12:22:40 +08:00' --until='2026-11-15 12:22:40 +08:00' --full-history --no-merges -- packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_search_toolbar.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.
Change coupling: habit_edit_repl_rcd_cal.dart ↔ page.dart lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:1— `lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart` and `lib/pages/habits_display/page.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 — 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 7 shared commits counted here, the most recent 3 are `5fceab74` Refactor: Habit Detail ViewModel (#403); `5a0b51c6` Enhance WebDAV sync: trigger in some scenarios when auto-sync is enab… (at that commit the files were still `lib/view/for_habit_detail/habit_edit_repl_rcd_cal.dart` and `lib/view/page_habits_display.dart`); `16ad3747` feat(negative-habit): Refact habits about code (at that commit the files were still `lib/view/for_habit_detail/habit_edit_repl_rcd_cal.dart` and `lib/view/page_habits_display.dart`) — run `git show` on any of them.
Change coupling: habit_edit_repl_rcd_cal.dart ↔ habit_summary.dart lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:1— `lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 6 shared commits counted here, the most recent 3 are `b7d1c0c0` refactor: replace manual sync triggers with AppEventBus subscription …; `5fceab74` Refactor: Habit Detail ViewModel (#403) (at that commit the file was still `lib/providers/habit_summary.dart`); `5a0b51c6` Enhance WebDAV sync: trigger in some scenarios when auto-sync is enab… (at that commit the files were still `lib/view/for_habit_detail/habit_edit_repl_rcd_cal.dart` and `lib/provider/habit_summary.dart`) — run `git show` on any of them.
Change coupling: page.dart ↔ habit_summary.dart lib/pages/habit_edit/page.dart:1— `lib/pages/habit_edit/page.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 7 shared commits counted here, the most recent 3 are `b7d1c0c0` refactor: replace manual sync triggers with AppEventBus subscription …; `a275ee0e` refactor: improve habit reminder lifecycle and notification handling …; `774b7fec` Refactor Habit Summary structure and logic (#370) (at that commit the file was still `lib/providers/habit_summary.dart`) — run `git show` on any of them.
Change coupling: page.dart ↔ page.dart lib/pages/habits_display/page.dart:1— `lib/pages/habits_display/page.dart` and `lib/pages/habits_status_changer/page.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 — 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 `b09bd5ab` refactor: extract PopScopeGate widget with PopScopeHandler interface …; `536fc415` Refactor: Avoid UI depending on ViewModels from other widgets layer (…; `836a4700` Refactor Habit Data Flow with Dispatcher (#374) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) lib/pages/habits_display/page_habits.dart:1375— lib/pages/habits_display/page_habits.dart:1375-1402 | lib/pages/habits_status_changer/page.dart:424-442 — 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) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:81— lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:81-103 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:58-76 — 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) lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart:35— lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart:35-60 | lib/pages/app_about/_widgets/app_about_license_tile.dart:30-48 — 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) lib/pages/common/_widgets/habit_record_number_picker.dart:139— lib/pages/common/_widgets/habit_record_number_picker.dart:139-157 | lib/pages/common/_widgets/habit_record_number_picker.dart:159-185 — 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart:436— lib/pages/habit_detail/_providers/habit_detail.dart:436-453 | lib/pages/habit_detail/_providers/habit_detail.dart:455-481 — 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:178— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:178-199 | lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:201-218 — 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:298— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:298-315 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.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) lib/models/_score/score.dart:31— lib/models/_score/score.dart:31-52 | lib/models/habit_daily_record_form.dart:30-47 — 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.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) lib/reminders/providers/noti_app_sync_provider.dart:673— lib/reminders/providers/noti_app_sync_provider.dart:673-685 | lib/reminders/providers/noti_app_sync_provider.dart:687-700 — 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) lib/pages/habit_edit/_widgets/habit_edit_frequency_tile.dart:31— lib/pages/habit_edit/_widgets/habit_edit_frequency_tile.dart:31-43 | lib/pages/habit_edit/_widgets/habit_edit_target_days_tile.dart:29-41 — 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) lib/pages/habit_detail/page.dart:129— lib/pages/habit_detail/page.dart:129-141 | lib/pages/habits_display/page_habits.dart:128-143 — 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) lib/pages/app_debugger/_widgets/debugger_card.dart:47— lib/pages/app_debugger/_widgets/debugger_card.dart:47-61 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_dialog.dart:97-109 — 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.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×4
Edited copy of a member (7 corresponding lines) lib/pages/app_debugger/page.dart:141— lib/pages/app_debugger/page.dart:141-147 | lib/pages/app_debugger/page.dart:149-156 — 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) lib/pages/habit_detail/_providers/habit_detail.dart:139— lib/pages/habit_detail/_providers/habit_detail.dart:139-146 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:134-140 — 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) lib/pages/habit_detail/page.dart:121— lib/pages/habit_detail/page.dart:121-127 | lib/pages/habits_status_changer/page.dart:75-81 — 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) lib/pages/habit_detail/page.dart:172— lib/pages/habit_detail/page.dart:172-178 | lib/pages/habits_display/page_habits.dart:612-618 — 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.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) lib/logging/level.dart:33— lib/logging/level.dart:33-38 | lib/theme/color.dart:34-42 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:195— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:195-202 | packages/mhabit_adaptive_ui/lib/src/material/material_navigation_shell.dart:76-81 — 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) lib/storage/db_helper_provider.dart:70— lib/storage/db_helper_provider.dart:70-76 | lib/storage/profile_provider.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.
Edited copy of a member (6 corresponding lines) lib/pages/group_manage/_providers/group_manage.dart:212— lib/pages/group_manage/_providers/group_manage.dart:212-218 | lib/pages/habit_edit/_providers/habit_form.dart:158-163 — 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.
Duplicated block (21 lines × 2) lib/models/_score/score.dart:142— lib/models/_score/score.dart:142-162 | lib/models/_score/score.dart:319-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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/models/_score/score.dart:142` 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 lines × 2) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:152— lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:152-172 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:125-145 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail_freqchart.dart` and `lib/pages/habit_detail/_providers/habit_detail_scorechart.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. 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 `lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:152` 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) lib/pages/habit_detail/page.dart:804— lib/pages/habit_detail/page.dart:804-824 | lib/pages/habit_detail/page.dart:833-853 — 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 `lib/pages/habit_detail/page.dart:804` 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 (21 lines × 2) lib/providers/workflow/habits_file_exporter.dart:95— lib/providers/workflow/habits_file_exporter.dart:95-115 | lib/providers/workflow/habits_file_exporter.dart:125-145 — 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 `lib/providers/workflow/habits_file_exporter.dart:95` 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 (18 lines × 2) lib/pages/common/_widgets/habit_record_number_picker.dart:212— lib/pages/common/_widgets/habit_record_number_picker.dart:212-229 | lib/pages/common/_widgets/habit_record_reason_modifier.dart:86-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. 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) lib/pages/habit_detail/page.dart:611— lib/pages/habit_detail/page.dart:611-628 | lib/pages/habit_detail/page.dart:696-713 — 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 `lib/pages/habit_detail/page.dart:611` 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:159— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:159-176 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:112-129 — 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 `lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:159` 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:382— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:382-399 | packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart:314-331 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:382` 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:380` calls `SizedBox` and `packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart:312` 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 × 2) lib/models/habit_reminder.dart:259— lib/models/habit_reminder.dart:259-270 | lib/models/habit_reminder.dart:289-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 `lib/models/habit_reminder.dart:259` 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 (12 lines × 2) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:60— lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:60-71 | lib/pages/habit_detail/_widgets/habit_detail_score_chart.dart:60-71 — 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) lib/widgets/_widgets/adaptive_confirm_dialog.dart:121— lib/widgets/_widgets/adaptive_confirm_dialog.dart:121-132 | lib/widgets/_widgets/adaptive_confirm_dialog.dart:134-145 — 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 `lib/widgets/_widgets/adaptive_confirm_dialog.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.
Duplicated block (12 lines × 2) packages/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:78— packages/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:78-89 | packages/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:96-107 — 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/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.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.
Duplicated block (5 lines × 2) lib/pages/habit_detail/_providers/habit_detail.dart:441— lib/pages/habit_detail/_providers/habit_detail.dart:441-445 | lib/pages/habits_display/_providers/habit_summary.dart:799-803 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `lib/pages/habit_detail/_providers/habit_detail.dart:441` 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 (5 lines × 2) lib/pages/habit_detail/page.dart:156— lib/pages/habit_detail/page.dart:156-160 | lib/pages/habits_display/page_habits.dart:599-604 — 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 (5 lines × 2) lib/pages/habits_display/_providers/habit_summary.dart:657— lib/pages/habits_display/_providers/habit_summary.dart:657-661 | lib/pages/habits_display/_providers/habits_today.dart:265-269 — before extracting anything, compare `lib/pages/habits_display/_providers/habit_summary.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 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) lib/logging/loggers/app_sync_logger.dart:55— lib/logging/loggers/app_sync_logger.dart:55-59 | lib/logging/loggers/value_change_logger.dart:64-68 — 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.
Swallowed exception (caught, then discarded) packages/mhabit_desktop_window_chrome/lib/src/desktop_window_title_bar.dart:121— `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) lib/storage/db/db_helper.dart:522— `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) lib/models/_app_sync_tasks/webdav_app_sync_models.dart:58— `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) android/app/src/main/kotlin/io/github/friesi23/mhabit/AnimationScaleStreamHandler.kt:70— `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.
FixmeComment lib/widgets/_widgets/adaptive_modal_material_bridge.dart:22— // FIXME(mhabit): Remove this bridge after all migrated modal consumers use — 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.
FixmeComment lib/widgets/_widgets/filterable_menu_field.dart:186— // FIXME: Flutter 3.44 may calculate the final menu item Interval.end as — 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.
FixmeComment lib/models/_app_sync_tasks/webdav_app_sync_task.dart:391— // FIXME: When a strict-sync mode is introduced, group failures 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.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) lib/storage/db_helper_builder.dart:41— lib/storage/db_helper_builder.dart:41-74 | lib/storage/profile_builder.dart:47-80 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:411— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:411-452 | packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart:336-369 — 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) lib/providers/workflow/group_manager.dart:158— lib/providers/workflow/group_manager.dart:158-191 | lib/providers/workflow/habits_manager.dart:698-733 — 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 copy of a member (29 corresponding lines) · ×3
Edited copy of a member (29 corresponding lines) lib/pages/habits_display/page_habits.dart:437— lib/pages/habits_display/page_habits.dart:437-470 | lib/pages/habits_display/page_today.dart:340-368 — 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) lib/pages/app_debugger/_widgets/change_logs_switcher_tile.dart:66— lib/pages/app_debugger/_widgets/change_logs_switcher_tile.dart:66-94 | lib/pages/app_debugger/_widgets/change_logs_switcher_tile.dart:109-139 — 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) lib/models/habit_reminder.dart:258— lib/models/habit_reminder.dart:258-286 | lib/models/habit_reminder.dart:288-318 — 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· Edited copy of a member (28 corresponding lines) · ×3
Edited copy of a member (28 corresponding lines) lib/pages/habits_display/_providers/habits_today.dart:463— lib/pages/habits_display/_providers/habits_today.dart:463-490 | lib/pages/habits_display/_providers/habits_today.dart:492-534 — 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) lib/models/habit_summary.dart:275— lib/models/habit_summary.dart:275-305 | lib/models/habit_summary.dart:307-334 — 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) lib/pages/habit_detail/_providers/habit_detail.dart:706— lib/pages/habit_detail/_providers/habit_detail.dart:706-733 | lib/pages/habit_detail/_providers/habit_detail.dart:735-762 — 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, 24+ corresponding lines) · ×3
Edited copies of one member (3 members, 24+ corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart:614— lib/pages/habit_detail/_providers/habit_detail.dart:614-639 | lib/pages/habit_detail/_providers/habit_detail.dart:641-666 | lib/pages/habit_detail/_providers/habit_detail.dart:668-691 — 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) lib/pages/habit_edit/_widgets/habit_edit_daily_goal_tile.dart:54— lib/pages/habit_edit/_widgets/habit_edit_daily_goal_tile.dart:54-83 | lib/pages/habit_edit/_widgets/habit_edit_daily_goal_unit_tile.dart:32-58 | lib/pages/habit_edit/_widgets/habit_edit_desc_tile.dart:30-53 — 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) lib/logging/loggers/text_logger.dart:71— lib/logging/loggers/text_logger.dart:71-94 | lib/logging/loggers/text_logger.dart:141-170 | lib/logging/loggers/widget_logger.dart:119-149 — 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 (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) lib/pages/group_manage/providers.dart:32— lib/pages/group_manage/providers.dart:32-62 | lib/pages/habits_status_changer/providers.dart:31-52 — 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) lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:174— lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:174-195 | lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:209-231 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_app_bar.dart:209— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_app_bar.dart:209-230 | packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_search_bar.dart:181-208 — 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· Edited copy of a member (17 corresponding lines) · ×3
Edited copy of a member (17 corresponding lines) lib/widgets/_widgets/month_picker_cell.dart:87— lib/widgets/_widgets/month_picker_cell.dart:87-103 | lib/widgets/_widgets/week_picker_cell.dart:89-111 — 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) lib/pages/app_settings/_widgets/app_setting_display_op_tile.dart:39— lib/pages/app_settings/_widgets/app_setting_display_op_tile.dart:39-55 | lib/pages/app_settings/_widgets/app_setting_expand_timer_delay_tile.dart:37-53 — 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/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:695— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:695-711 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_sheet.dart:745-761 — 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 (23 corresponding lines) · ×3
Edited copy of a member (23 corresponding lines) packages/mhabit_color_builder/lib/custom_color_builder.dart:201— packages/mhabit_color_builder/lib/custom_color_builder.dart:201-223 | packages/mhabit_color_builder/lib/custom_color_builder.dart:225-254 — 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) lib/pages/group_manage/_providers/group_manage.dart:452— lib/pages/group_manage/_providers/group_manage.dart:452-474 | lib/pages/group_manage/_providers/group_manage.dart:476-499 — 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) lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:131— lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:131-153 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:155-178 — 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 (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:282— lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:282-296 | lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:298-312 — 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) lib/pages/habits_display/page_today.dart:507— lib/pages/habits_display/page_today.dart:507-523 | lib/pages/habits_display/page_today.dart:616-630 — 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) REDACTED:323— REDACTED:323-343 | lib/models/app_sync_server_form.dart:117-131 — 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.
Duplicated block (19 lines × 2) lib/models/_score/score.dart:176— lib/models/_score/score.dart:176-194 | lib/models/_score/score.dart:353-371 — 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 `lib/models/_score/score.dart:176` 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) lib/pages/group_manage/_widgets/group_manage_list_item.dart:125— lib/pages/group_manage/_widgets/group_manage_list_item.dart:125-143 | lib/pages/group_manage/_widgets/group_manage_list_item.dart:188-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 `lib/pages/group_manage/_widgets/group_manage_list_item.dart:125` 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 × 2) lib/pages/habits_display/_providers/habit_summary.dart:414— lib/pages/habits_display/_providers/habit_summary.dart:414-432 | lib/pages/habits_display/_providers/habits_today.dart:208-226 — before extracting anything, compare `lib/pages/habits_display/_providers/habit_summary.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 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 `lib/pages/habits_display/_providers/habit_summary.dart:414` 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, `lib/pages/habits_display/_providers/habits_today.dart:207` calls `forEach`, `_updateHabitAutoCompleteStatistics` and `lib/pages/habits_display/_providers/habit_summary.dart:412` 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 (11–12 lines × 2) lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:118— lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:118-129 | lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:165-175 — 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 `lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:118` 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) lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1121— lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1121-1132 | lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1175-1185 — 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 `lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1121` 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_list_section.dart:50— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_list_section.dart:50-61 | packages/mhabit_adaptive_ui/lib/src/material/material_list_section.dart:27-37 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_list_section.dart:50` 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· Edited copy of a member (47 corresponding lines) · ×2
Edited copy of a member (47 corresponding lines) lib/models/_score/score.dart:176— lib/models/_score/score.dart:176-222 | lib/models/_score/score.dart:353-401 — 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) lib/reminders/notification_service.dart:305— lib/reminders/notification_service.dart:305-351 | lib/reminders/notification_service.dart:570-616 — 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 copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) lib/pages/group_manage/_widgets/group_manage_grid_item.dart:48— lib/pages/group_manage/_widgets/group_manage_grid_item.dart:48-80 | lib/pages/group_manage/_widgets/group_manage_list_item.dart:48-80 — 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) lib/models/_score/score.dart:142— lib/models/_score/score.dart:142-174 | lib/models/_score/score.dart:319-351 — 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 (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1094— lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1094-1144 | lib/models/_app_sync_tasks/webdav_app_sync_models.dart:1166-1197 — 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) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:151— lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:151-182 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:124-155 — 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, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) lib/pages/app_about/_widgets/app_about_contact_email_tile.dart:58— lib/pages/app_about/_widgets/app_about_contact_email_tile.dart:58-71 | lib/pages/app_about/_widgets/app_about_issue_tracker_tile.dart:51-64 | lib/pages/app_about/_widgets/app_about_source_code_tile.dart:50-63 — 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) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:454— lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:454-474 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:303-316 | lib/pages/habits_display/_widgets/actions/habit_display_view_actions.dart:318-333 — 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) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) lib/storage/db/handlers/habit.dart:412— lib/storage/db/handlers/habit.dart:412-426 | lib/storage/db/handlers/record.dart:424-434 | lib/storage/db/handlers/record.dart:436-449 — 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) lib/pages/app_about/_widgets/app_about_issue_tracker_tile.dart:38— lib/pages/app_about/_widgets/app_about_issue_tracker_tile.dart:38-49 | lib/pages/app_about/_widgets/app_about_source_code_tile.dart:37-48 | lib/pages/common/_widgets/contributor_tile.dart:101-111 — 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.
Duplicated block (20 lines × 2) lib/models/_score/score.dart:195— lib/models/_score/score.dart:195-214 | lib/models/_score/score.dart:373-392 — 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 `lib/models/_score/score.dart:195` 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 (20 lines × 2) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:311— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:311-330 | packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:335-354 — 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 (17 lines × 2) lib/pages/common/_widgets/group_edit_form.dart:308— lib/pages/common/_widgets/group_edit_form.dart:308-324 | lib/pages/common/_widgets/group_edit_form.dart:384-400 — 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 `lib/pages/common/_widgets/group_edit_form.dart:308` 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, `lib/pages/common/_widgets/group_edit_form.dart:325` calls `HabitDivider` and `lib/pages/common/_widgets/group_edit_form.dart:401` 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/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:91— packages/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:91-107 | packages/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:109-125 — 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/mhabit_adaptive_ui/lib/src/material/material_sliver_app_bar.dart:91` 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–11 lines × 2) lib/pages/habits_display/page_habits.dart:1392— lib/pages/habits_display/page_habits.dart:1392-1402 | lib/pages/habits_status_changer/page.dart:433-442 — 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 `lib/pages/habits_display/page_habits.dart:1392` 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–11 lines × 2) lib/pages/habits_display/page_today.dart:465— lib/pages/habits_display/page_today.dart:465-474 | lib/pages/habits_display/page_today.dart:582-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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/pages/habits_display/page_today.dart:465` 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 (6 lines × 2) lib/pages/app_settings/_widgets/app_language_changer.dart:112— lib/pages/app_settings/_widgets/app_language_changer.dart:112-117 | lib/pages/app_settings/_widgets/app_setting_first_day.dart:112-117 — 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) lib/storage/db_helper_provider.dart:78— lib/storage/db_helper_provider.dart:78-83 | lib/storage/profile_provider.dart:127-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/storage/profile_provider.dart:134` calls `clear`, `value` and `lib/storage/db_helper_provider.dart:85` 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.
Off the main sequence: mhabit_color_annotation — mhabit_color_annotation: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: mhabit_proxy_annotation — mhabit_proxy_annotation: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Swallowed exception (empty catch) packages/mhabit_desktop_window_chrome/lib/src/desktop_window_chrome.dart:93— 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/mhabit_desktop_window_chrome/lib/src/desktop_window_title_bar.dart:145— 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.
_PageState.build (cyclomatic 42) lib/pages/app_settings/page.dart:592— _PageState.build has cyclomatic complexity 42 (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.
_PageState.build (cyclomatic 41) lib/pages/habit_detail/page.dart:391— _PageState.build has cyclomatic complexity 41 (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.
_DatePickerDialogState.build (cyclomatic 32) lib/widgets/_widgets/date_picker.dart:203— _DatePickerDialogState.build 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.
HabitWidgetService.perform (cyclomatic 29) lib/providers/workflow/habit_widget.dart:54— HabitWidgetService.perform 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.
ProxyGenerator.generateForAnnotatedElement (cyclomatic 26) packages/mhabit_proxy_builder/lib/proxy_generator.dart:81— ProxyGenerator.generateForAnnotatedElement 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.
_AppSyncNowTile.build (cyclomatic 26) lib/pages/common/_widgets/sync_now_tile.dart:45— _AppSyncNowTile.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.
HabitWidgetActionRunner.finish (cyclomatic 25) ios/HabitWidget/App/HabitWidgetActionRunner.swift:231— HabitWidgetActionRunner.finish 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.
HabitWidgetCommand.tryParse (cyclomatic 24) lib/models/habit_widget.dart:125— HabitWidgetCommand.tryParse 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.
HabitDisplaySearchActions._appleIcon (cyclomatic 24) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:476— HabitDisplaySearchActions._appleIcon 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.
AppSyncOwner._applyServerConfigChange (cyclomatic 23) lib/providers/workflow/app_sync.dart:332— AppSyncOwner._applyServerConfigChange 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.
CupertinoAdaptiveModal.build (cyclomatic 23) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:823— CupertinoAdaptiveModal.build 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.
_DBHelper._onUpgrade (cyclomatic 22) lib/storage/db/db_helper.dart:99— _DBHelper._onUpgrade 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.
HabitWidgetHabit.init (cyclomatic 21) ios/HabitWidget/Shared/HabitWidgetSnapshot.swift:150— HabitWidgetHabit.init has cyclomatic complexity 21 (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: HabitWidgetText.englishDefault (cyclomatic 28) 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.
_DonateContentState.build (cyclomatic 20) lib/pages/common/_widgets/donate_dialog.dart:148— _DonateContentState.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.
MaterialAdaptiveModal.build (cyclomatic 20) packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart:443— MaterialAdaptiveModal.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.
FreqChartCalculator.calculate (cyclomatic 18) lib/pages/habit_detail/_providers/habit_detail.dart:801— FreqChartCalculator.calculate 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.
HabitDisplaySelectActions.build (cyclomatic 18) lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:100— HabitDisplaySelectActions.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.
AppSyncTaskDispatcher.buildNewTask (cyclomatic 18) lib/providers/workflow/app_sync.dart:809— AppSyncTaskDispatcher.buildNewTask 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.
_AdaptiveSliverModalRegions.build (cyclomatic 18) packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_modal_layout.dart:495— _AdaptiveSliverModalRegions.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.
HabitScoreChart._buildBottomTitleCell (cyclomatic 18) lib/widgets/_widgets/habit_score_chart.dart:113— HabitScoreChart._buildBottomTitleCell 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.
HabitWidgetActionRunner.validated (cyclomatic 18) ios/HabitWidget/App/HabitWidgetActionRunner.swift:146— HabitWidgetActionRunner.validated 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.
_ImportPreview.build (cyclomatic 17) lib/pages/app_settings/_widgets/import_habits_confirm.dart:315— _ImportPreview.build 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.
HabitsSortViewModel.getSortIcon (cyclomatic 17) lib/providers/app_ui/habits_sort.dart:124— HabitsSortViewModel.getSortIcon 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.
_SelectToolbarLayoutDelegate.performLayout (cyclomatic 17) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_select_app_bar.dart:396— _SelectToolbarLayoutDelegate.performLayout 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.
_HabitFrequencyPickerDialogView.build (cyclomatic 16) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:121— _HabitFrequencyPickerDialogView.build has cyclomatic complexity 16 (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.
HabitStatusChangerForm.convertStatusFromHabit (cyclomatic 16) lib/pages/habits_status_changer/_providers/habit_status_changer.dart:563— HabitStatusChangerForm.convertStatusFromHabit 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.
AppNavigationCoordinator._goToPrimaryBranch (cyclomatic 16) lib/routes/app_navigation_coordinator.dart:270— AppNavigationCoordinator._goToPrimaryBranch 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.
CupertinoAdaptiveListTile.build (cyclomatic 16) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_list_tile.dart:48— CupertinoAdaptiveListTile.build 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.
_AdaptiveOcclusionToolbarState.build (cyclomatic 16) packages/mhabit_adaptive_ui/lib/src/window_control/occlusion_toolbar.dart:127— _AdaptiveOcclusionToolbarState.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.
fill_strings_from_arb.fill_strings (cyclomatic 16) scripts/python-scripts/bin/fill_strings_from_arb.py:242— fill_strings_from_arb.fill_strings 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.
HabitWidgetActionIntent.perform (cyclomatic 16) ios/HabitWidget/Shared/HabitWidgetActionIntent.swift:125— HabitWidgetActionIntent.perform 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.
HabitWidgetService.perform (cognitive 55) lib/providers/workflow/habit_widget.dart:54— HabitWidgetService.perform has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (39 pts), boolean chains 7, error handling 2 (3 pts), match/switch 1 (3 pts), ternaries 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.
_PageState.build (cognitive 43) lib/pages/habit_detail/page.dart:391— _PageState.build has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 14 (18 pts), boolean chains 4, match/switch 2 (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.
_PageState.build (cognitive 42) lib/pages/app_settings/page.dart:592— _PageState.build has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 33 (35 pts), if/else 4, 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.
AppSyncTaskDispatcher.buildNewTask (cognitive 42) lib/providers/workflow/app_sync.dart:809— AppSyncTaskDispatcher.buildNewTask has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (33 pts), match/switch 2 (3 pts), ternaries 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). 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.
ProxyGenerator.generateForAnnotatedElement (cognitive 39) packages/mhabit_proxy_builder/lib/proxy_generator.dart:81— ProxyGenerator.generateForAnnotatedElement has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 6, loops 5 (6 pts), ternaries 2 (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.
_DatePickerDialogState.build (cognitive 36) lib/widgets/_widgets/date_picker.dart:203— _DatePickerDialogState.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 10 (12 pts), match/switch 3 (4 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.
HabitWidgetActionRunner.finish (cognitive 35) ios/HabitWidget/App/HabitWidgetActionRunner.swift:231— HabitWidgetActionRunner.finish has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 12, ternaries 3 (12 pts), if/else 5 (6 pts), match/switch 1 (3 pts), error handling 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.
_DBHelper._onUpgrade (cognitive 34) lib/storage/db/db_helper.dart:99— _DBHelper._onUpgrade has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (32 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.
FreqChartCalculator.calculate (cognitive 32) lib/pages/habit_detail/_providers/habit_detail.dart:801— FreqChartCalculator.calculate has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (23 pts), match/switch 2 (5 pts), if/else 1 (2 pts), loops 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.
_ImportPreview.build (cognitive 30) lib/pages/app_settings/_widgets/import_habits_confirm.dart:315— _ImportPreview.build has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 6 (17 pts), boolean chains 7, loops 2 (4 pts), if/else 1 (2 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.
_AppSyncNowTile.build (cognitive 28) lib/pages/common/_widgets/sync_now_tile.dart:45— _AppSyncNowTile.build has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (21 pts), if/else 2 (3 pts), match/switch 3, 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.
fill_strings_from_arb.parse_strings (cognitive 28) scripts/python-scripts/bin/fill_strings_from_arb.py:141— fill_strings_from_arb.parse_strings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (4 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.
_ImportContent.build (cognitive 27) lib/pages/app_settings/_widgets/import_habits_confirm.dart:532— _ImportContent.build has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 6 (7 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.
fill_strings_from_arb._quoted (cognitive 27) scripts/python-scripts/bin/fill_strings_from_arb.py:82— fill_strings_from_arb._quoted has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (5 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.
HabitDisplaySearchActions._appleIcon (cognitive 26) lib/pages/habits_display/_widgets/actions/habit_display_search_actions.dart:476— HabitDisplaySearchActions._appleIcon has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 4, 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.
AppNavigationCoordinator._goToPrimaryBranch (cognitive 25) lib/routes/app_navigation_coordinator.dart:270— AppNavigationCoordinator._goToPrimaryBranch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 5 (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.
fill_strings_from_arb.fill_strings (cognitive 22) scripts/python-scripts/bin/fill_strings_from_arb.py:242— fill_strings_from_arb.fill_strings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (5 pts), boolean chains 4, 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.
HabitWidgetCommand.tryParse (cognitive 21) lib/models/habit_widget.dart:125— HabitWidgetCommand.tryParse has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, if/else 5, 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.
_DonateContentState.build (cognitive 21) lib/pages/common/_widgets/donate_dialog.dart:148— _DonateContentState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 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.
CupertinoAdaptiveModal.build (cognitive 21) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:823— CupertinoAdaptiveModal.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 12, boolean chains 5, if/else 3, 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.
normalize_arb._format_arb (cognitive 21) scripts/python-scripts/bin/normalize_arb.py:85— normalize_arb._format_arb has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 7, 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.
_HabitSummaryAutoComplateCalculator._calculateCustom (cognitive 20) lib/models/habit_summary.dart:229— _HabitSummaryAutoComplateCalculator._calculateCustom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (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.
AppSyncOwner._applyServerConfigChange (cognitive 20) lib/providers/workflow/app_sync.dart:332— AppSyncOwner._applyServerConfigChange has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6, match/switch 4, boolean chains 2 (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.
HabitWidgetHabit.init (cognitive 20) ios/HabitWidget/Shared/HabitWidgetSnapshot.swift:150— HabitWidgetHabit.init has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 19, 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.
_AppSettingImportHabitsConfirmDialogState.build (cognitive 19) lib/pages/app_settings/_widgets/import_habits_confirm.dart:161— _AppSettingImportHabitsConfirmDialogState.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 3, match/switch 2 (3 pts) (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.
_OtherInfo.build (cognitive 19) lib/pages/habit_detail/page.dart:1117— _OtherInfo.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 6 (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.
HabitDisplaySelectActions.build (cognitive 19) lib/pages/habits_display/_widgets/actions/habit_display_select_actions.dart:100— HabitDisplaySelectActions.build has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 2 (4 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.
_HabitFrequencyPickerDialogView.build (cognitive 18) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:121— _HabitFrequencyPickerDialogView.build has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (6 pts), ternaries 2, boolean chains 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.
HabitsTabPageState._onHabitListReorderMove (cognitive 18) lib/pages/habits_display/page_habits.dart:813— HabitsTabPageState._onHabitListReorderMove has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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.
MaterialAdaptiveModal.build (cognitive 18) packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.dart:443— MaterialAdaptiveModal.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9, boolean chains 6, if/else 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.
HabitsTabPageState._onHabitListReorderComplete (cognitive 17) lib/pages/habits_display/page_habits.dart:846— HabitsTabPageState._onHabitListReorderComplete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 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.
AppSupportOwner._showReminderIfEligible (cognitive 17) lib/providers/workflow/app_support.dart:296— AppSupportOwner._showReminderIfEligible has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, 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.
AppNavigationCoordinator._goToAppFlowRoot (cognitive 17) lib/routes/app_navigation_coordinator.dart:229— AppNavigationCoordinator._goToAppFlowRoot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 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.
_AdaptiveSliverModalRegions.build (cognitive 17) packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_modal_layout.dart:495— _AdaptiveSliverModalRegions.build has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 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.
SyncDBHelper.batchInsertOrUpdateHabitRecordsToDbTransaction (cognitive 17) lib/storage/db/handlers/sync.dart:352— SyncDBHelper.batchInsertOrUpdateHabitRecordsToDbTransaction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 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.
_DatePickerHeader.build (cognitive 17) lib/widgets/_widgets/date_picker.dart:632— _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.
HabitScoreChart._buildBottomTitleCell (cognitive 17) lib/widgets/_widgets/habit_score_chart.dart:113— HabitScoreChart._buildBottomTitleCell has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, match/switch 2 (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.
NormalHabitScore.calcIncreasedDay (cognitive 16) lib/models/_score/score.dart:176— NormalHabitScore.calcIncreasedDay has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 6 (nesting depth added 6). 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.
NegativeHabitScore.calcIncreasedDay (cognitive 16) lib/models/_score/score.dart:353— NegativeHabitScore.calcIncreasedDay has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 6 (nesting depth added 6). 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.
_HabitEditGroupInlineTile._buildMenuChildren (cognitive 16) lib/pages/habit_edit/_widgets/habit_edit_group_tile.dart:176— _HabitEditGroupInlineTile._buildMenuChildren has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 2, loops 1 (2 pts), boolean chains 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.
HabitWidgetConfiguredControls.body (cognitive 16) ios/HabitWidget/Extension/HabitWidgetConfiguredView.swift:156— HabitWidgetConfiguredControls.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (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.
D4 · Code Duplication· Near-duplicate member family (5 members, 23 shared lines) · ×1
Near-duplicate member family (5 members, 23 shared lines) lib/pages/group_manage/_providers/group_manage.dart:226— lib/pages/group_manage/_providers/group_manage.dart:226-287 | lib/pages/habit_detail/_providers/habit_detail.dart:291-360 | lib/pages/habits_display/_providers/habit_summary.dart:358-442 | lib/pages/habits_display/_providers/habits_today.dart:158-236 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:153-241 — These 5 members are variants of one another: a block of 23 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) lib/pages/group_manage/page.dart:190— lib/pages/group_manage/page.dart:190-225 | lib/pages/habits_display/_widgets/habit_display_group_modify_dialog.dart:302-324 | lib/pages/habits_display/page_habits.dart:1417-1456 | lib/pages/habits_display/page_today.dart:229-264 — 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 (64 corresponding lines) · ×1
Edited copy of a member (64 corresponding lines) lib/pages/common/_widgets/not_found_image.dart:79— lib/pages/common/_widgets/not_found_image.dart:79-142 | lib/pages/habits_display/_widgets/habit_display_empty_image.dart:88-159 — 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 (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) lib/pages/habits_display/page_today.dart:437— lib/pages/habits_display/page_today.dart:437-485 | lib/pages/habits_display/page_today.dart:559-596 — 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 copy of a member (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:56— lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:56-108 | lib/pages/habit_detail/_widgets/habit_detail_score_chart.dart:56-123 — 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· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) lib/pages/group_manage/_widgets/group_manage_sliver.dart:169— lib/pages/group_manage/_widgets/group_manage_sliver.dart:169-217 | lib/pages/group_manage/_widgets/group_manage_sliver.dart:266-302 — 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 (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:104— lib/models/_app_sync_tasks/webdav_app_sync_group_subtasks.dart:104-146 | lib/models/_app_sync_tasks/webdav_app_sync_subtasks.dart:152-191 — 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 (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) lib/pages/app_settings/page.dart:255— lib/pages/app_settings/page.dart:255-300 | lib/pages/habits_display/page_habits.dart:507-556 — 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 copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) lib/pages/habits_status_changer/_providers/habit_status_changer.dart:381— lib/pages/habits_status_changer/_providers/habit_status_changer.dart:381-416 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:418-459 — 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 copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) lib/reminders/notification_service.dart:362— lib/reminders/notification_service.dart:362-417 | lib/reminders/notification_service.dart:618-666 — 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 copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) lib/pages/habit_detail/_widgets/habit_heatmap.dart:184— lib/pages/habit_detail/_widgets/habit_heatmap.dart:184-231 | lib/pages/habit_detail/_widgets/habit_heatmap.dart:233-275 — 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 (3 members, 41+ corresponding lines) · ×1
Edited copies of one member (3 members, 41+ corresponding lines) lib/pages/habits_display/page_habits.dart:225— lib/pages/habits_display/page_habits.dart:225-266 | lib/pages/habits_display/page_habits.dart:268-311 | lib/pages/habits_display/page_habits.dart:313-353 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart:252— lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart:252-292 | lib/pages/habits_display/_widgets/actions/habit_display_options_actions.dart:307-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.
D4 · Code Duplication· Edited copies of one member (6 members, 30+ corresponding lines) · ×1
Edited copies of one member (6 members, 30+ corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart:483— lib/pages/habit_detail/_providers/habit_detail.dart:483-515 | lib/pages/habit_detail/_providers/habit_detail.dart:517-548 | lib/pages/habits_display/_providers/habit_summary.dart:815-844 | lib/pages/habits_display/_providers/habit_summary.dart:846-880 | lib/pages/habits_display/_providers/habit_summary.dart:882-921 | lib/pages/habits_display/_providers/habits_today.dart:536-576 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 30 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 (3 members, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) lib/pages/habits_display/_providers/habit_summary.dart:1079— lib/pages/habits_display/_providers/habit_summary.dart:1079-1107 | lib/pages/habits_display/_providers/habit_summary.dart:1109-1137 | lib/pages/habits_display/_providers/habit_summary.dart:1139-1167 — 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 (3 members, 28+ corresponding lines) · ×1
Edited copies of one member (3 members, 28+ corresponding lines) lib/providers/workflow/habits_file_exporter.dart:87— lib/providers/workflow/habits_file_exporter.dart:87-115 | lib/providers/workflow/habits_file_exporter.dart:117-145 | lib/providers/workflow/habits_file_exporter.dart:147-174 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:74— lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:74-90 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_timeout.dart:83-109 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_timeout.dart:83-109 — 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 copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar_actions.dart:195— packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar_actions.dart:195-219 | packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar_actions.dart:235-258 — 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 copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:37— lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:37-61 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_timeout.dart:39-68 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_timeout.dart:39-68 — 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 (6 members, 15+ corresponding lines) · ×1
Edited copies of one member (6 members, 15+ corresponding lines) lib/pages/app_date_format/_widgets/app_date_format_settings.dart:57— lib/pages/app_date_format/_widgets/app_date_format_settings.dart:57-75 | lib/pages/app_date_format/_widgets/app_date_format_settings.dart:149-166 | lib/pages/app_date_format/_widgets/app_date_format_settings.dart:172-189 | lib/pages/app_date_format/_widgets/app_date_format_settings.dart:195-209 | lib/pages/app_date_format/_widgets/app_date_format_settings.dart:215-232 | lib/pages/app_date_format/_widgets/app_date_format_settings.dart:238-255 — These 6 members are one piece of code written 6 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 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) lib/pages/app_sync_server_editor/page.dart:428— lib/pages/app_sync_server_editor/page.dart:428-442 | lib/pages/app_sync_server_editor/page.dart:448-462 | lib/pages/app_sync_server_editor/page.dart:468-482 | lib/pages/app_sync_server_editor/page.dart:488-501 | lib/pages/app_sync_server_editor/page.dart:507-520 — 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 (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) lib/providers/workflow/app_reminder.dart:267— lib/providers/workflow/app_reminder.dart:267-282 | lib/providers/workflow/app_reminder.dart:284-299 | lib/providers/workflow/app_reminder.dart:301-320 — 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 (4 members, 15+ corresponding lines) · ×1
Edited copies of one member (4 members, 15+ corresponding lines) lib/reminders/providers/noti_app_sync_provider.dart:312— lib/reminders/providers/noti_app_sync_provider.dart:312-326 | lib/reminders/providers/noti_app_sync_provider.dart:428-444 | lib/reminders/providers/noti_app_sync_provider.dart:531-545 | lib/reminders/providers/noti_app_sync_provider.dart:652-668 — 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 (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) lib/models/app_event.dart:93— lib/models/app_event.dart:93-105 | lib/models/app_event.dart:131-143 | lib/models/app_event.dart:175-189 — 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 (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) lib/pages/app_about/_widgets/app_about_donate_tile.dart:26— lib/pages/app_about/_widgets/app_about_donate_tile.dart:26-40 | lib/pages/app_about/_widgets/app_about_license_thirdparty_tile.dart:62-75 | lib/pages/app_about/_widgets/app_about_license_tile.dart:50-63 | lib/pages/app_about/_widgets/app_about_privay_tile.dart:76-89 — 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 (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) lib/pages/app_settings/_widgets/app_setting_clear_cache.dart:35— lib/pages/app_settings/_widgets/app_setting_clear_cache.dart:35-46 | lib/pages/common/_widgets/app_sync_confirm_dialog.dart:24-39 | lib/pages/common/_widgets/app_sync_confirm_dialog.dart:45-61 — 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 (5 members, 17+ corresponding lines) · ×1
Edited copies of one member (5 members, 17+ corresponding lines) lib/logging/loggers/widget_logger.dart:151— lib/logging/loggers/widget_logger.dart:151-167 | lib/logging/loggers/widget_logger.dart:169-185 | lib/logging/loggers/widget_logger.dart:187-203 | lib/logging/loggers/widget_logger.dart:205-221 | lib/logging/loggers/widget_logger.dart:223-239 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:306— lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:306-320 | lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:346-360 | lib/pages/habit_edit/_widgets/habit_frequency_picker.dart:401-415 — 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 (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) lib/pages/app_sync_server_editor/page.dart:397— lib/pages/app_sync_server_editor/page.dart:397-406 | lib/pages/app_sync_server_editor/page.dart:412-422 | lib/pages/app_sync_server_editor/page.dart:526-536 — 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· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:117— lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:117-132 | lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:134-149 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:90-105 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:107-122 — 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, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) lib/pages/habit_detail/_providers/habit_detail.dart:125— lib/pages/habit_detail/_providers/habit_detail.dart:125-133 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:121-128 | lib/providers/workflow/app_sync.dart:518-525 — 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· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) lib/pages/group_manage/_providers/group_manage.dart:163— lib/pages/group_manage/_providers/group_manage.dart:163-169 | lib/pages/habit_edit/_providers/habit_form.dart:169-176 | lib/pages/habits_display/_providers/habit_group_modify.dart:153-159 — 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 (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) lib/pages/app_settings/page.dart:131— lib/pages/app_settings/page.dart:131-137 | lib/pages/habit_edit/page.dart:99-104 | lib/pages/habits_display/page_habits.dart:145-152 | lib/pages/habits_status_changer/page.dart:92-97 — 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 (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) lib/storage/profile/handlers/display_group_mode.dart:42— lib/storage/profile/handlers/display_group_mode.dart:42-45 | lib/storage/profile/handlers/display_sort_mode.dart:41-44 | lib/storage/profile/profile_helper.dart:94-97 — 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.
Duplicated block (38–39 lines × 2) lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:474— lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:474-511 | lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:521-559 — 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 `lib/pages/habit_detail/_widgets/habit_detail_freq_chart.dart:474` 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 (28–30 lines × 2) lib/storage/db_helper_builder.dart:45— lib/storage/db_helper_builder.dart:45-74 | lib/storage/profile_builder.dart:53-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 `lib/storage/db_helper_builder.dart:45` 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 × 4) packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:563— packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:563-589 | packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:645-671 | packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:697-723 | packages/mhabit_adaptive_ui/lib/src/window_control/material_app_bar.dart:738-764 — 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 (27 lines × 3) lib/pages/common/_widgets/not_found_image.dart:79— lib/pages/common/_widgets/not_found_image.dart:79-105 | lib/pages/common/_widgets/today_done_image.dart:83-109 | lib/pages/habits_display/_widgets/habit_display_empty_image.dart:88-114 — 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 `lib/pages/common/_widgets/not_found_image.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. 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) lib/pages/habits_display/_providers/habits_today.dart:506— lib/pages/habits_display/_providers/habits_today.dart:506-530 | lib/pages/habits_display/_providers/habits_today.dart:549-573 — 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 `lib/pages/habits_display/_providers/habits_today.dart:506` 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 (24 lines × 2) lib/pages/common/_widgets/habit_record_number_picker.dart:317— lib/pages/common/_widgets/habit_record_number_picker.dart:317-340 | lib/pages/common/_widgets/habit_record_reason_modifier.dart:128-151 — 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 `lib/pages/common/_widgets/habit_record_number_picker.dart:317` 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 × 4) lib/pages/habit_detail/_providers/habit_detail.dart:292— lib/pages/habit_detail/_providers/habit_detail.dart:292-311 | lib/pages/habits_display/_providers/habit_summary.dart:359-378 | lib/pages/habits_display/_providers/habits_today.dart:159-178 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:154-173 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `lib/pages/habit_detail/_providers/habit_detail.dart:292` 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–20 lines × 2) lib/pages/habits_display/_providers/habit_summary.dart:379— lib/pages/habits_display/_providers/habit_summary.dart:379-395 | lib/pages/habits_display/_providers/habits_today.dart:179-198 — before extracting anything, compare `lib/pages/habits_display/_providers/habit_summary.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 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 `lib/pages/habits_display/_providers/habit_summary.dart:379` 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. 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 (18–19 lines × 3) lib/pages/habit_detail/_providers/habit_detail.dart:464— lib/pages/habit_detail/_providers/habit_detail.dart:464-481 | lib/pages/habit_detail/_providers/habit_detail.dart:497-515 | lib/pages/habit_detail/_providers/habit_detail.dart:530-548 — 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 `lib/pages/habit_detail/_providers/habit_detail.dart:464` 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–18 lines × 3) lib/pages/habits_display/_providers/habit_summary.dart:826— lib/pages/habits_display/_providers/habit_summary.dart:826-840 | lib/pages/habits_display/_providers/habit_summary.dart:862-876 | lib/pages/habits_display/_providers/habit_summary.dart:899-916 — 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 `lib/pages/habits_display/_providers/habit_summary.dart:826` 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. 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–17 lines × 5) lib/pages/group_manage/_providers/group_manage.dart:232— lib/pages/group_manage/_providers/group_manage.dart:232-247 | lib/pages/habit_detail/_providers/habit_detail.dart:300-316 | lib/pages/habits_display/_providers/habit_summary.dart:367-383 | lib/pages/habits_display/_providers/habits_today.dart:167-183 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:162-178 — before extracting anything, compare `lib/pages/group_manage/_providers/group_manage.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 3 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. 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 `lib/pages/group_manage/_providers/group_manage.dart:232` 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 `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 (16–17 lines × 2) packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_primary_action.dart:164— packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_primary_action.dart:164-180 | packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_primary_action.dart:183-198 — 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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_primary_action.dart:164` 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 (4–16 lines × 3) lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:78— lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:78-81 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_timeout.dart:86-101 | lib/pages/app_sync_server_editor/_widgets/app_sync_server_timeout.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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/pages/app_sync_server_editor/_widgets/app_sync_server_conn_retry_count.dart:78` 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 lines × 3) lib/pages/habits_display/_providers/habit_summary.dart:1084— lib/pages/habits_display/_providers/habit_summary.dart:1084-1098 | lib/pages/habits_display/_providers/habit_summary.dart:1114-1128 | lib/pages/habits_display/_providers/habit_summary.dart:1144-1158 — 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 `lib/pages/habits_display/_providers/habit_summary.dart:1084` 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 lines × 4) lib/pages/habit_detail/_providers/habit_detail.dart:348— lib/pages/habit_detail/_providers/habit_detail.dart:348-360 | lib/pages/habits_display/_providers/habit_summary.dart:430-442 | lib/pages/habits_display/_providers/habits_today.dart:224-236 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:229-241 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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 `lib/pages/habit_detail/_providers/habit_detail.dart:348` 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 × 5) lib/pages/habits_display/_providers/habit_summary.dart:829— lib/pages/habits_display/_providers/habit_summary.dart:829-840 | lib/pages/habits_display/_providers/habit_summary.dart:865-876 | lib/pages/habits_display/_providers/habit_summary.dart:902-913 | lib/pages/habits_display/_providers/habits_today.dart:514-525 | lib/pages/habits_display/_providers/habits_today.dart:557-568 — before extracting anything, compare `lib/pages/habits_display/_providers/habit_summary.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 121 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 `lib/pages/habits_display/_providers/habit_summary.dart:829` 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 (11–12 lines × 3) lib/pages/habits_display/_providers/habits_today.dart:473— lib/pages/habits_display/_providers/habits_today.dart:473-483 | lib/pages/habits_display/_providers/habits_today.dart:507-518 | lib/pages/habits_display/_providers/habits_today.dart:550-561 — 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 `lib/pages/habits_display/_providers/habits_today.dart:473` 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–11 lines × 3) lib/pages/habits_display/page_habits.dart:245— lib/pages/habits_display/page_habits.dart:245-255 | lib/pages/habits_display/page_habits.dart:288-298 | lib/pages/habits_display/page_habits.dart:334-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 `lib/pages/habits_display/page_habits.dart:245` 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 (9–10 lines × 4) lib/pages/habits_display/_providers/habit_summary.dart:802— lib/pages/habits_display/_providers/habit_summary.dart:802-810 | lib/pages/habits_display/_providers/habit_summary.dart:825-833 | lib/pages/habits_display/_providers/habit_summary.dart:860-869 | lib/pages/habits_display/_providers/habit_summary.dart:897-906 — 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 `lib/pages/habits_display/_providers/habit_summary.dart:802` 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–8 lines × 2) lib/pages/app_sync_server_editor/page.dart:397— lib/pages/app_sync_server_editor/page.dart:397-403 | lib/pages/app_sync_server_editor/page.dart:412-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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/pages/app_sync_server_editor/page.dart:397` 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 lines × 5) lib/pages/group_manage/_providers/group_manage.dart:277— lib/pages/group_manage/_providers/group_manage.dart:277-283 | lib/pages/habit_detail/_providers/habit_detail.dart:348-355 | lib/pages/habits_display/_providers/habit_summary.dart:430-437 | lib/pages/habits_display/_providers/habits_today.dart:224-231 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:229-236 — before extracting anything, compare `lib/pages/group_manage/_providers/group_manage.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 3 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. 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 `lib/pages/group_manage/_providers/group_manage.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. 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) lib/reminders/providers/noti_app_sync_provider.dart:380— lib/reminders/providers/noti_app_sync_provider.dart:380-385 | lib/reminders/providers/noti_app_sync_provider.dart:495-500 | lib/reminders/providers/noti_app_sync_provider.dart:715-720 — 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 `lib/reminders/providers/noti_app_sync_provider.dart:380` 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, `lib/reminders/providers/noti_app_sync_provider.dart:493` calls `copyWith` and `lib/reminders/providers/noti_app_sync_provider.dart:378` 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 (3–5 lines × 4) lib/pages/group_manage/page.dart:201— lib/pages/group_manage/page.dart:201-205 | lib/pages/habits_display/_widgets/habit_display_group_modify_dialog.dart:306-310 | lib/pages/habits_display/page_habits.dart:1421-1425 | lib/pages/habits_display/page_today.dart:232-234 — 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 `lib/pages/group_manage/page.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. 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, `lib/pages/habits_display/page_today.dart:234` calls `FutureBuilder`, `loadData` and `lib/pages/habits_display/page_habits.dart:1425` 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 (5 lines × 4) lib/pages/app_about/page.dart:58— lib/pages/app_about/page.dart:58-62 | lib/pages/app_sync/page.dart:50-54 | lib/pages/expermental_features/page.dart:65-69 | lib/pages/habit_detail/page.dart:143-147 — 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.
Duplicated block (7 lines × 3) lib/pages/group_manage/_providers/group_manage.dart:181— lib/pages/group_manage/_providers/group_manage.dart:181-187 | lib/pages/habits_display/_providers/habit_group_modify.dart:171-177 | lib/pages/habits_display/_providers/habits_today.dart:383-389 — before extracting anything, compare `lib/pages/group_manage/_providers/group_manage.dart` and `lib/pages/habits_display/_providers/habits_today.dart` as WHOLE FILES: this scan already matched 3 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. 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 × 6) lib/pages/habit_detail/_providers/habit_detail.dart:163— lib/pages/habit_detail/_providers/habit_detail.dart:163-169 | lib/pages/habit_detail/_providers/habit_detail_freqchart.dart:73-79 | lib/pages/habit_detail/_providers/habit_detail_scorechart.dart:50-56 | lib/pages/habits_display/_providers/habit_summary.dart:185-191 | lib/pages/habits_display/_providers/habits_today.dart:117-123 | lib/pages/habits_status_changer/_providers/habit_status_changer.dart:247-253 — before extracting anything, compare `lib/pages/habit_detail/_providers/habit_detail.dart` and `lib/pages/habits_display/_providers/habit_summary.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 91 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.
IC1 · Incompleteness & stubs· Empty method body · ×1
Empty method body — does nothing with its inputs lib/reminders/notification_data.dart:61— `_decodeChildFromPayload` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
X18 · Disposal-pattern correctness· Owned disposable field is never released · ×1
Owned disposable field is never released lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:86— `_HabitEditReplacementRecordCalendarDialog` carries a disposal duty — a `State`, so the framework calls its `dispose()` when it leaves the tree — and it creates `_heatmapScrollController` itself (line 86, `ScrollController`), which makes that instance its own. Nothing in the class releases it — no `_heatmapScrollController.dispose()`, 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, `ScrollController` 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: `_heatmapScrollController.dispose();` in `dispose()` before `super.dispose()`.
Duplicated predicate lib/pages/app_settings/page.dart:271— `!context.mounted || confirmResult == null` appears character-identically in 2 files — lib/pages/app_settings/page.dart, lib/pages/habits_display/page_habits.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 lib/pages/app_sync_server_editor/_widgets/app_sync_server_form_input.dart:57— `!controllerInitialized || !identical(vm, newVm)` appears character-identically in 2 files — lib/pages/app_sync_server_editor/_widgets/app_sync_server_form_input.dart, lib/widgets/_widgets/text_editing_controller_widget.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 lib/entries/app/navigation_chrome.dart:51— `AppThemeType.unknown || AppThemeType.followSystem` appears character-identically in 4 files — lib/entries/app/navigation_chrome.dart, lib/pages/app_settings/_widgets/app_setting_theme_mode.dart, lib/pages/common/_widgets/app_navigation_action_buttons.dart, lib/pages/habits_display/_widgets/actions/habit_display_options_actions.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 lib/pages/group_manage/_providers/group_manage.dart:168— `HabitStatusChangedEvent() || HabitRecordsChangedEvent()` appears character-identically in 2 files — lib/pages/group_manage/_providers/group_manage.dart, lib/pages/habits_display/_providers/habit_group_modify.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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart:208— `NavigationShellForm.constrainedSide || NavigationShellForm.expandedSide` appears character-identically in 2 files — packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_navigation_shell.dart, packages/mhabit_adaptive_ui/lib/src/material/material_navigation_shell.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 lib/extensions/target_platform_extensions.dart:23— `TargetPlatform.android || TargetPlatform.iOS` appears character-identically in 3 files — lib/extensions/target_platform_extensions.dart, lib/providers/app_ui/group_expand_timer_config.dart, lib/utils/xshare.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 lib/reminders/providers/noti_app_sync_provider.dart:56— `TargetPlatform.iOS || TargetPlatform.macOS` appears character-identically in 2 files — lib/reminders/providers/noti_app_sync_provider.dart, packages/mhabit_adaptive_ui/lib/src/adaptive_style.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 lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart:144— `WindowSizeClass.large || WindowSizeClass.extraLarge` appears character-identically in 2 files — lib/pages/group_manage/_widgets/group_manage_app_bar_actions.dart, lib/pages/habit_detail/_widgets/habit_detail_appbar_actions.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/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart:885— `appBar != null && presentation == AdaptiveModalPresentation.sheet && sheetDragController != null` appears character-identically in 2 files — packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_adaptive_modal.dart, packages/mhabit_adaptive_ui/lib/src/material/material_adaptive_modal.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 lib/pages/common/_widgets/habit_record_number_picker.dart:226— `confirmed != true || !mounted || route?.isCurrent != true` appears character-identically in 2 files — lib/pages/common/_widgets/habit_record_number_picker.dart, lib/pages/common/_widgets/habit_record_reason_modifier.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 lib/pages/habit_detail/_providers/habit_detail.dart:441— `data == null || data.getRecordByDate(date) == null` appears character-identically in 2 files — lib/pages/habit_detail/_providers/habit_detail.dart, lib/pages/habits_display/_providers/habit_summary.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 lib/storage/db/handlers/sync.dart:292— `data.unknown == null || data.unknown!.isEmpty` appears character-identically in 2 files — lib/storage/db/handlers/sync.dart, lib/storage/db/handlers/sync_group.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 lib/pages/habits_display/_widgets/habit_display_appbar.dart:375— `extent != oldDelegate.extent || child != oldDelegate.child` appears character-identically in 3 files — lib/pages/habits_display/_widgets/habit_display_appbar.dart, packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_app_bar.dart, packages/mhabit_adaptive_ui/lib/src/cupertino/cupertino_sliver_search_bar.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 lib/widgets/app_bar_action_budget.dart:65— `maxPrimaryActions == null || maxPrimaryActions >= 0` appears character-identically in 2 files — lib/widgets/app_bar_action_budget.dart, packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar_actions.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 lib/widgets/app_bar_action_budget.dart:89— `primaryCapacity >= 0 && primaryCapacity < double.infinity` appears character-identically in 2 files — lib/widgets/app_bar_action_budget.dart, packages/mhabit_adaptive_ui/lib/src/adaptive/adaptive_app_bar_actions.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 lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart:169— `record != null && record.status == HabitRecordStatus.done` appears character-identically in 2 files — lib/pages/habit_detail/_widgets/habit_edit_repl_rcd_cal.dart, lib/pages/habits_display/_providers/habit_summary.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 lib/pages/habits_display/page_habits.dart:464— `result == null || result == record?.value` appears character-identically in 2 files — lib/pages/habits_display/page_habits.dart, lib/pages/habits_display/page_today.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 lib/storage/db_helper_builder.dart:50— `snapshot.hasError || (snapshot.hasData && snapshot.data == false)` appears character-identically in 2 files — lib/storage/db_helper_builder.dart, lib/storage/profile_builder.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 lib/models/_app_sync_tasks/app_sync_task.dart:76— `status == AppSyncTaskStatus.running || status == AppSyncTaskStatus.cancelling` appears character-identically in 2 files — lib/models/_app_sync_tasks/app_sync_task.dart, lib/pages/common/_widgets/sync_now_tile.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 lib/pages/group_manage/_widgets/group_manage_grid_item.dart:50— `widget.selectionMode && widget.isSelected` appears character-identically in 2 files — lib/pages/group_manage/_widgets/group_manage_grid_item.dart, lib/pages/group_manage/_widgets/group_manage_list_item.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.
D21 · Naming Consistency· `_groupUuidMapping` spells `Uuid` where 26 names in the project spell it `UUID` · ×2
`_groupUuidMapping` spells `Uuid` where 26 names in the project spell it `UUID` lib/models/habit_import.dart:27— 26 of 28 names in project repository.models spell the token `UUID` (26 of 28; unit: names in project repository.models containing `UUID`). Peers: _WebDavAppSyncCellInfo.configUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:107); _WebDavAppSyncCellInfo.lastConfgUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:111); _WebDavAppSyncCellInfo._WebDavAppSyncCellInfo(configUUID) (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:116); WebDavResourceContainer.habitUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:181); WebDavResourceContainer.recordUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:187). Rename to `_groupUUIDMapping`. [rule N6]
`_groupUuidMapping` spells `Uuid` where 26 names in the project spell it `UUID` lib/models/habit_import.dart:30— 26 of 28 names in project repository.models spell the token `UUID` (26 of 28; unit: names in project repository.models containing `UUID`). Peers: _WebDavAppSyncCellInfo.configUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:107); _WebDavAppSyncCellInfo.lastConfgUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:111); _WebDavAppSyncCellInfo._WebDavAppSyncCellInfo(configUUID) (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:116); WebDavResourceContainer.habitUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:181); WebDavResourceContainer.recordUUID (lib/models/_app_sync_tasks/webdav_app_sync_models.dart:187). Rename to `_groupUUIDMapping`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×2
Projects may be oversized for their cohesion pubspec.yaml:1— `(repository root)` (77401 LoC, 886 module-visible types across 75 directories) overshoots its size bounds. 2 of 13 build unit(s) (Bundler, Gradle, Python, SwiftPM, pub) overshoot their size bounds, lowering Project Cohesion to 6.9/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/mhabit_adaptive_ui/pubspec.yaml:1— `packages/mhabit_adaptive_ui` (18791 LoC, 181 module-visible types across 8 directories) overshoots its size bounds. 2 of 13 build unit(s) (Bundler, Gradle, Python, SwiftPM, pub) overshoot their size bounds, lowering Project Cohesion to 6.9/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.
Fat interface: AppLoggerMananger (21 abstract methods) lib/logging/logger_manager.dart:31— `AppLoggerMananger` declares 21 abstract methods: `logger`, `debugger`, `build`, `value`, `navi`, `db`, `profile`, `load`, `notify`, `import`, `export`, `habit`, `habitWidget`, `network`, `json`, `l10n`, `cache`, `appsync`, `appsynctask`, `changeLogger`, `changeLoggerByType`. 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.
No ADRs found macos/Runner.xcodeproj/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 `macos/Runner.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
IC1 · Incompleteness & stubs· Member throws UnsupportedError · ×1
Member throws UnsupportedError lib/annotations/_json_converters/contributor_converter.dart:90— `toJson`'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.
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.
Logging is not universal — Only 2/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `macos`, `packages/mhabit_desktop_window_chrome`.
No SAST REDACTED:4— 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 17 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 pip/gitsubmodule · ×1
Dependabot does not watch pip/gitsubmodule REDACTED:2— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `pip`, `gitsubmodule`, 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.
Silent fallback default in catch android/app/src/main/kotlin/io/github/friesi23/mhabit/AnimationScaleStreamHandler.kt:70— `readScale` swallows every exception into `1.0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Outdated: dotenv — `dotenv` is resolved to 2.8.1 in the committed REDACTED but 3.2.0 is the current release on rubygems.org, and ios/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. This crosses a major version, so read the changelog before taking it. Run `bundle update dotenv` and commit the updated REDACTED.
Outdated: fastlane — `fastlane` is resolved to 2.234.0 in the committed REDACTED but 2.242.0 is the current release on rubygems.org, and android/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update fastlane` and commit the updated REDACTED.
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.
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 10 file(s) — `ios/HabitWidget/App/HabitWidgetActionRunner.swift`, `ios/HabitWidget/Extension/HabitWidget.swift`, `ios/HabitWidget/Shared/HabitWidgetActionIntent.swift`, `ios/HabitWidget/Shared/HabitWidgetConfiguration.swift`, `ios/HabitWidget/Shared/HabitWidgetHold.swift`, … (+5 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
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.
Run 01a1eb03-0de2-73d2-8848-7200f3818822 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 106 · Warnings: 508 · Recommendations: 37 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 19:36 UTC.
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.