Public report of RyanYuuki/AnymeX, published 21 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog 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, 21 October 2026, 02:04 UTC · Survey ID cd_34ec4032470247b0a104c6bd384a58fd

RyanYuuki/AnymeX

Measured 21 October 2026, 01:57 UTC, at code version b613124

CAI score 33out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 16 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: 224,103 lines of product code in 8 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Security and Compliance, 14

Findings by how serious they are

69 critical 2174 serious 93 minor

8 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
21 October 2026, 01:57 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 Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸

66of 70 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
2316of 2336 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
70dimensions across 7 lenses, read from 224,103 lines of product code in 8 projects.
Chapters

Executive summary

RyanYuuki/AnymeX scores 33 out of 100 and is rated Weak, while six of its seven lenses score higher still: Domain Modelling at 100 and Architecture at 95, both rated Exemplary, Performance at 60 and Maturity at 52, both rated Adequate, and Code Health at 48 and Production Readiness at 40, both rated Weak.

The score is lower than those six because the weakest lens counts most, and here that is Security and Compliance, which scores 14 and is rated Critical. Its Access Controls dimension scores 0 out of 10, and until that reaches 4, Security and Compliance can't be rated higher than Adequate. The first actions are to protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do and to stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off, and if Security and Compliance rose to 70, the score would rise from 33 to about 49.

69 findings are critical: 47 in Static Analysis (SAST), eight in Secrets (history), five in REDACTED Scanning, four in Change Coupling, three in Web-Security Posture and two in License Compliance.

Watchdog couldn't measure 7 dimensions in this code, among them Code Coverage, Test Reliability and Dependency Hygiene, so they are left out of the score. The product code is 224,103 lines, which would take an estimated 1.3 person-years, around €190,000, to rebuild.

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

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

If Security and Compliance rose from 14 to 70, the lowest score rated Strong, the score would rise from 33 to about 49.

Code composition: what the lines of code are
Product code 99%Tests 1%
New since the last survey: 310 findings

These 310 critical or serious findings weren't in the previous survey, on 5 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · _CommentsRepliesSheetState._buildCommentCard (cyclomatic 45) lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart
  • Cyclomatic Complexity · _UserSearchSheetState.build (cyclomatic 39) lib/screens/settings/sub_settings/settings_moderation.dart
  • Cyclomatic Complexity · _CommentSectionState._showUserHistoryDialog (cyclomatic 30) lib/screens/anime/widgets/comments/comments_section.dart
  • Cyclomatic Complexity · _CommentSectionState._buildCommentItem (cyclomatic 28) lib/screens/anime/widgets/comments/comments_section.dart
  • Cyclomatic Complexity · _LeaderboardSheetState._buildLeaderboardTile (cyclomatic 28) lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart
  • Cyclomatic Complexity · ActivityComposerSheetState._buildFormatButton (cyclomatic 28) lib/widgets/non_widgets/activity_composer_sheet.dart
  • Cyclomatic Complexity · _DecorationClosetSheetState._onSavePressed (cyclomatic 24) lib/screens/profile/widgets/decoration_closet_sheet.dart
  • Cyclomatic Complexity · _WatchiumPageState._joinByCode (cyclomatic 21) lib/screens/watchium/watchium_page.dart
  • Cyclomatic Complexity · _CommentSectionState._buildReplyItem (cyclomatic 20) lib/screens/anime/widgets/comments/comments_section.dart
  • Cyclomatic Complexity · _CommentSectionState._showUserInfoDialog (cyclomatic 20) lib/screens/anime/widgets/comments/comments_section.dart
  • Cyclomatic Complexity · _UserCommentsSheetContentState.build (cyclomatic 20) lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart
  • Cyclomatic Complexity · DiscordMarkdown.build (cyclomatic 19) lib/screens/anime/widgets/comments/discord_markdown.dart
  • Cyclomatic Complexity · _MentionAutocompleteState._searchUsers (cyclomatic 19) lib/screens/anime/widgets/comments/mention_autocomplete.dart
  • Cyclomatic Complexity · _WatchiumPageState._joinRoomFromCard (cyclomatic 19) lib/screens/watchium/watchium_page.dart
  • Cyclomatic Complexity · _CommentSectionState._buildCommentWithReplies (cyclomatic 18) lib/screens/anime/widgets/comments/comments_section.dart
  • Cyclomatic Complexity · _AnymeXModerationActionSheetState.build (cyclomatic 18) lib/screens/settings/sub_settings/widgets/moderation_action_sheet.dart
  • Cyclomatic Complexity · _WatchiumPageState._buildJoinByCodeSection (cyclomatic 18) lib/screens/watchium/watchium_page.dart
  • Cyclomatic Complexity · AnymeXDecoratedAvatar.build (cyclomatic 18) lib/widgets/anymex_widgets/anymex_decorated_avatar.dart
  • Cyclomatic Complexity · LeaderboardEntry.fromMap (cyclomatic 17) lib/database/comments/model/leaderboard_entry.dart
  • Cyclomatic Complexity · DiscordMarkdown._parseImgTag (cyclomatic 17) lib/screens/anime/widgets/comments/discord_markdown.dart
  • Cyclomatic Complexity · SocialTabState.loadMore (cyclomatic 17) lib/screens/profile/widgets/social_tab.dart
  • Cyclomatic Complexity · CommentumService._mapCommentumToAnymeXComment (cyclomatic 17) lib/services/commentum_service.dart
  • Cyclomatic Complexity · LinkedAccountsBadges.build (cyclomatic 17) lib/widgets/anymex_widgets/linked_accounts_badges.dart
  • Cyclomatic Complexity · WatchiumService.createRoom (cyclomatic 16) lib/controllers/watchium/watchium_service.dart
  • Cyclomatic Complexity · CommentumService.createComment (cyclomatic 16) lib/services/commentum_service.dart
  • Cyclomatic Complexity · _WatchiumCreateSheetState._joinRoom (cyclomatic 16) lib/widgets/watchium/watchium_create_dialog.dart
  • Cyclomatic Complexity · _WatchiumPartyPopupContentState._buildMemberTrailing (cyclomatic 16) lib/widgets/watchium/watchium_party_popup.dart
  • Cognitive Complexity · _CommentsRepliesSheetState._buildCommentCard (cognitive 57) lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart
  • Cognitive Complexity · ActivityComposerSheetState._buildFormatButton (cognitive 52) lib/widgets/non_widgets/activity_composer_sheet.dart
  • Cognitive Complexity · _UserSearchSheetState.build (cognitive 43) lib/screens/settings/sub_settings/settings_moderation.dart
  • Cognitive Complexity · _CommentSectionState._buildCommentItem (cognitive 35) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · _MentionAutocompleteState._searchUsers (cognitive 35) lib/screens/anime/widgets/comments/mention_autocomplete.dart
  • Cognitive Complexity · _GifPickerSheetState._fetchTrending (cognitive 33) lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart
  • Cognitive Complexity · _GifPickerSheetState._searchGifs (cognitive 33) lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart
  • Cognitive Complexity · CommentumService.updateCustomizations (cognitive 31) lib/services/commentum_service.dart
  • Cognitive Complexity · DiscordMarkdown.build (cognitive 30) lib/screens/anime/widgets/comments/discord_markdown.dart
  • Cognitive Complexity · _LeaderboardSheetState._buildLeaderboardTile (cognitive 30) lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart
  • Cognitive Complexity · _UserProfilePageState._fetchProfile (cognitive 29) lib/screens/profile/user_profile_page.dart
  • Cognitive Complexity · _DecorationClosetSheetState._onSavePressed (cognitive 27) lib/screens/profile/widgets/decoration_closet_sheet.dart
  • Cognitive Complexity · _AnymeXModerationActionSheetState.build (cognitive 25) lib/screens/settings/sub_settings/widgets/moderation_action_sheet.dart
  • Cognitive Complexity · _WatchiumPageState._joinRoomFromCard (cognitive 25) lib/screens/watchium/watchium_page.dart
  • Cognitive Complexity · CommentumService.deleteComment (cognitive 25) lib/services/commentum_service.dart
  • Cognitive Complexity · _WatchiumCreateSheetState._joinRoom (cognitive 24) lib/widgets/watchium/watchium_create_dialog.dart
  • Cognitive Complexity · _UserCommentsSheetContentState.build (cognitive 23) lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart
  • Cognitive Complexity · _CommentSectionState._buildReplyItem (cognitive 22) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · CommentSectionController.formatCommentTimestamp (cognitive 22) lib/screens/anime/widgets/comments/controller/comments_controller.dart
  • Cognitive Complexity · MarkdownListInputFormatter.formatEditUpdate (cognitive 22) lib/widgets/non_widgets/activity_composer_sheet.dart
  • Cognitive Complexity · WatchiumService.createRoom (cognitive 21) lib/controllers/watchium/watchium_service.dart
  • Cognitive Complexity · _CommentSectionState._buildCommentWithReplies (cognitive 21) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · _LeaderboardSheetState.build (cognitive 21) lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart
  • Cognitive Complexity · _UserListPageState._loadMoreUsers (cognitive 21) lib/screens/settings/sub_settings/settings_moderation.dart
  • Cognitive Complexity · CommentumService._mapCommentumToAnymeXComment (cognitive 21) lib/services/commentum_service.dart
  • Cognitive Complexity · CommentsDatabase.organizeComments (cognitive 20) lib/database/comments/comments_db.dart
  • Cognitive Complexity · _UserListPageState._loadUsers (cognitive 20) lib/screens/settings/sub_settings/settings_moderation.dart
  • Cognitive Complexity · _WatchiumPageState._buildJoinByCodeSection (cognitive 20) lib/screens/watchium/watchium_page.dart
  • Cognitive Complexity · CustomizationRepository.loadBanners (cognitive 19) lib/database/comments/model/user_customization.dart
  • Cognitive Complexity · _CommentSectionState._findParentUsername (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · _CommentSectionState._findParentRole (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · _CommentSectionState._showCommentContextMenu (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · _CommentSectionState._showUserInfoDialog (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart
  • Cognitive Complexity · _UserCommentsSheetContentState._privateRows (cognitive 19) lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart
  • Cognitive Complexity · _ReportsQueuePageState._buildReportCard (cognitive 19) lib/screens/settings/sub_settings/settings_moderation.dart
  • Cognitive Complexity · _WatchiumPageState._handleDeepLinkRoom (cognitive 19) lib/screens/watchium/watchium_page.dart
  • Cognitive Complexity · AnymeXDecoratedAvatar.build (cognitive 19) lib/widgets/anymex_widgets/anymex_decorated_avatar.dart
  • Cognitive Complexity · LeaderboardEntry.fromMap (cognitive 18) lib/database/comments/model/leaderboard_entry.dart
  • Cognitive Complexity · DiscordMarkdown._parseImgTag (cognitive 18) lib/screens/anime/widgets/comments/discord_markdown.dart
  • Cognitive Complexity · SocialTabState._fetchSocial (cognitive 18) lib/screens/profile/widgets/social_tab.dart
  • Cognitive Complexity · _WatchiumPartyPopupContentState._buildMemberTrailing (cognitive 18) lib/widgets/watchium/watchium_party_popup.dart
  • Cognitive Complexity · MarkdownFormattingToolbar._insertNumberedList (cognitive 17) lib/screens/anime/widgets/comments/discord_markdown.dart
  • Cognitive Complexity · _CommentInputBarState.build (cognitive 17) lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart
  • Cognitive Complexity · _SettingsAccountsState._autoSyncLinkedAccounts (cognitive 17) lib/screens/settings/sub_settings/settings_accounts.dart
  • Cognitive Complexity · _WatchiumPageState._showPasswordDialog (cognitive 17) lib/screens/watchium/watchium_page.dart
  • Cognitive Complexity · CommentumService.manageUser (cognitive 17) lib/services/commentum_service.dart
  • Cognitive Complexity · CommentumService.fetchUserCustomizations (cognitive 17) lib/services/commentum_service.dart
  • Cognitive Complexity · WatchiumService.joinRoom (cognitive 16) lib/controllers/watchium/watchium_service.dart
  • Cognitive Complexity · _WatchTogetherPopupContentState._createRoom (cognitive 16) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart
  • Cognitive Complexity · CommentumService.listUsers (cognitive 16) lib/services/commentum_service.dart
  • Cognitive Complexity · NotificationService._navigateFromNotification (cognitive 16) lib/utils/notification.dart
  • Cognitive Complexity · LinkedAccountsBadges.build (cognitive 16) lib/widgets/anymex_widgets/linked_accounts_badges.dart
  • Cognitive Complexity · _WatchiumCreateSheetState._createRoom (cognitive 16) lib/widgets/watchium/watchium_create_dialog.dart
  • God Classes · ClassTooLong: CommentumService lib/services/commentum_service.dart
  • God Classes · MethodTooLong: _UserSearchSheetState.build lib/screens/settings/sub_settings/settings_moderation.dart
  • God Classes · FileTooLong: sub_settings/settings_moderation.dart lib/screens/settings/sub_settings/settings_moderation.dart
  • God Classes · FileTooLong: services/commentum_service.dart lib/services/commentum_service.dart
  • God Classes · MethodTooLong: _CommentsRepliesSheetState._buildCommentCard lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart
  • God Classes · MethodTooLong: _ReportsQueuePageState._buildReportCard lib/screens/settings/sub_settings/settings_moderation.dart
  • God Classes · TooManyMethods: CommentumService lib/services/commentum_service.dart
  • God Classes · ClassTooLong: _DecorationClosetSheetState lib/screens/profile/widgets/decoration_closet_sheet.dart
  • God Classes · MethodTooLong: _UserManagementPageState.build lib/screens/settings/sub_settings/settings_moderation.dart
  • God Classes · MethodTooLong: _AnymeXModerationActionSheetState.build lib/screens/settings/sub_settings/widgets/moderation_action_sheet.dart
  • God Classes · TooManyMethods: _CommentSectionState lib/screens/anime/widgets/comments/comments_section.dart
  • God Classes · MethodTooLong: _SettingsCommentsState.build lib/screens/settings/sub_settings/settings_comments.dart
  • God Classes · FileTooLong: widgets/decoration_closet_sheet.dart lib/screens/profile/widgets/decoration_closet_sheet.dart
  • God Classes · MethodTooLong: _CommentSectionState._showCommentContextMenu lib/screens/anime/widgets/comments/comments_section.dart
  • God Classes · MethodTooLong: _GifPickerSheetState.build lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart
  • God Classes · MethodTooLong: _CommentInputBarState.build lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart
  • God Classes · MethodTooLong: _WatchiumPageState._showPasswordDialog lib/screens/watchium/watchium_page.dart
  • God Classes · TooManyMethods: CommentSectionController lib/screens/anime/widgets/comments/controller/comments_controller.dart
  • God Classes · MethodTooLong: _LeaderboardSheetState.build lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart
  • God Classes · MethodTooLong: _LeaderboardSheetState._buildLeaderboardTile lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart

Watchdog compares 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: 195 findings

These 195 critical or serious findings were in the previous survey, on 5 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · _WatchiumPartyPopupContentState._buildMembersList (cyclomatic 20) lib/widgets/watchium/watchium_party_popup.dart
  • Cognitive Complexity · _WatchiumPartyPopupContentState._buildMembersList (cognitive 24) lib/widgets/watchium/watchium_party_popup.dart
  • God Classes · MethodTooLong: _WatchiumPartyPopupContentState._buildMembersList lib/widgets/watchium/watchium_party_popup.dart
  • God Classes · MethodTooLong: _SettingsModerationState.build lib/screens/settings/sub_settings/settings_moderation.dart
  • Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) lib/screens/library/widgets/library_deps.dart
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) lib/widgets/non_widgets/reasons_sheet.dart
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/network/cookie_manager.dart
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/anime/widgets/comments/comments_section.dart
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/anime/widgets/list_editor.dart
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/settings/sub_settings/settings_extensions.dart
  • Code Duplication · Duplicated block (34–41 lines × 2) lib/screens/profile/widgets/social_tab.dart
  • Code Duplication · Duplicated block (37–40 lines × 2) lib/screens/profile/widgets/profile_header.dart
  • Code Duplication · Duplicated block (38–39 lines × 2) lib/screens/profile/widgets/profile_header.dart
  • Code Duplication · Duplicated block (28–29 lines × 2) lib/screens/profile/widgets/profile_header.dart
  • Code Duplication · Duplicated block (23 lines × 2) lib/screens/profile/widgets/profile_header.dart
  • Code Duplication · Duplicated block (22 lines × 2) lib/screens/profile/activity_details_page.dart
  • Code Duplication · Duplicated block (20–21 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (20 lines × 3) lib/screens/anime/misc/list_exporter.dart
  • Code Duplication · Duplicated block (20 lines × 3) lib/screens/anime/misc/list_exporter.dart
  • Code Duplication · Duplicated block (18 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart
  • Code Duplication · Duplicated block (18 lines × 2) lib/services/commentum_service.dart
  • Code Duplication · Duplicated block (16–17 lines × 3) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (16–17 lines × 3) lib/screens/settings/sub_settings/settings_extensions.dart
  • Code Duplication · Duplicated block (15–16 lines × 8) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (15–16 lines × 2) lib/controllers/watchium/watchium_service.dart
  • Code Duplication · Duplicated block (16 lines × 2) lib/screens/profile/widgets/profile_header.dart
  • Code Duplication · Duplicated block (16 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (15 lines × 9) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (15 lines × 2) lib/widgets/watchium/watchium_create_dialog.dart
  • Code Duplication · Duplicated block (13 lines × 3) lib/screens/profile/widgets/profile_header.dart
  • Code Duplication · Duplicated block (13 lines × 3) lib/screens/settings/sub_settings/settings_moderation.dart
  • Code Duplication · Duplicated block (13 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (12 lines × 5) lib/widgets/non_widgets/reasons_sheet.dart
  • Code Duplication · Duplicated block (12 lines × 2) lib/widgets/watchium/watchium_create_dialog.dart
  • Code Duplication · Duplicated block (12 lines × 2) lib/widgets/watchium/watchium_party_popup.dart
  • Code Duplication · Duplicated block (9–11 lines × 3) lib/screens/anime/widgets/episode_list_builder.dart
  • Code Duplication · Duplicated block (11 lines × 3) lib/screens/settings/sub_settings/settings_comments.dart
  • Code Duplication · Duplicated block (10–11 lines × 2) lib/screens/profile/activity_details_page.dart
  • Code Duplication · Duplicated block (11 lines × 2) lib/screens/profile/activity_details_page.dart
  • Code Duplication · Duplicated block (10–11 lines × 2) lib/widgets/watchium/watchium_party_popup.dart
  • Code Duplication · Duplicated block (10 lines × 4) lib/widgets/non_widgets/reasons_sheet.dart
  • Code Duplication · Duplicated block (10 lines × 2) lib/screens/profile/activity_details_page.dart
  • Code Duplication · Duplicated block (10 lines × 2) lib/widgets/header/header.dart
  • Code Duplication · Duplicated block (9 lines × 3) lib/screens/profile/activity_details_page.dart
  • Code Duplication · Duplicated block (9 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart
  • Code Duplication · Duplicated block (8 lines × 6) lib/screens/anime/widgets/comments/comments_section.dart
  • Code Duplication · Duplicated block (8 lines × 4) lib/screens/library/widgets/library_deps.dart
  • Code Duplication · Duplicated block (5 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart
  • Code Duplication · Duplicated block (5 lines × 2) lib/widgets/watchium/watchium_create_dialog.dart
  • Code Duplication · Duplicated block (13 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart
  • Churn × Complexity Hotspots · Hotspot: lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Exception handling · Swallowed exception (empty catch) lib/database/database.dart
  • Exception handling · Swallowed exception (empty catch) lib/database/database.dart
  • Exception handling · Swallowed exception (empty catch) lib/database/database.dart
  • Exception handling · Swallowed exception (empty catch) lib/database/database.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/models/Anilist/anilist_media_user.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/models/Anilist/anilist_media_user.dart
  • Exception handling · Swallowed exception (empty catch) lib/models/Media/media.dart
  • Exception handling · Swallowed exception (empty catch) lib/models/Media/media.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/repositories/tap_zone_repository.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/details/controller/media_details_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/details/controller/media_details_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/misc/calendar.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/misc/calendar.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/watch_view.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/watch_view.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/watch_view.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/anime/watch/controller/player_controller.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/anime/watch/controls/center_controls.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/anime/watch/controls/widgets/progress_slider.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/anime/watch/controls/widgets/double_tap_seek.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/watch/player/media_kit_player.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/anime/widgets/character_staff_sheet.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/widgets/character_staff_sheet.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/widgets/character_staff_sheet.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/widgets/character_staff_sheet.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/anime/widgets/character_staff_sheet.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/anime/widgets/character_staff_sheet.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/downloads/controller/download_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/downloads/controller/download_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/downloads/controller/download_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/downloads/controller/download_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/downloads/controller/download_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/downloads/controller/download_controller.dart
  • Exception handling · Swallowed exception (empty catch) lib/screens/downloads/widgets/downloaded_media_view.dart
  • Exception handling · Swallowed exception (caught, then discarded) lib/screens/extensions/widgets/plugin_manager.dart
Rebuild cost: about €190,000 · Estimate
Cost to rebuild€64,000 to €320,000, for 1,064 to 3,376 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 33. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 224,103 lines of product code

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

Top priorities

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

1
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 13 points · Medium effort · Access Controls
2
Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off.
This repository constructs a TLS client that accepts any certificate at 3 sites, not one: `lib/main.dart:92` (`badCertificateCallback` returning `true`), `lib/services/cast/cast_v2_client.dart:47` (`onBadCertificate` returning `true`), `lib/utils/download_isolate_pool.dart:15` (`badCertificateCallback` returning `true`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Raises the score by about 13 points · Medium effort · Web-Security Posture
3
Resolve the 8 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED, REDACTED.
Raises the score by about 5 points · Low effort · Secrets (history)

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €190,000 to build again, about 1.3 person-years of work. Its weakest lens is Security and Compliance, at 14 (Critical). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 13 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.1 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 193,474 lines over the last 90 days, which is about 784,645 lines a year. At that pace, the extra work comes to an estimated 93.3 to 559.6 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 Watchdog's 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; 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 — a layering smell or cycle. A clean layered graph has none.

arch anymex anymex rhttp (pub) rhttp (pub) anymex->rhttp (pub) build_tool build_tool rhttp (Cargo) rhttp (Cargo) rhttp (Gradle) rhttp (Gradle)

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.

28 modules, with 36 dependencies between them. 2 loops run through 10 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.
uses →1 com.flutter_rust_bridge.rhttp2 com.flutter_rust_bridge.rhttp.RhttpPlugin3 com.ryan.anymex4 com.ryan.anymex.MainActivity5 repo.update_source6 repository.ai7 repository.mixins8 repository.src9 rhttp.api.error10 rhttp.api.init11 rhttp.api.init.init_android_context12 rhttp.api.stream13 rhttp.frb_generated14 rhttp.frb_generated.io15 rhttp.frb_generated.web16 rhttp.utils.socket_addr17 repo18 repository.models19 rhttp.api.http20 repository.database21 repository.utils22 rhttp.api.client23 repository.repositories24 repository.services25 repository.widgets26 repository.screens27 repository.controllers28 repository
1 com.flutter_rust_bridge.rhttp
2 com.flutter_rust_bridge.rhttp.RhttpPlugin
3 com.ryan.anymex
4 com.ryan.anymex.MainActivity
5 repo.update_source
6 repository.ai
7 repository.mixins
8 repository.src
9 rhttp.api.error
10 rhttp.api.init
11 rhttp.api.init.init_android_context
12 rhttp.api.stream
13 rhttp.frb_generated
14 rhttp.frb_generated.io
15 rhttp.frb_generated.web
16 rhttp.utils.socket_addr
17 repo3
18 repository.models16
19 rhttp.api.http12
20 repository.database2
21 repository.utils513
22 rhttp.api.client2
23 repository.repositories11
24 repository.services2121
25 repository.widgets123412519
26 repository.screens6953926144
27 repository.controllers112891
28 repository1012
Uses a module listed above itPart of a loopThe module itself
1 com.flutter_rust_bridge.rhttp2 com.flutter_rust_bridge.rhttp.RhttpPlugin3 com.ryan.anymex4 com.ryan.anymex.MainActivity5 repo.update_source6 repository.ai7 repository.mixins8 repository.src9 rhttp.api.error10 rhttp.api.init11 rhttp.api.init.init_android_context12 rhttp.api.stream13 rhttp.frb_generated14 rhttp.frb_generated.io15 rhttp.frb_generated.web16 rhttp.utils.socket_addr17 repo18 repository.models19 rhttp.api.http20 repository.database21 repository.utils22 rhttp.api.client23 repository.repositories24 repository.services25 repository.widgets26 repository.screens27 repository.controllers28 repositorycom.flutter_rust_bridge.rhttp1com.flutter_rust_bridge.rhttp.RhttpPlugin2com.ryan.anymex3com.ryan.anymex.MainActivity4repo.update_source5repository.ai6repository.mixins7repository.src8rhttp.api.error9rhttp.api.init10rhttp.api.init.init_android_context11rhttp.api.stream12rhttp.frb_generated13rhttp.frb_generated.io14rhttp.frb_generated.web15rhttp.utils.socket_addr16repo17repository.models18rhttp.api.http19repository.database20repository.utils21rhttp.api.client22repository.repositories23repository.services24repository.widgets25repository.screens26repository.controllers27repository28316122513211212112341251969539261441128911012

At a glance — Code Health · 48% · Weak · gated by D2, X4 ·

At a glance — Architecture · 95% · Exemplary ·

At a glance — Maturity · 52% · Adequate · gated by M2 ·

At a glance — Readiness · 40% · Weak · gated by D13, P3 ·

At a glance — Security · 14% · Critical · gated by D28, D29, D36, C2, S1 ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection52High / Critical
A07:2025 — Authentication Failures14High / Critical
A03:2025 — Software Supply Chain Failures11Medium

Roadmap

Immediately secure the application by implementing a global authentication guard with explicit role-based permissions and removing all code that bypasses TLS certificate validation. Concurrently, remediate all identified secrets in the codebase and history, and resolve the two banned license compliance issues to ensure legal and operational integrity.

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

Do thisHelpsEffortDimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.+12.6 ptsMediumAccess Controls
Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 3 sites, not one: `lib/main.dart:92` (`badCertificateCallback` returning `true`), `lib/services/cast/cast_v2_client.dart:47` (`onBadCertificate` returning `true`), `lib/utils/download_isolate_pool.dart:15` (`badCertificateCallback` returning `true`). Each is a separate decision — fixing only the line this row cites leaves the others in place.+12.6 ptsMediumWeb-Security Posture
Resolve the 8 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED, REDACTED.+5.4 ptsLowSecrets (history)
Resolve the 5 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED.+4.5 ptsLowREDACTED Scanning
Resolve the 2 Banned license finding(s) in License Compliance.+3.3 ptsLowLicense Compliance
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.7 ptsLowADR Quality
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3).+1.5 ptsLowStatic Analysis (SAST)
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED.+1.5 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED0.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
lib/controllers/services/anilist/anilist_data.dart4.8MixedCyclomatic Complexity: AnilistData.fetchFilterData (cyclomatic 35)
lib/screens/anime/home_page.dart4.8MixedGod Classes: MethodTooLong: _AnimeHomePageState.build
REDACTED5.1MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
lib/controllers/source/source_mapper.dart5.2MixedChange Coupling: Boundary-crossing change coupling: source_mapper.dart ↔ details_page.dart
lib/controllers/services/backup_restore/backup_restore_service.dart5.5MixedCyclomatic Complexity: BackupRestoreService._applyExternalMangaAndAnime (cyclomatic 63)
lib/screens/anime/watch/controller/player_controller.dart5.5MixedCyclomatic Complexity: PlayerController._bindPlayerStreams (cyclomatic 51)
lib/screens/anime/watch/controls/bottom_controls.dart5.5MixedCyclomatic Complexity: BottomControls._buildLayout (cyclomatic 35)
lib/screens/anime/widgets/comments/comments_section.dart5.5MixedCyclomatic Complexity: _CommentSectionState._showUserHistoryDialog (cyclomatic 30)
lib/screens/search/widgets/search_widgets.dart5.5MixedCyclomatic Complexity: _FuturisticFilterSheetState._loadCurrentFilters (cyclomatic 27)
lib/controllers/services/anilist/anilist_auth.dart5.5MixedCyclomatic Complexity: AnilistAuth.updateListEntry (cyclomatic 24)
lib/screens/settings/sub_settings/settings_player.dart5.5MixedCyclomatic Complexity: _SettingsPlayerState.build (cyclomatic 21)
lib/controllers/offline/offline_storage_controller.dart5.5MixedCyclomatic Complexity: OfflineStorageController.addMedia (cyclomatic 20)

How the grades work

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

Critical — 69

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 — 2174

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 — 93

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

Could not be resolved — 8

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

Methodology & how to trust this report

Watchdog 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. 66 of 70 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 70 dimensions across the health lenses
D1D2D3D4D5D6D9D13D14D15D17D19D20D21D26D28D29D30D34D35D36D43D44AX1AX10AX3AX4AX9C2DM5DM6GD1IC1M1M2M3M4P1P10P2P3P4P6PF2PF3S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X4X5

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a15c2d-6a9f-7dec-bb10-7fd453c3a167.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog 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: test source is present (.kt, .swift, .dart) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report` or the Gradle `jacocoTestReport` task, or lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`, or lcov — `flutter test --coverage` (or `dart test --coverage=coverage` then `dart run coverage:format_coverage --lcov`)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — `mvn jacoco:report` or the Gradle `jacocoTestReport` task, or lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`, or lcov — `flutter test --coverage` (or `dart test --coverage=coverage` then `dart run coverage:format_coverage --lcov`)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog 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 (.kt, .swift, .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.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 5 Maven/Gradle manifest(s) were read, stating a version for 4 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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.
  • 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 (20 contributor(s) across 2304 commit(s) sampled, automation and bot accounts excluded). One of them holds 83% of the history; the other 19 hold 0.9% 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.
  • D22 Internal API Consistency — not measured this run — Watchdog 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (pubspec.yaml), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D27 Navigability — not measured this run — Watchdog 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 — Watchdog 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. `packages/rhttp/android/settings.gradle.kts` 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.
  • AX6 Interface segregation — not measured this run — Watchdog 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog 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: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • P1 CI/CD gates — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • 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.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 161 further occurrence(s) are not listed individually; the score already reflects all 201.

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

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D13 REDACTED Scanning: REDACTED 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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.

The LLM boundary

LLM-set scores this run (4): D19, D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity4.9 / 10Weak✓ Tool-verified

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

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

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

219 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Media.fromSimkl at 99. A further 6 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 ThemeRenderer._getDynamicColor at 62 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: lib/widgets/anymex_widgets/anymex_animated_logo.dart (_AnymeXAnimatedLogoState._buildAnimatedLogo at 24), lib/models/notification/notification_item.dart (NotificationItem.typeIcon at 23), lib/screens/notifications/notification_screen.dart (_NotificationCard._getCategoryIcon at 23). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

Media.fromSimkl (cyclomatic 99)lib/models/Media/media.dart:489
TachiyomiBackupParser.parseBytes (cyclomatic 90)lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:31
_CharacterStaffSheetContentState.build (cyclomatic 78)lib/screens/anime/widgets/character_staff_sheet.dart:140
SourceMapper.mapMedia (cyclomatic 74)lib/controllers/source/source_mapper.dart:86
BackupRestoreService._applyExternalMangaAndAnime (cyclomatic 63)lib/controllers/services/backup_restore/backup_restore_service.dart:1654

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

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Media.fromSimkl (cyclomatic 99), TachiyomiBackupParser.parseBytes (cyclomatic 90), _CharacterStaffSheetContentState.build (cyclomatic 78). — 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 5 together lifts Cyclomatic Complexity from 4.9 to about 5.7/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

382 method(s) exceeded the cognitive complexity threshold of 15; the worst was TachiyomiBackupParser.parseBytes at 186.

TachiyomiBackupParser.parseBytes (cognitive 186)lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:31
DubService.fetchDubSources (cognitive 185)lib/screens/anime/misc/dub_service.dart:10
BackupRestoreService._applyExternalMangaAndAnime (cognitive 162)lib/controllers/services/backup_restore/backup_restore_service.dart:1654
_CharacterStaffSheetContentState.build (cognitive 141)lib/screens/anime/widgets/character_staff_sheet.dart:140
Media.fromSimkl (cognitive 140)lib/models/Media/media.dart:489

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

What to do

  1. Bring the 27 bodies over 60 down to 60 or less in Cognitive Complexity — start with TachiyomiBackupParser.parseBytes (cognitive 186), DubService.fetchDubSources (cognitive 185), BackupRestoreService._applyExternalMangaAndAnime (cognitive 162). — 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 27 together lifts Cognitive Complexity from 2.0 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes6.0 / 10Adequate✓ Tool-verified

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

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

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

454 god class(es) detected.

MethodTooLong: _SettingsPlayerState.build · ×224lib/screens/settings/sub_settings/settings_player.dart:1216
FileTooLong: comments/comments_section.dart · ×105lib/screens/anime/widgets/comments/comments_section.dart
ClassTooLong: _CommentSectionState · ×95lib/screens/anime/widgets/comments/comments_section.dart:52
TooManyMethods: Settings · ×30lib/controllers/settings/settings.dart:25

What to do

  1. Resolve the 224 MethodTooLong finding(s) in God Classes — start with comments_section.dart (13), compatibility_result_page.dart (7), backup_restore_service.dart (5). — One of this dimension's main actionable groups (224 warning-level).
  2. Resolve the 105 FileTooLong finding(s) in God Classes — start with reader_controller.dart (2), list_editor.dart (2), comments_section.dart. — One of this dimension's main actionable groups (105 warning-level).
  3. Resolve the 95 ClassTooLong finding(s) in God Classes — start with reader_controller.dart (2), list_editor.dart (2), settings_moderation.dart (2). — One of this dimension's main actionable groups (95 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication8.1 / 10Strong✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

852 duplicated block group(s) detected. A further 54 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 906 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (13 lines × 2) · ×40lib/controllers/offline/offline_storage_controller.dart:672
Duplicated block (11 lines × 2) · ×38lib/controllers/services/anilist/anilist_auth.dart:219
Duplicated block (12 lines × 2) · ×37lib/controllers/services/anilist/anilist_api.dart:92
Duplicated block (10 lines × 2) · ×33lib/controllers/services/anilist/anilist_auth.dart:323
Duplicated block (8 lines × 2) · ×30lib/controllers/services/community_service.dart:944

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

What to do

  1. Resolve the 40 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with anime_stats.dart (3), offline_storage_controller.dart (2), settings_view.dart (2). — One of this dimension's main actionable groups (40 warning-level).
  2. Resolve the 38 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with compatibility_result_page.dart (2), anymex_scaffold.dart (2), REDACTED. — One of this dimension's main actionable groups (38 warning-level).
  3. Resolve the 37 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with profile_page.dart (3), cast_proxy_server.dart (3), compatibility_result_page.dart (2). — One of this dimension's main actionable groups (37 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

5 production modules (Gradle+Cargo+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; 0 module(s) off the main sequence, with abstractness counted on 1 of the 5 (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).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.4 / 10Stronggated by 22 serious findings✓ Tool-verified

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

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

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

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

22 of 417 classes have LCOM4 above 3.

Low cohesion: CommentumService (LCOM4 28) · ×22lib/services/commentum_service.dart:48

What to do

  1. Resolve the 22 Low cohesion finding(s) in Cohesion (LCOM4) — start with commentum_service.dart, offline_storage_controller.dart, REDACTED. — One of this dimension's main actionable groups (22 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

5 test methods: 5 unit, 0 integration, 0 BDD, 0 e2e. The Rust suite contributes 1 `#[test]` function(s) across 1 file(s) declaring at least one; its unit/integration split is Cargo's own — 0 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

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

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

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

3 secret(s) detected.

REDACTED

What to do

  1. Resolve the 5 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D14 · License Compliance6.0 / 10Adequate✓ Tool-verified

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

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

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

2 of 302 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 6 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 121 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one. 6 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 the licences of those dependencies 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: dart_discord_presence · ×2

What to do

  1. Resolve the 2 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

Top hotspots: lib/screens/anime/watch/controller/player_controller.dart (34×51=1734); lib/models/Media/media.dart (14×99=1386); lib/main.dart (32×26=832) Repeated repair below the complexity floor: lib/screens/manga/details_page.dart (8 of 13 changes were fixes); lib/screens/anime/details_page.dart (7 of 12 changes were fixes); lib/screens/manga/widgets/reader/reader_view.dart (5 of 9 changes were fixes)

Hotspot: lib/screens/anime/watch/controller/player_controller.dart · ×85lib/screens/anime/watch/controller/player_controller.dart:1228
Repeated repair: lib/screens/manga/details_page.dart · ×13lib/screens/manga/details_page.dart:22

What to do

  1. Resolve the 85 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), player_controller.dart, media.dart. — One of this dimension's main actionable groups (85 warning-level).
  2. Resolve the 13 Repeated repair finding(s) in Churn × Complexity Hotspots — start with details_page.dart (2), reader_view.dart, database.dart. — One of this dimension's main actionable groups (13 warning-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 deducted task-comment markers across 224103 LoC (0.0/KLoC) → score 10.0. 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityStrong◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository is well documented: a root README gives an overview (AnymeX: Multiservice Tracking Client), downloads, Windows/iOS sideloading sources, support, official communities, contribution, visitors, acknowledgments, stats, and the license; each package's README documents its own directory rather than the repository. The rhttp package is especially feature-rich with a detailed About section, features list, benchmark table, and an exhaustive API reference (Request Basics to Cancel Requests), plus usage examples for every major HTTP method and parameter.

What to do

  1. Improve Documentation Quality — currently 8.0/10. — The repository is well documented: a root README gives an overview (AnymeX: Multiservice Tracking Client), downloads, Windows/iOS sideloading sources, support, official communities, contribution, visitors, acknowledgments, stats, and the license; each package's README documents its own directory rather than the repository. The rhttp package is especially feature-rich with a detailed About section, features list, benchmark table, and an exhaustive API reference (Request Basics to Cancel Requests), plus usage examples for every major HTTP method and parameter.

Detailed fixes: d19_recommendation.md.

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

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D26 · Project Cohesion7.5 / 10Strong✓ Tool-verified

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

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

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

1 of 8 build units (Cargo, Gradle, Xcode, pub) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)2.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)0.5 / 10Critical✓ Tool-verified

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

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

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

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

52 finding(s): 0 critical, 47 high, 5 medium, 0 low. 31 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 1 file(s) — `lib/ffi/image_decoder.h` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. 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 3 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

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

What to do

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

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

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

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

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

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

Orphaned file · ×2lib/utils/anime_themes_api.dart:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.6 / 10Adequategated by 4 critical findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: reader_view.dart↔settings_view.dart 73%; player_controller.dart↔better_player.dart 73%; widgets_builders.dart↔main.dart 70%

Boundary-crossing change coupling: player_adaptor.dart ↔ settings_player.dart · ×4lib/models/player/player_adaptor.dart:1
Change coupling: reader_view.dart ↔ settings_view.dart · ×13lib/screens/manga/widgets/reader/reader_view.dart:1
Change coupling clique: anilist_data.dart, mal_service.dart, simkl_service.dartlib/controllers/services/anilist/anilist_data.dart

What to do

  1. Resolve the 4 Boundary-crossing change coupling finding(s) in Change Coupling — start with player_adaptor.dart, source_mapper.dart, ui_adaptor.dart. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 13 Change coupling finding(s) in Change Coupling — start with REDACTED (2), reader_view.dart, player_controller.dart. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with anilist_data.dart. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. 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).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — 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.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored 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. SCORED, not informational.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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

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

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

C2 · Access Controls0.0 / 10Critical✓ Tool-verified

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

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

  • This repository serves requests — an HTTP server (HttpServer.bind) (lib/services/cast/cast_proxy_server.dart:29) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — lib/services/cast/cast_proxy_server.dart:29

What to do

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

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

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

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

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM (drift/floor/isar/objectbox/hive) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

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

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

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

IC1 · Incompleteness & stubs9.0 / 10Strong✓ Tool-verified

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

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

  • `onScrollNotification` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — lib/widgets/anymex_widgets/anymex_header.dart:47
  • `_base64ToBytes`'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/utils/color_extractor.dart:171
  • `detachSocket`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — packages/rhttp/lib/src/client/io/io_response.dart:38
  • `redirect`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional. — packages/rhttp/lib/src/client/io/io_response.dart:77

What to do

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

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 6 of 6 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

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.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy1.0 / 10Critical◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • README claims AnymeX is a tracking tool but the evidence shows it hosts and distributes streaming content — searched for: `streaming content`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong. — README.md:1

What to do

  • Reconcile the README with reality: README claims AnymeX is a tracking tool but the evidence shows it hosts and distributes streaming content.
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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.

What to do

  • Run the test suite in CI via an explicit runner step (`mvn test` for the toolchain this pipeline already uses) and gate merges on it.
P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

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

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language 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.

  • 162/167 types (97%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.

What to do

  • Keep implementation types off the public surface (Dart: a `_` name, or keep it under `lib/src/` unexported; Kotlin: `internal`; Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
P2 · Observability5.3 / 10Adequate✓ Tool-verified

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

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

  • Only 4/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `ios`, `macos`, `packages/rhttp/example`, `packages/rhttp/example/ios`, `packages/rhttp/example/macos`.

What to do

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

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

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

  • 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 69335 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.

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.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF2 · Allocation hygiene6.1 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 34 use(s) across 237,253 production line(s) (~0.1/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Dart: on hot paths, hold numbers in dart:typed_data lists (Int32List, Float64List …) instead of boxed List<int>/List<double>, read through views (sublistView, buffer.asInt32List, asByteData) instead of copying, make lists that never grow growable: false, compute in the SIMD types (Float32x4List …), and build bytes with BytesBuilder(copy: false).
  • Kotlin: on hot paths, use primitive arrays (IntArray, LongArray …) and @JvmInline value classes instead of boxed values, primitive collections (androidx.collection, fastutil) instead of boxed ones, and presize collections and StringBuilders.
  • Swift: on hot paths, reserveCapacity before appending, use ContiguousArray for class-element arrays, work in place with withUnsafeBufferPointer/withUnsafeTemporaryAllocation, and make large values ~Copyable with borrowing/consuming parameters.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language 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.

  • `pickBackupFile` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/controllers/services/backup_restore/backup_restore_service.dart:1230
  • `getTorrentCacheSize` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/controllers/services/storage/storage_manager_service.dart:50
  • `clearTorrentCacheOnly` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/controllers/services/storage/storage_manager_service.dart:99
  • `clearOtherTempOnly` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/controllers/services/storage/storage_manager_service.dart:125
  • `_clearDirectoryContents` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/controllers/services/storage/storage_manager_service.dart:213
  • `_fetchChapterPages` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/screens/manga/controller/reader_controller.dart:260
  • `fetchImages` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/screens/manga/controller/reader_controller.dart:1850
  • `_getPrecompiledArtifacts` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/rhttp/cargokit/build_tool/lib/src/artifacts_provider.dart:99
  • `_tryDownloadArtifacts` is async and calls writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/rhttp/cargokit/build_tool/lib/src/artifacts_provider.dart:184
  • `build` is async and calls copySync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/rhttp/cargokit/build_tool/lib/src/build_cmake.dart:19
  • `build` is async and calls createSync, copySync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/rhttp/cargokit/build_tool/lib/src/build_gradle.dart:22
  • `build` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/rhttp/cargokit/build_tool/lib/src/build_pod.dart:20
  • `run` is async and calls createSync, readAsBytesSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — packages/rhttp/cargokit/build_tool/lib/src/precompile_binaries.dart:52
  • `getCustomFontNames` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/utils/external_font_loader.dart:255
  • `loadAllCustomFonts` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/utils/external_font_loader.dart:291
  • `deleteCustomFont` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/utils/external_font_loader.dart:325
  • `download` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/utils/media_downloader.dart:96

What to do

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

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

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

  • `badCertificateCallback` returning `true` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the callback so `dart:io` validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: load its CA into a `SecurityContext` (`setTrustedCertificatesBytes`) and pass it as `HttpClient(context: …)` / `SecureSocket.connect(…, context: …)`, which keeps the chain and hostname checks on. A callback that must exist should compare the presented certificate with a pinned fingerprint, never return `true`. (×3) — lib/main.dart:92, lib/services/cast/cast_v2_client.dart:47, lib/utils/download_isolate_pool.dart:15
  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:580
  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `firebase.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — firebase.json:1
  • This repository runs an HTTP server that is not bound to the loopback interface alone — or binds it at an address its source does not spell out — and nothing in its Dart source secures the transport: no `HttpServer.bindSecure` or `securityContext:`, no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: lib/services/cast/cast_proxy_server.dart:29 — `HttpServer.bind(`.

What to do

  • Stop accepting every TLS certificate: delete the `badCertificateCallback` / `onBadCertificate` / `validateCertificate` that returns `true` so the chain, hostname and expiry are verified, and trust a self-signed or private server by loading its CA into a `SecurityContext` — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 3 sites, not one: `lib/main.dart:92` (`badCertificateCallback` returning `true`), `lib/services/cast/cast_v2_client.dart:47` (`onBadCertificate` returning `true`), `lib/utils/download_isolate_pool.dart:15` (`badCertificateCallback` returning `true`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
  • Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
  • Secure the server's transport: serve TLS itself (`HttpServer.bindSecure(…, context)`, or `shelf_io.serve(…, securityContext: context)`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only. A server only this device needs to reach should bind `InternetAddress.loopbackIPv4` instead.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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.

X13 · Undrained process stream3.5 / 10Weak✓ Tool-verified

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

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

  • The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.inputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.errorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a coroutine or thread per stream), merge them with `redirectErrorStream(true)` before `start()`, or discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`). — android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:375

What to do

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

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

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

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

  • `Comment.fromMap` is public and takes `Map m` from its caller, and it calls itself at line 153 (`Comment.fromMap`) with a piece of `m` — and nowhere in `Comment.fromMap` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `Comment.fromMap` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/database/comments/model/comment.dart:153

What to do

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

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.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • Only 0/5 functions that make a cancellable request (Dio, AbortableRequest) accept a CancelToken or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. Take a `CancelToken? cancelToken` and hand it to the request as `cancelToken:` (or hold one and cancel it in `dispose`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `urlToDcAsset` calls `Dio(…).post(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/controllers/discord/discord_rpc.dart:441
  • `getDetails` calls `Dio(…).get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — REDACTED:22
  • `_downloadShaders` calls `dio.download(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/screens/settings/sub_settings/settings_player.dart:552
  • `_downloadAndInstallAndroid` calls `dio.download(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/utils/updater.dart:418
  • `_downloadWindows` calls `dio.download(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`. — lib/utils/updater.dart:463

What to do

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

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

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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

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

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

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation7.0 / 10Adequate✓ Tool-verified

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

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

  • `finer` at line 109 is called with an argument built by `arguments.join('…')` (line 109), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because finer is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on. — packages/rhttp/cargokit/build_tool/lib/src/util.dart:109

What to do

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

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen. Whether a `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.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X3 · Exception handling4.8 / 10Weak✓ Tool-verified

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

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

  • 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. (×27) — android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:269, android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:280, android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:433, …
  • `catch (e: 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/com/ryan/anymex/MainActivity.kt:379
  • `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. (×12) — lib/main.dart:483, lib/controllers/custom_logo/custom_logo_service.dart:40, lib/controllers/network/cookie_manager.dart:42, …

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X4 · Structured logging1.5 / 10Critical✓ Tool-verified

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

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

  • `exception` at line 120 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:120
  • `exception` at line 123 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:123
  • `exception` at line 162 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:162
  • `info` at line 175 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:175
  • `info` at line 196 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:196
  • `warning` at line 239 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:239
  • `info` at line 289 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:289
  • `info` at line 315 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:315
  • `info` at line 328 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:328
  • `exception` at line 353 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:353
  • `exception` at line 356 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:356
  • `warning` at line 372 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:372
  • `warning` at line 390 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:390
  • `exception` at line 445 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:445
  • `info` at line 460 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:460
  • `info` at line 468 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:468
  • `exception` at line 470 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:470
  • `info` at line 493 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:493
  • `exception` at line 496 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog. — repo/update_source.py:496

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types8.9 / 10Strong✓ Tool-verified

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health48%Weak — gated by D2, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95%ExemplarySolid.
Maturity52%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness40%Weak — gated by D13, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security14%Critical — gated by D28, D29, D36, C2, S1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 3 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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 15 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

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

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 53 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 — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
  • 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 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. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • 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
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface 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
  • AX8 Test isolation — no test/production split to check
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an Isar, ObjectBox, Floor or Hive entity, or a Serverpod table model — and no database or data-store client (sqflite, Drift, Isar, Hive, Realm, Firestore, Supabase, postgres, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Drift table, an ObjectBox/Floor @Entity, an Isar @collection, a Hive @HiveType or a Serverpod table model — and no database or data-store client (sqflite, Firestore, Supabase, postgres, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~1734 lines of test source are present (.kt, .swift, .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
  • D12 Dependency Hygiene — Not scored — 5 Maven/Gradle manifest(s) were read, stating a version for 4 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • 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 — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • 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. 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 — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 1 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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 included — suite not readable by the collector
  • DM1 Aggregate boundaries — not scored for Dart: aggregate-vs-value-object classification cannot be told apart in source (every class-holding-class reads alike), and a child COLLECTION (legitimate membership) vs a single embedded aggregate is indistinguishable — reported as guidance rather than measured
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — not scored for Dart: a cross-package domain leak cannot be told apart in source from a legitimate shared-kernel package, and most repositories ship a single package — reported as guidance rather than measured
  • DM4 Rich vs anemic domain model — this Dart repository declares no domain-layer entity carrying stored data (every type is a typed-id wrapper, DTO/config, ORM row or presentation container), so DM4's rich-vs-anemic read has no population to be taken over
  • DM7 Repository granularity — not scored for Dart: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. 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, Python, Rust, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `flutter test --coverage` (or `dart test --coverage=coverage` then `dart run coverage:format_coverage --lcov`)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • 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.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 69 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 6 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×4
  • Boundary-crossing change coupling: player_adaptor.dart ↔ settings_player.dart lib/models/player/player_adaptor.dart:1 — `lib/models/player/player_adaptor.dart` (context models) and `lib/screens/settings/sub_settings/settings_player.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 52% of the time (16 of the 31 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 16 shared commits counted here, the most recent 3 are `7c1c13bc` fix: changed media session to a toggle based feature since its pretty…; `5f6a4eee` feat: add slide to seek toggle in player settings (#513); `9cbd2c77` feat: option to enable/disable hold to seek — run `git show` on any of them.
  • Boundary-crossing change coupling: source_mapper.dart ↔ details_page.dart lib/controllers/source/source_mapper.dart:1 — `lib/controllers/source/source_mapper.dart` (context controllers) and `lib/screens/anime/details_page.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (11 of the 22 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 11 shared commits counted here, the most recent 3 are `c6cc0166` feat: cancel request support so request doesnt run in the background …; `0b745596` feat: heavily improved mapper and optimizations on episode section; `2c6bf1a7` fix: improved mapper — run `git show` on any of them.
  • Boundary-crossing change coupling: ui_adaptor.dart ↔ settings_ui.dart lib/models/ui/ui_adaptor.dart:1 — `lib/models/ui/ui_adaptor.dart` (context models) and `lib/screens/settings/sub_settings/settings_ui.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (10 of the 20 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 10 shared commits counted here, the most recent 3 are `7af109c1` feat: nav bar layout switcher, improved ui of media type selector and…; `64740546` feat: bottom nav bar margin adjustment setting; `9cd133ad` feat: immersive mode — run `git show` on any of them.
  • Boundary-crossing change coupling: anilist_queries.dart ↔ details_page.dart lib/controllers/services/anilist/anilist_queries.dart:1 — `lib/controllers/services/anilist/anilist_queries.dart` (context controllers) and `lib/screens/anime/details_page.dart` (context screens) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 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 6 shared commits counted here, the most recent 3 are `c6cc0166` feat: cancel request support so request doesnt run in the background …; `1f93242d` fix: fixed huge ass loading on anilist; `7dc3881c` feat: Character Details + More Staff Info + Favorite Button + Social … — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · TLS certificate validation disabled · ×3
  • TLS certificate validation disabled lib/main.dart:92 — `badCertificateCallback` returning `true` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the callback so `dart:io` validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: load its CA into a `SecurityContext` (`setTrustedCertificatesBytes`) and pass it as `HttpClient(context: …)` / `SecureSocket.connect(…, context: …)`, which keeps the chain and hostname checks on. A callback that must exist should compare the presented certificate with a pinned fingerprint, never return `true`.
  • TLS certificate validation disabled lib/services/cast/cast_v2_client.dart:47 — `badCertificateCallback` returning `true` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the callback so `dart:io` validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: load its CA into a `SecurityContext` (`setTrustedCertificatesBytes`) and pass it as `HttpClient(context: …)` / `SecureSocket.connect(…, context: …)`, which keeps the chain and hostname checks on. A callback that must exist should compare the presented certificate with a pinned fingerprint, never return `true`.
  • TLS certificate validation disabled lib/utils/download_isolate_pool.dart:15 — `badCertificateCallback` returning `true` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the callback so `dart:io` validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: load its CA into a `SecurityContext` (`setTrustedCertificatesBytes`) and pass it as `HttpClient(context: …)` / `SecureSocket.connect(…, context: …)`, which keeps the chain and hostname checks on. A callback that must exist should compare the presented certificate with a pinned fingerprint, never return `true`.
D14 · License Compliance · Banned license · ×2
  • Banned license: dart_discord_presence — `dart_discord_presence` 1.2.0 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 (`gpl-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.
  • Banned license: iconsax — `iconsax` 0.0.8 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 (`gpl-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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 2174 finding(s)
D3 · God Classes · MethodTooLong · ×224
  • MethodTooLong: _SettingsPlayerState.build lib/screens/settings/sub_settings/settings_player.dart:1216 — MethodTooLong — build runs 1184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1084 over it, 11.84× 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: _UserProfileHeaderState.build lib/screens/profile/widgets/user_profile_header.dart:62 — MethodTooLong — build runs 477 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 377 over it, 4.77× 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: _UserProfileAppBarState.build lib/screens/profile/widgets/user_profile_app_bar.dart:61 — MethodTooLong — build runs 404 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 304 over it, 4.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DesktopProfileHeader.build lib/screens/profile/widgets/profile_header.dart:73 — MethodTooLong — build runs 380 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MobileProfileHeaderSliver.build lib/screens/profile/widgets/profile_header.dart:614 — MethodTooLong — build runs 363 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 263 over it, 3.63× 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: _UserSearchSheetState.build lib/screens/settings/sub_settings/settings_moderation.dart:302 — MethodTooLong — build runs 349 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 249 over it, 3.49× 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: _ExportBackupSheetState.build lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1047 — MethodTooLong — build runs 334 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 234 over it, 3.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: _SettingsReaderState.build lib/screens/settings/sub_settings/settings_reader.dart:313 — MethodTooLong — build runs 324 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 224 over it, 3.24× 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: _BackupRestorePageState._buildImportSection lib/screens/settings/sub_settings/settings_backup.dart:411 — MethodTooLong — _buildImportSection runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.22× 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: ReaderSettings.showSettings lib/screens/manga/widgets/reader/settings_view.dart:19 — MethodTooLong — showSettings runs 311 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 211 over it, 3.11× 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: _MediaDetailsPageState._buildContinueButton lib/screens/anime/details/media_details_page.dart:505 — MethodTooLong — _buildContinueButton runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BottomControls._buildLayout lib/screens/anime/watch/controls/bottom_controls.dart:229 — MethodTooLong — _buildLayout runs 291 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MediaModeSelector.build lib/widgets/common/media_mode_selector.dart:109 — MethodTooLong — build runs 289 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 189 over it, 2.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Media.fromSimkl lib/models/Media/media.dart:489 — MethodTooLong — fromSimkl runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.86× 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: __ListMediaEditorBottomSheetState.build lib/screens/library/editor/list_editor.dart:831 — MethodTooLong — build runs 283 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 183 over it, 2.83× 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: _WatchiumPageState._buildRoomCard lib/screens/watchium/watchium_page.dart:1135 — MethodTooLong — _buildRoomCard runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× 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: _RecommendSheetState._buildAlreadyAdded lib/widgets/non_widgets/recommend_sheet.dart:709 — MethodTooLong — _buildAlreadyAdded runs 270 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 170 over it, 2.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _ActivityCardState.build lib/widgets/non_widgets/activity_card.dart:522 — MethodTooLong — build runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× 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: _CommentsRepliesSheetState._buildCommentCard lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:158 — MethodTooLong — _buildCommentCard runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× 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: _DownloadScreenState._buildEpisodeStep lib/screens/downloads/download_screen.dart:861 — MethodTooLong — _buildEpisodeStep runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× 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: Header.build lib/widgets/header/legacy_header.dart:41 — MethodTooLong — build runs 260 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× 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: BackupRestoreService.getBackupInfo lib/controllers/services/backup_restore/backup_restore_service.dart:1306 — MethodTooLong — getBackupInfo runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× 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: TachiyomiBackupParser.parseBytes lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:31 — MethodTooLong — parseBytes runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× 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: _EpisodeListBuilderState.build lib/screens/anime/widgets/episode_list_builder.dart:446 — MethodTooLong — build runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× 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: _ChapterListBuilderState.build lib/screens/manga/widgets/chapter_list_builder.dart:290 — MethodTooLong — build runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× 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.
  • + 199 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×105
  • FileTooLong: comments/comments_section.dart lib/screens/anime/widgets/comments/comments_section.dart — FileTooLong — 2961 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: _CommentSectionState (52-3883). The bar is 500 significant lines; this is 2461 over it, 5.92× 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: compatibility/compatibility_result_page.dart lib/screens/profile/compatibility/compatibility_result_page.dart — FileTooLong — 2206 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: _CompatibilityResultPageState (53-2835). The bar is 500 significant lines; this is 1706 over it, 4.41× 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: sub_settings/settings_player.dart lib/screens/settings/sub_settings/settings_player.dart — FileTooLong — 2179 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: _SettingsPlayerState (139-2792). The bar is 500 significant lines; this is 1679 over it, 4.36× 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: setup/json_player_control_theme.dart lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart — FileTooLong — 2158 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1658 over it, 4.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: controller/player_controller.dart lib/screens/anime/watch/controller/player_controller.dart — FileTooLong — 2128 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PlayerController (94-2957). The bar is 500 significant lines; this is 1628 over it, 4.26× 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: REDACTED lib/controllers/services/anilist/anilist_auth.dart — FileTooLong — 1923 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AnilistAuth (32-2632). The bar is 500 significant lines; this is 1423 over it, 3.85× 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/search_widgets.dart lib/screens/search/widgets/search_widgets.dart — FileTooLong — 1830 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: _FuturisticFilterSheetState (263-2415). The bar is 500 significant lines; this is 1330 over it, 3.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: sub_settings/settings_moderation.dart lib/screens/settings/sub_settings/settings_moderation.dart — FileTooLong — 1709 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1209 over it, 3.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/commentum_service.dart lib/services/commentum_service.dart — FileTooLong — 1580 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: CommentumService (48-2145). The bar is 500 significant lines; this is 1080 over it, 3.16× 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: controller/download_controller.dart lib/screens/downloads/controller/download_controller.dart — FileTooLong — 1570 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DownloadController (34-2093). The bar is 500 significant lines; this is 1070 over it, 3.14× 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: controller/reader_controller.dart lib/screens/manga/controller/reader_controller.dart — FileTooLong — 1538 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: ReaderController (95-2157). The bar is 500 significant lines; this is 1038 over it, 3.08× 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/episode_list_builder.dart lib/screens/anime/widgets/episode_list_builder.dart — FileTooLong — 1502 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: _EpisodeListBuilderState (86-1356). The bar is 500 significant lines; this is 1002 over it, 3.00× 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: backup_restore/backup_restore_service.dart lib/controllers/services/backup_restore/backup_restore_service.dart — FileTooLong — 1464 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: BackupRestoreService (362-1848). The bar is 500 significant lines; this is 964 over it, 2.93× 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: search/search_view.dart lib/screens/search/search_view.dart — FileTooLong — 1307 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: _SearchPageState (77-1705). The bar is 500 significant lines; this is 807 over it, 2.61× 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: Media/media.dart lib/models/Media/media.dart — FileTooLong — 1294 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: Media (18-1419). The bar is 500 significant lines; this is 794 over it, 2.59× 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: downloads/download_screen.dart lib/screens/downloads/download_screen.dart — FileTooLong — 1294 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: _DownloadScreenState (158-1749). The bar is 500 significant lines; this is 794 over it, 2.59× 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: anilist/anilist_data.dart lib/controllers/services/anilist/anilist_data.dart — FileTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: AnilistData (52-1592). The bar is 500 significant lines; this is 706 over it, 2.41× 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: controller/reader_controller.dart lib/screens/novel/reader/controller/reader_controller.dart — FileTooLong — 1177 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: NovelReaderController (23-1564). The bar is 500 significant lines; this is 677 over it, 2.35× 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/character_staff_sheet.dart lib/screens/anime/widgets/character_staff_sheet.dart — FileTooLong — 1145 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 645 over it, 2.29× 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/backup_and_restore_widgets.dart lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart — FileTooLong — 1121 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 621 over it, 2.24× 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: watchium/watchium_page.dart lib/screens/watchium/watchium_page.dart — FileTooLong — 1115 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: _WatchiumPageState (26-1512). The bar is 500 significant lines; this is 615 over it, 2.23× 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/chapter_list_builder.dart lib/screens/manga/widgets/chapter_list_builder.dart — FileTooLong — 1113 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: _ChapterListBuilderState (147-1465). The bar is 500 significant lines; this is 613 over it, 2.23× 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: utils/color_profiler.dart lib/utils/color_profiler.dart — FileTooLong — 1084 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: _ColorProfileBottomSheetState (289-1476). The bar is 500 significant lines; this is 584 over it, 2.17× 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: anymex_widgets/anymex_animated_logo.dart lib/widgets/anymex_widgets/anymex_animated_logo.dart — FileTooLong — 1044 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: _AnymeXAnimatedLogoState (38-1457). The bar is 500 significant lines; this is 544 over it, 2.09× 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: services/community_service.dart lib/controllers/services/community_service.dart — FileTooLong — 997 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: CommunityService (370-1157). The bar is 500 significant lines; this is 497 over it, 1.99× 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.
  • + 80 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×95
  • ClassTooLong: _CommentSectionState lib/screens/anime/widgets/comments/comments_section.dart:52 — ClassTooLong — 2829 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 2429 over it, 7.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: _CompatibilityResultPageState lib/screens/profile/compatibility/compatibility_result_page.dart:53 — ClassTooLong — 2090 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 1690 over it, 5.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _SettingsPlayerState lib/screens/settings/sub_settings/settings_player.dart:139 — ClassTooLong — 2069 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 1669 over it, 5.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PlayerController lib/screens/anime/watch/controller/player_controller.dart:94 — ClassTooLong — 2046 significant lines (blank, comment-only and punctuation-only lines excluded), 126 methods. The bar is 400 significant lines; this is 1646 over it, 5.12× 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: AnilistAuth lib/controllers/services/anilist/anilist_auth.dart:32 — ClassTooLong — 1896 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 1496 over it, 4.74× 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: _FuturisticFilterSheetState lib/screens/search/widgets/search_widgets.dart:263 — ClassTooLong — 1621 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 1221 over it, 4.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: CommentumService lib/services/commentum_service.dart:48 — ClassTooLong — 1542 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 1142 over it, 3.86× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DownloadController lib/screens/downloads/controller/download_controller.dart:34 — ClassTooLong — 1526 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 1126 over it, 3.82× 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: ReaderController lib/screens/manga/controller/reader_controller.dart:95 — ClassTooLong — 1465 significant lines (blank, comment-only and punctuation-only lines excluded), 104 methods. The bar is 400 significant lines; this is 1065 over it, 3.66× 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: Media lib/models/Media/media.dart:18 — ClassTooLong — 1186 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 786 over it, 2.97× 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: _SearchPageState lib/screens/search/search_view.dart:77 — ClassTooLong — 1184 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 784 over it, 2.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: _DownloadScreenState lib/screens/downloads/download_screen.dart:158 — ClassTooLong — 1170 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 770 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AnilistData lib/controllers/services/anilist/anilist_data.dart:52 — ClassTooLong — 1160 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 760 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BackupRestoreService lib/controllers/services/backup_restore/backup_restore_service.dart:362 — ClassTooLong — 1159 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 759 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NovelReaderController lib/screens/novel/reader/controller/reader_controller.dart:23 — ClassTooLong — 1158 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 758 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ThemeRenderer lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:144 — ClassTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 727 over it, 2.82× 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: _WatchiumPageState lib/screens/watchium/watchium_page.dart:26 — ClassTooLong — 1094 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 694 over it, 2.74× 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: _AnymeXAnimatedLogoState lib/widgets/anymex_widgets/anymex_animated_logo.dart:38 — ClassTooLong — 997 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 597 over it, 2.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _ChapterListBuilderState lib/screens/manga/widgets/chapter_list_builder.dart:147 — ClassTooLong — 995 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 595 over it, 2.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _EpisodeListBuilderState lib/screens/anime/widgets/episode_list_builder.dart:86 — ClassTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 554 over it, 2.39× 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: _DownloadedMediaViewState lib/screens/downloads/widgets/downloaded_media_view.dart:32 — ClassTooLong — 901 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 501 over it, 2.25× 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: Matchmaker lib/utils/compatibility/matchmaker.dart:6 — ClassTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 487 over it, 2.22× 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: _WatchOfflineState lib/screens/local_source/local_source_view.dart:32 — ClassTooLong — 884 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 484 over it, 2.21× 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: _DecorationClosetSheetState lib/screens/profile/widgets/decoration_closet_sheet.dart:31 — ClassTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 480 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: _WatchiumPartyPopupContentState lib/widgets/watchium/watchium_party_popup.dart:62 — ClassTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 475 over it, 2.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 70 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×85
  • Hotspot: lib/screens/anime/watch/controller/player_controller.dart lib/screens/anime/watch/controller/player_controller.dart:1228 — lib/screens/anime/watch/controller/player_controller.dart changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in PlayerController._bindPlayerStreams at line 1228. 19 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/watch/controller/player_controller.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/models/Media/media.dart lib/models/Media/media.dart:489 — lib/models/Media/media.dart changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in Media.fromSimkl at line 489. 7 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/models/Media/media.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/main.dart lib/main.dart:564 — lib/main.dart changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in _FilterScreenState._getNavItemForTab at line 564. 9 of those changes were fix/bug commits, and the other 23 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/main.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/screens/settings/sub_settings/settings_extension_manager.dart lib/screens/settings/sub_settings/settings_extension_manager.dart:467 — lib/screens/settings/sub_settings/settings_extension_manager.dart changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in _SettingsExtensionManagerState._buildPluginStatusCard at line 467. 5 of those changes were fix/bug commits, and the other 12 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/settings/sub_settings/settings_extension_manager.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/screens/search/search_view.dart lib/screens/search/search_view.dart:216 — lib/screens/search/search_view.dart changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in _SearchPageState._performSearch at line 216. 11 of those changes were fix/bug commits, and the other 12 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/search/search_view.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/controllers/services/anilist/anilist_data.dart lib/controllers/services/anilist/anilist_data.dart:1226 — lib/controllers/services/anilist/anilist_data.dart changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in AnilistData.fetchFilterData at line 1226. 7 of those changes were fix/bug commits, and the other 9 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/controllers/services/anilist/anilist_data.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/screens/anime/details/media_details_page.dart lib/screens/anime/details/media_details_page.dart:505 — lib/screens/anime/details/media_details_page.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in _MediaDetailsPageState._buildContinueButton at line 505. 5 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/details/media_details_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/screens/anime/watch/controls/bottom_controls.dart lib/screens/anime/watch/controls/bottom_controls.dart:229 — lib/screens/anime/watch/controls/bottom_controls.dart changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in BottomControls._buildLayout at line 229. 5 of those changes were fix/bug commits, and the other 10 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/watch/controls/bottom_controls.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/screens/home_page.dart lib/screens/home_page.dart:38 — lib/screens/home_page.dart changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _HomePageState._buildNewEpisodesSection at line 38. 8 of those changes were fix/bug commits, and the other 13 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/home_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/screens/downloads/controller/download_controller.dart lib/screens/downloads/controller/download_controller.dart:1660 — lib/screens/downloads/controller/download_controller.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in DownloadController._syncMediaFolderMeta at line 1660. 6 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/downloads/controller/download_controller.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/controllers/services/mal/mal_service.dart lib/controllers/services/mal/mal_service.dart:785 — lib/controllers/services/mal/mal_service.dart changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in MalService.updateListEntry at line 785. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/controllers/services/mal/mal_service.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/widgets/media_items/media_item.dart lib/widgets/media_items/media_item.dart:115 — lib/widgets/media_items/media_item.dart changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in GridAnimeCard.build at line 115. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/widgets/media_items/media_item.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/screens/settings/sub_settings/settings_player.dart lib/screens/settings/sub_settings/settings_player.dart:1216 — lib/screens/settings/sub_settings/settings_player.dart changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in _SettingsPlayerState.build at line 1216. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/settings/sub_settings/settings_player.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/widgets/header/header.dart lib/widgets/header/header.dart:73 — lib/widgets/header/header.dart changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Header.build at line 73. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/widgets/header/header.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/screens/anime/details/controller/media_details_controller.dart lib/screens/anime/details/controller/media_details_controller.dart:924 — lib/screens/anime/details/controller/media_details_controller.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in MediaDetailsController.getContinueChapter at line 924. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/details/controller/media_details_controller.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/controllers/services/simkl/simkl_service.dart lib/controllers/services/simkl/simkl_service.dart:444 — lib/controllers/services/simkl/simkl_service.dart changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in SimklService.getEpisodesBySeason at line 444. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/controllers/services/simkl/simkl_service.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/screens/manga/controller/reader_controller.dart lib/screens/manga/controller/reader_controller.dart:1267 — lib/screens/manga/controller/reader_controller.dart changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ReaderController._onPositionChanged at line 1267. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/manga/controller/reader_controller.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/screens/anime/widgets/wrongtitle_modal.dart lib/screens/anime/widgets/wrongtitle_modal.dart:90 — lib/screens/anime/widgets/wrongtitle_modal.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in _WrongTitleModalState.build at line 90. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/widgets/wrongtitle_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/widgets/header/legacy_header.dart lib/widgets/header/legacy_header.dart:41 — lib/widgets/header/legacy_header.dart changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Header.build at line 41. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/widgets/header/legacy_header.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/screens/anime/widgets/list_editor.dart lib/screens/anime/widgets/list_editor.dart:157 — lib/screens/anime/widgets/list_editor.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _ListEditorModalState.initState at line 157. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/widgets/list_editor.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/models/Anilist/anilist_media_user.dart lib/models/Anilist/anilist_media_user.dart:54 — lib/models/Anilist/anilist_media_user.dart changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in TrackedMedia.effectiveProgress at line 54. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/models/Anilist/anilist_media_user.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/controllers/services/anilist/anilist_auth.dart lib/controllers/services/anilist/anilist_auth.dart:2186 — lib/controllers/services/anilist/anilist_auth.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in AnilistAuth.updateListEntry at line 2186. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/controllers/services/anilist/anilist_auth.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/screens/settings/sub_settings/settings_backup.dart lib/screens/settings/sub_settings/settings_backup.dart:411 — lib/screens/settings/sub_settings/settings_backup.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in _BackupRestorePageState._buildImportSection at line 411. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/settings/sub_settings/settings_backup.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/screens/profile/widgets/user_profile_header.dart lib/screens/profile/widgets/user_profile_header.dart:62 — lib/screens/profile/widgets/user_profile_header.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in _UserProfileHeaderState.build at line 62. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/profile/widgets/user_profile_header.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/screens/settings/sub_settings/settings_ui.dart lib/screens/settings/sub_settings/settings_ui.dart:581 — lib/screens/settings/sub_settings/settings_ui.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in _SettingsUiState._buildFontFamilyPickerContent at line 581. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/settings/sub_settings/settings_ui.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.
  • + 60 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×40
  • Duplicated block (13 lines × 2) lib/controllers/offline/offline_storage_controller.dart:672 — lib/controllers/offline/offline_storage_controller.dart:672-684 | lib/controllers/offline/offline_storage_controller.dart:712-724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/controllers/offline/offline_storage_controller.dart:840 — lib/controllers/offline/offline_storage_controller.dart:840-852 | lib/controllers/offline/offline_storage_controller.dart:903-915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/controllers/services/simkl/simkl_api.dart:126 — lib/controllers/services/simkl/simkl_api.dart:126-138 | lib/controllers/services/simkl/simkl_api.dart:141-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/controllers/sync/gist_sync_controller.dart:1012 — lib/controllers/sync/gist_sync_controller.dart:1012-1024 | lib/controllers/sync/progress_sync_section.dart:361-373 — 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/screens/anime/details/controller/media_details_controller.dart:563 — lib/screens/anime/details/controller/media_details_controller.dart:563-575 | lib/screens/anime/details/controller/media_details_controller.dart:660-672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/anime/misc/list_exporter.dart:385 — lib/screens/anime/misc/list_exporter.dart:385-397 | lib/screens/anime/misc/list_exporter.dart:449-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:95 — lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:95-107 | lib/screens/anime/watch/controls/themes/player_control_themes/netflix_mobile_player_theme.dart:174-186 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/netflix_mobile_player_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) lib/screens/anime/widgets/anime_stats.dart:585 — lib/screens/anime/widgets/anime_stats.dart:585-597 | lib/screens/anime/widgets/anime_stats.dart:634-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/anime/widgets/anime_stats.dart:850 — lib/screens/anime/widgets/anime_stats.dart:850-862 | lib/screens/manga/widgets/manga_stats.dart:513-525 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (13 lines × 2) lib/screens/anime/widgets/anime_stats.dart:870 — lib/screens/anime/widgets/anime_stats.dart:870-882 | lib/screens/manga/widgets/manga_stats.dart:534-546 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (13 lines × 2) lib/screens/anime/widgets/comments/discord_markdown.dart:915 — lib/screens/anime/widgets/comments/discord_markdown.dart:915-927 | lib/screens/anime/widgets/comments/discord_markdown.dart:929-941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/anime/widgets/wrongtitle_modal.dart:264 — lib/screens/anime/widgets/wrongtitle_modal.dart:264-276 | lib/screens/library/online/manga_list.dart:833-845 — 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 (13 lines × 2) lib/screens/downloads/widgets/download_server_selector.dart:630 — lib/screens/downloads/widgets/download_server_selector.dart:630-642 | lib/screens/downloads/widgets/download_server_selector.dart:671-683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/downloads/widgets/manga_chapter_download_confirm.dart:124 — lib/screens/downloads/widgets/manga_chapter_download_confirm.dart:124-136 | lib/widgets/watchium/watchium_create_dialog.dart:369-381 — 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 (13 lines × 2) lib/screens/extensions/ExtensionItem.dart:361 — lib/screens/extensions/ExtensionItem.dart:361-373 | lib/screens/extensions/ExtensionItem.dart:396-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/library/history_page.dart:222 — lib/screens/library/history_page.dart:222-234 | lib/screens/stats/user_stats_page.dart:231-243 — 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 (13 lines × 2) lib/screens/library/widgets/anime_card.dart:79 — lib/screens/library/widgets/anime_card.dart:79-91 | lib/screens/library/widgets/common_widgets.dart:84-96 — before extracting anything, compare `lib/screens/library/widgets/anime_card.dart` and `lib/screens/library/widgets/common_widgets.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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) lib/screens/manga/widgets/reader/settings_view.dart:94 — lib/screens/manga/widgets/reader/settings_view.dart:94-106 | lib/screens/manga/widgets/reader/settings_view.dart:164-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/manga/widgets/reader/top_controls.dart:258 — lib/screens/manga/widgets/reader/top_controls.dart:258-270 | lib/screens/novel/reader/widgets/top_controls.dart:216-228 — before extracting anything, compare `lib/screens/manga/widgets/reader/top_controls.dart` and `lib/screens/novel/reader/widgets/top_controls.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 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 (13 lines × 2) lib/screens/novel/reader/widgets/settings_view.dart:297 — lib/screens/novel/reader/widgets/settings_view.dart:297-309 | lib/screens/novel/reader/widgets/settings_view.dart:413-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:836 — lib/screens/profile/compatibility/compatibility_result_page.dart:836-848 | lib/screens/profile/compatibility/compatibility_result_page.dart:2370-2382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lib/screens/profile/profile_page.dart:740 — lib/screens/profile/profile_page.dart:740-752 | lib/screens/profile/user_profile_page.dart:712-724 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) lib/screens/profile/profile_page.dart:949 — lib/screens/profile/profile_page.dart:949-961 | lib/screens/profile/user_profile_page.dart:883-895 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) lib/screens/profile/widgets/profile_header.dart:950 — lib/screens/profile/widgets/profile_header.dart:950-962 | lib/screens/profile/widgets/user_profile_app_bar.dart:347-359 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) lib/screens/settings/misc/sauce_finder_view.dart:199 — lib/screens/settings/misc/sauce_finder_view.dart:199-211 | lib/screens/settings/misc/sauce_finder_view.dart:422-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×38
  • Duplicated block (11 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:219 — lib/controllers/services/anilist/anilist_auth.dart:219-229 | lib/controllers/services/mal/mal_service.dart:606-616 — 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 (11 lines × 2) lib/controllers/services/anilist/anilist_data.dart:88 — lib/controllers/services/anilist/anilist_data.dart:88-98 | lib/controllers/services/mal/mal_service.dart:63-73 — before extracting anything, compare `lib/controllers/services/anilist/anilist_data.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (11 lines × 2) lib/controllers/services/backup_restore/backup_restore_service.dart:247 — lib/controllers/services/backup_restore/backup_restore_service.dart:247-257 | lib/controllers/services/backup_restore/backup_restore_service.dart:309-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/controllers/services/mal/mal_service.dart:674 — lib/controllers/services/mal/mal_service.dart:674-684 | lib/controllers/services/mal/mal_service.dart:702-712 — both copies are in the same file, so extract the 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/models/Media/media.dart:275 — lib/models/Media/media.dart:275-285 | lib/models/Media/media.dart:473-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/anime/watch/controls/widgets/source_popup.dart:87 — lib/screens/anime/watch/controls/widgets/source_popup.dart:87-97 | lib/screens/anime/watch/controls/widgets/tracks_popup.dart:86-96 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/source_popup.dart` and `lib/screens/anime/watch/controls/widgets/tracks_popup.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:652 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:652-662 | lib/widgets/watchium/watchium_create_dialog.dart:574-584 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (11 lines × 2) lib/screens/anime/widgets/comments/discord_markdown.dart:475 — lib/screens/anime/widgets/comments/discord_markdown.dart:475-485 | lib/screens/anime/widgets/comments/discord_markdown.dart:487-497 — both copies are in the same file, so extract the 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/screens/anime/widgets/episode/styles/compact_style.dart:36 — lib/screens/anime/widgets/episode/styles/compact_style.dart:36-46 | lib/screens/anime/widgets/episode/styles/detailed_style.dart:36-46 — before extracting anything, compare `lib/screens/anime/widgets/episode/styles/compact_style.dart` and `lib/screens/anime/widgets/episode/styles/detailed_style.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) lib/screens/anime/widgets/voice_actor.dart:49 — lib/screens/anime/widgets/voice_actor.dart:49-59 | lib/screens/anime/widgets/voice_actor.dart:315-325 — both copies are in the same file, so extract the 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/screens/anime/widgets/wrongtitle_modal.dart:246 — lib/screens/anime/widgets/wrongtitle_modal.dart:246-256 | lib/screens/anime/widgets/wrongtitle_modal.dart:294-304 — both copies are in the same file, so extract the 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/screens/downloads/widgets/downloaded_media_view.dart:708 — lib/screens/downloads/widgets/downloaded_media_view.dart:708-718 | lib/screens/downloads/widgets/downloaded_media_view.dart:1003-1013 — both copies are in the same file, so extract the 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/screens/library/widgets/anime_card.dart:50 — lib/screens/library/widgets/anime_card.dart:50-60 | lib/screens/library/widgets/common_widgets.dart:54-64 — before extracting anything, compare `lib/screens/library/widgets/anime_card.dart` and `lib/screens/library/widgets/common_widgets.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/screens/library/widgets/library_deps.dart:203 — lib/screens/library/widgets/library_deps.dart:203-213 | lib/widgets/common/custom_tiles.dart:382-392 — before extracting anything, compare `lib/screens/library/widgets/library_deps.dart` and `lib/widgets/common/custom_tiles.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (11 lines × 2) lib/screens/local_source/local_source_view.dart:77 — lib/screens/local_source/local_source_view.dart:77-87 | lib/screens/settings/misc/sauce_finder_view.dart:102-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 (11 lines × 2) lib/screens/manga/widgets/reader/bottom_controls.dart:85 — lib/screens/manga/widgets/reader/bottom_controls.dart:85-95 | lib/screens/manga/widgets/reader/bottom_controls.dart:125-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/manga/widgets/reader/top_controls.dart:506 — lib/screens/manga/widgets/reader/top_controls.dart:506-516 | lib/screens/manga/widgets/reader/top_controls.dart:575-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/novel/reader/widgets/settings_view.dart:575 — lib/screens/novel/reader/widgets/settings_view.dart:575-585 | lib/screens/novel/reader/widgets/settings_view.dart:784-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/profile/activity_details_page.dart:350 — lib/screens/profile/activity_details_page.dart:350-360 | lib/screens/profile/activity_details_page.dart:378-388 — both copies are in the same file, so extract the 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/screens/profile/compatibility/compatibility_result_page.dart:1608 — lib/screens/profile/compatibility/compatibility_result_page.dart:1608-1619 | lib/screens/profile/compatibility/compatibility_result_page.dart:2055-2065 — both copies are in the same file, so extract the 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/screens/profile/compatibility/compatibility_result_page.dart:1752 — lib/screens/profile/compatibility/compatibility_result_page.dart:1752-1762 | lib/screens/profile/compatibility/compatibility_result_page.dart:1904-1914 — both copies are in the same file, so extract the 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/screens/profile/widgets/user_media_list_page.dart:528 — lib/screens/profile/widgets/user_media_list_page.dart:528-538 | lib/screens/profile/widgets/user_media_list_page.dart:544-554 — both copies are in the same file, so extract the 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/screens/search/widgets/search_widgets.dart:1108 — lib/screens/search/widgets/search_widgets.dart:1108-1118 | lib/screens/search/widgets/search_widgets.dart:1127-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/settings/sub_settings/settings_about.dart:214 — lib/screens/settings/sub_settings/settings_about.dart:214-224 | lib/screens/settings/sub_settings/settings_about.dart:275-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lib/screens/settings/sub_settings/settings_backup.dart:232 — lib/screens/settings/sub_settings/settings_backup.dart:232-242 | lib/screens/settings/sub_settings/settings_backup.dart:249-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 13 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×37
  • Duplicated block (12 lines × 2) lib/controllers/services/anilist/anilist_api.dart:92 — lib/controllers/services/anilist/anilist_api.dart:92-103 | lib/controllers/services/anilist/anilist_api.dart:105-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:2471 — lib/controllers/services/anilist/anilist_auth.dart:2471-2482 | lib/controllers/services/anilist/anilist_auth.dart:2526-2537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/controllers/services/anilist/anilist_data.dart:100 — lib/controllers/services/anilist/anilist_data.dart:100-111 | lib/controllers/services/mal/mal_service.dart:75-86 — before extracting anything, compare `lib/controllers/services/anilist/anilist_data.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/controllers/services/mal/mal_api.dart:82 — lib/controllers/services/mal/mal_api.dart:82-93 | lib/controllers/services/mal/mal_service.dart:308-319 — before extracting anything, compare `lib/controllers/services/mal/mal_api.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/controllers/services/mal/mal_service.dart:543 — lib/controllers/services/mal/mal_service.dart:543-554 | lib/controllers/services/mal/mal_service.dart:732-743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:675 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:675-686 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:592-603 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/anime/watch/controls/widgets/tracks_popup.dart:136 — lib/screens/anime/watch/controls/widgets/tracks_popup.dart:136-147 | lib/widgets/anymex_widgets/anymex_tile_builder.dart:79-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.
  • Duplicated block (12 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:316 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:316-327 | lib/widgets/watchium/watchium_party_popup.dart:1231-1242 — 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 (12 lines × 2) lib/screens/anime/watch/watch_view.dart:144 — lib/screens/anime/watch/watch_view.dart:144-155 | lib/screens/local_source/player/offline_player.dart:115-126 — before extracting anything, compare `lib/screens/anime/watch/watch_view.dart` and `lib/screens/local_source/player/offline_player.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/anime/widgets/episode/styles/compact_style.dart:154 — lib/screens/anime/widgets/episode/styles/compact_style.dart:154-165 | lib/screens/anime/widgets/episode/styles/detailed_style.dart:170-181 — before extracting anything, compare `lib/screens/anime/widgets/episode/styles/compact_style.dart` and `lib/screens/anime/widgets/episode/styles/detailed_style.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:1231 — lib/screens/anime/widgets/episode_list_builder.dart:1231-1242 | lib/screens/manga/widgets/chapter_list_builder.dart:1360-1371 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/anime/widgets/voice_actor.dart:144 — lib/screens/anime/widgets/voice_actor.dart:144-155 | lib/screens/anime/widgets/voice_actor.dart:296-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/anime/widgets/wrongtitle_modal.dart:217 — lib/screens/anime/widgets/wrongtitle_modal.dart:217-228 | lib/screens/anime/widgets/wrongtitle_modal.dart:278-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/library/widgets/manga_card.dart:33 — lib/screens/library/widgets/manga_card.dart:33-44 | lib/screens/library/widgets/unified_history_card.dart:19-30 — 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/screens/library/widgets/unified_history_card.dart:28 — lib/screens/library/widgets/unified_history_card.dart:28-39 | lib/screens/library/widgets/unified_history_card.dart:324-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/novel/details/widgets/novel_stats.dart:30 — lib/screens/novel/details/widgets/novel_stats.dart:30-41 | lib/screens/novel/details/widgets/novel_stats.dart:65-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1472 — lib/screens/profile/compatibility/compatibility_result_page.dart:1472-1483 | lib/screens/profile/compatibility/compatibility_result_page.dart:1675-1686 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1792 — lib/screens/profile/compatibility/compatibility_result_page.dart:1792-1803 | lib/screens/profile/compatibility/compatibility_result_page.dart:2110-2122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/profile/profile_page.dart:276 — lib/screens/profile/profile_page.dart:276-287 | lib/screens/profile/user_profile_page.dart:370-381 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/profile/profile_page.dart:501 — lib/screens/profile/profile_page.dart:501-512 | lib/screens/profile/user_profile_page.dart:456-467 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/profile/profile_page.dart:850 — lib/screens/profile/profile_page.dart:850-861 | lib/screens/profile/profile_page.dart:866-877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/profile/widgets/profile_header.dart:447 — lib/screens/profile/widgets/profile_header.dart:447-458 | lib/screens/profile/widgets/user_profile_header.dart:416-432 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) lib/screens/profile/widgets/user_profile_header.dart:319 — lib/screens/profile/widgets/user_profile_header.dart:319-330 | lib/screens/profile/widgets/user_profile_header.dart:360-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/settings/sub_settings/settings_addons.dart:239 — lib/screens/settings/sub_settings/settings_addons.dart:239-250 | lib/screens/settings/sub_settings/settings_addons.dart:478-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lib/screens/settings/sub_settings/settings_backup.dart:367 — lib/screens/settings/sub_settings/settings_backup.dart:367-378 | lib/screens/settings/sub_settings/settings_backup.dart:717-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×33
  • Duplicated block (10 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:323 — lib/controllers/services/anilist/anilist_auth.dart:323-332 | lib/controllers/services/anilist/anilist_auth.dart:376-385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/controllers/services/anilist/anilist_data.dart:1354 — lib/controllers/services/anilist/anilist_data.dart:1354-1363 | lib/controllers/services/anilist/anilist_data.dart:1364-1373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/controllers/services/community_service.dart:1074 — lib/controllers/services/community_service.dart:1074-1083 | lib/controllers/services/community_service.dart:1125-1134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/controllers/services/mal/mal_service.dart:635 — lib/controllers/services/mal/mal_service.dart:635-645 | lib/controllers/services/mal/mal_service.dart:669-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/controllers/services/simkl/simkl_service.dart:912 — lib/controllers/services/simkl/simkl_service.dart:912-921 | lib/controllers/services/simkl/simkl_service.dart:934-943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/anime/misc/calendar.dart:948 — lib/screens/anime/misc/calendar.dart:948-958 | lib/widgets/media_items/media_item.dart:252-261 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/widgets/media_items/media_item.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 (10 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:569 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:569-580 | lib/widgets/watchium/watchium_create_dialog.dart:495-504 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (10 lines × 2) lib/screens/anime/widgets/anime_stats.dart:548 — lib/screens/anime/widgets/anime_stats.dart:548-557 | lib/screens/manga/widgets/manga_stats.dart:570-579 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (10 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:3131 — lib/screens/anime/widgets/comments/comments_section.dart:3131-3140 | lib/screens/anime/widgets/comments/comments_section.dart:3164-3173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/anime/widgets/episode/styles/compact_style.dart:53 — lib/screens/anime/widgets/episode/styles/compact_style.dart:53-62 | lib/screens/anime/widgets/episode/styles/detailed_style.dart:53-62 — before extracting anything, compare `lib/screens/anime/widgets/episode/styles/compact_style.dart` and `lib/screens/anime/widgets/episode/styles/detailed_style.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) lib/screens/community/community_recommendations_page.dart:131 — lib/screens/community/community_recommendations_page.dart:131-140 | lib/widgets/media_items/media_peek_popup.dart:205-214 — before extracting anything, compare `lib/screens/community/community_recommendations_page.dart` and `lib/widgets/media_items/media_peek_popup.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 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 (10 lines × 2) lib/screens/downloads/controller/download_controller.dart:1156 — lib/screens/downloads/controller/download_controller.dart:1156-1165 | lib/screens/downloads/controller/download_controller.dart:1920-1929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/downloads/download_screen.dart:396 — lib/screens/downloads/download_screen.dart:396-405 | lib/screens/downloads/download_screen.dart:614-623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/extensions/ExtensionSettings/ExtensionSettings.dart:152 — lib/screens/extensions/ExtensionSettings/ExtensionSettings.dart:152-161 | lib/screens/extensions/ExtensionSettings/ExtensionSettings.dart:163-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/manga/controller/reader_controller.dart:677 — lib/screens/manga/controller/reader_controller.dart:677-686 | lib/screens/manga/controller/reader_controller.dart:1497-1506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:643 — lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:643-652 | lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:685-694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/novel/reader/widgets/bottom_controls.dart:180 — lib/screens/novel/reader/widgets/bottom_controls.dart:180-189 | lib/screens/novel/reader/widgets/bottom_controls.dart:261-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1349 — lib/screens/profile/compatibility/compatibility_result_page.dart:1349-1359 | lib/screens/profile/compatibility/compatibility_result_page.dart:2257-2266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/profile/widgets/favorites_section.dart:175 — lib/screens/profile/widgets/favorites_section.dart:175-184 | lib/screens/profile/widgets/favorites_section.dart:290-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/profile/widgets/profile_stats_tab.dart:83 — lib/screens/profile/widgets/profile_stats_tab.dart:83-92 | lib/widgets/common/source_selector.dart:801-810 — 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 (10 lines × 2) lib/screens/profile/widgets/social_tab.dart:267 — lib/screens/profile/widgets/social_tab.dart:267-276 | lib/screens/profile/widgets/social_tab.dart:389-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/settings/sub_settings/settings_downloads.dart:19 — lib/screens/settings/sub_settings/settings_downloads.dart:19-28 | lib/screens/settings/sub_settings/settings_logs.dart:20-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) lib/screens/settings/sub_settings/settings_moderation.dart:1333 — lib/screens/settings/sub_settings/settings_moderation.dart:1333-1342 | lib/screens/settings/sub_settings/settings_moderation.dart:1375-1384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/screens/watchium/watchium_page.dart:1208 — lib/screens/watchium/watchium_page.dart:1208-1217 | lib/screens/watchium/watchium_page.dart:1247-1256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/services/commentum_service.dart:772 — lib/services/commentum_service.dart:772-781 | lib/services/commentum_service.dart:1524-1533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 8 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×30
  • TooManyMethods: Settings lib/controllers/settings/settings.dart:25 — TooManyMethods — 169 methods. The bar is 30 methods; this is 139 over it, 5.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: PlayerController lib/screens/anime/watch/controller/player_controller.dart:94 — TooManyMethods — 126 methods. The bar is 30 methods; this is 96 over it, 4.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: ReaderController lib/screens/manga/controller/reader_controller.dart:95 — TooManyMethods — 104 methods. The bar is 30 methods; this is 74 over it, 3.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NovelReaderController lib/screens/novel/reader/controller/reader_controller.dart:23 — TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.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: DownloadController lib/screens/downloads/controller/download_controller.dart:34 — TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CommentumService lib/services/commentum_service.dart:48 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _CommentSectionState lib/screens/anime/widgets/comments/comments_section.dart:52 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: OfflineStorageController lib/controllers/offline/offline_storage_controller.dart:23 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SourceController lib/controllers/source/source_controller.dart:31 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnilistAuth lib/controllers/services/anilist/anilist_auth.dart:32 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CommentSectionController lib/screens/anime/widgets/comments/controller/comments_controller.dart:16 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _SettingsPlayerState lib/screens/settings/sub_settings/settings_player.dart:139 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _FuturisticFilterSheetState lib/screens/search/widgets/search_widgets.dart:263 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _SearchPageState lib/screens/search/search_view.dart:77 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: GistSyncController lib/controllers/sync/gist_sync_controller.dart:33 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DiscordRPCController lib/controllers/discord/discord_rpc.dart:102 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WatchiumService lib/controllers/watchium/watchium_service.dart:16 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ThemeRenderer lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:144 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Matchmaker lib/utils/compatibility/matchmaker.dart:6 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnilistData lib/controllers/services/anilist/anilist_data.dart:52 — 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: MediaDetailsController lib/screens/anime/details/controller/media_details_controller.dart:29 — 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: _CompatibilityResultPageState lib/screens/profile/compatibility/compatibility_result_page.dart:53 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MediaKitPlayer lib/screens/anime/watch/player/media_kit_player.dart:14 — 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: _AnymeXAnimatedLogoState lib/widgets/anymex_widgets/anymex_animated_logo.dart:38 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.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: SimklService lib/controllers/services/simkl/simkl_service.dart:40 — 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.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×30
  • Duplicated block (8 lines × 2) lib/controllers/services/community_service.dart:944 — lib/controllers/services/community_service.dart:944-951 | lib/controllers/services/community_service.dart:1045-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/controllers/services/community_service.dart:1014 — lib/controllers/services/community_service.dart:1014-1021 | lib/controllers/services/community_service.dart:1100-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/controllers/services/mal/mal_service.dart:416 — lib/controllers/services/mal/mal_service.dart:416-423 | lib/controllers/services/simkl/simkl_service.dart:286-293 — 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/models/Media/media.dart:432 — lib/models/Media/media.dart:432-439 | lib/models/Media/media.dart:1064-1071 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/models/Media/media.dart:639 — lib/models/Media/media.dart:639-646 | lib/models/Media/media.dart:940-947 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/anime/misc/calendar.dart:91 — lib/screens/anime/misc/calendar.dart:91-98 | lib/screens/anime/misc/calendar.dart:111-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:251 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:251-258 | lib/widgets/anymex_widgets/anymex_tile_builder.dart:74-81 — 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/screens/anime/widgets/comments/discord_markdown.dart:1040 — lib/screens/anime/widgets/comments/discord_markdown.dart:1040-1047 | lib/screens/anime/widgets/comments/discord_markdown.dart:1065-1072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/anime/widgets/comments/discord_markdown.dart:1070 — lib/screens/anime/widgets/comments/discord_markdown.dart:1070-1077 | lib/widgets/non_widgets/activity_composer_sheet.dart:201-208 — 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/screens/anime/widgets/episode_list_builder.dart:395 — lib/screens/anime/widgets/episode_list_builder.dart:395-402 | lib/screens/downloads/controller/download_search_controller.dart:331-338 — 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/screens/anime/widgets/episode_list_builder.dart:518 — lib/screens/anime/widgets/episode_list_builder.dart:518-526 | lib/screens/anime/widgets/episode_list_builder.dart:690-697 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/downloads/download_screen.dart:821 — lib/screens/downloads/download_screen.dart:821-828 | lib/screens/downloads/nested_screens/active_downloads/active_downloads.dart:138-145 — 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/screens/local_source/controller/local_source_controller.dart:368 — lib/screens/local_source/controller/local_source_controller.dart:368-375 | lib/screens/local_source/controller/local_source_controller.dart:401-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/profile/user_profile_page.dart:891 — lib/screens/profile/user_profile_page.dart:891-899 | lib/screens/profile/widgets/activity_heatmap.dart:147-154 — 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/screens/settings/sub_settings/settings_comments.dart:333 — lib/screens/settings/sub_settings/settings_comments.dart:333-341 | lib/screens/settings/sub_settings/settings_moderation.dart:1170-1177 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:49 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:49-56 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1378-1387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:562 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:562-569 | lib/screens/watchium/watchium_page.dart:794-801 — 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/utils/compatibility/matchmaker.dart:702 — lib/utils/compatibility/matchmaker.dart:702-709 | lib/utils/compatibility/matchmaker.dart:968-975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/utils/compatibility/matchmaker.dart:906 — lib/utils/compatibility/matchmaker.dart:906-913 | lib/utils/compatibility/matchmaker.dart:922-929 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/utils/media_syncer.dart:28 — lib/utils/media_syncer.dart:28-35 | lib/utils/media_syncer.dart:45-52 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/widgets/animation/page_transition.dart:127 — lib/widgets/animation/page_transition.dart:127-134 | lib/widgets/animation/page_transition.dart:139-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/widgets/anymex_widgets/anymex_titlebar.dart:240 — lib/widgets/anymex_widgets/anymex_titlebar.dart:240-247 | lib/widgets/common/navbar.dart:102-109 — 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/widgets/common/source_selector.dart:111 — lib/widgets/common/source_selector.dart:111-118 | lib/widgets/common/source_selector.dart:351-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/widgets/non_widgets/activity_composer_sheet.dart:507 — lib/widgets/non_widgets/activity_composer_sheet.dart:507-514 | lib/widgets/non_widgets/activity_composer_sheet.dart:530-537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lib/screens/anime/watch/controls/center_controls.dart:13 — lib/screens/anime/watch/controls/center_controls.dart:13-20 | lib/screens/anime/watch/controls/widgets/double_tap_seek.dart:124-131 — 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.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×27
  • Duplicated block (9 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:1941 — lib/controllers/services/anilist/anilist_auth.dart:1941-1949 | lib/controllers/services/anilist/anilist_auth.dart:2069-2077 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/controllers/services/backup_restore/backup_restore_service.dart:716 — lib/controllers/services/backup_restore/backup_restore_service.dart:716-724 | lib/controllers/services/backup_restore/backup_restore_service.dart:1472-1480 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/controllers/source/source_controller.dart:194 — lib/controllers/source/source_controller.dart:194-202 | lib/screens/extensions/ExtensionList.dart:171-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) lib/controllers/stats/stats_tracker.dart:18 — lib/controllers/stats/stats_tracker.dart:18-26 | lib/controllers/stats/stats_tracker.dart:71-79 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/models/Anilist/anilist_media_user.dart:300 — lib/models/Anilist/anilist_media_user.dart:300-308 | lib/models/Anilist/anilist_media_user.dart:341-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:28 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:28-36 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:30-38 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:179 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:179-187 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:185-193 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:361 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:361-369 | lib/widgets/watchium/watchium_create_dialog.dart:195-203 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:668 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:668-676 | lib/widgets/watchium/watchium_create_dialog.dart:587-595 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/anime/widgets/anime_stats.dart:844 — lib/screens/anime/widgets/anime_stats.dart:844-852 | lib/screens/profile/widgets/profile_stats_tab.dart:750-758 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/profile/widgets/profile_stats_tab.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:3276 — lib/screens/anime/widgets/comments/comments_section.dart:3276-3284 | lib/screens/settings/sub_settings/settings_moderation.dart:1781-1789 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/settings/sub_settings/settings_moderation.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/anime/widgets/comments/mention_autocomplete.dart:135 — lib/screens/anime/widgets/comments/mention_autocomplete.dart:135-143 | lib/screens/anime/widgets/comments/mention_autocomplete.dart:145-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:475 — lib/screens/anime/widgets/episode_list_builder.dart:475-483 | lib/screens/anime/widgets/episode_list_builder.dart:1263-1271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/anime/widgets/episode_range.dart:23 — lib/screens/anime/widgets/episode_range.dart:23-31 | lib/screens/manga/widgets/chapter_ranges.dart:18-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) lib/screens/community/community_recommendations_page.dart:94 — lib/screens/community/community_recommendations_page.dart:94-102 | lib/widgets/media_items/media_peek_popup.dart:170-178 — before extracting anything, compare `lib/screens/community/community_recommendations_page.dart` and `lib/widgets/media_items/media_peek_popup.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/community/community_recommendations_page.dart:402 — lib/screens/community/community_recommendations_page.dart:402-410 | lib/screens/community/community_recommendations_page.dart:843-851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/downloads/download_screen.dart:464 — lib/screens/downloads/download_screen.dart:464-472 | lib/screens/downloads/download_screen.dart:821-829 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/manga/controller/reader_controller.dart:1537 — lib/screens/manga/controller/reader_controller.dart:1537-1545 | lib/screens/novel/reader/controller/reader_controller.dart:713-721 — before extracting anything, compare `lib/screens/manga/controller/reader_controller.dart` and `lib/screens/novel/reader/controller/reader_controller.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) lib/screens/novel/details/widgets/chapters_section.dart:241 — lib/screens/novel/details/widgets/chapters_section.dart:241-249 | lib/screens/novel/details/widgets/chapters_section.dart:319-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/profile/widgets/profile_header.dart:691 — lib/screens/profile/widgets/profile_header.dart:691-699 | lib/screens/profile/widgets/profile_header.dart:703-711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/profile/widgets/stats_overview_cards.dart:44 — lib/screens/profile/widgets/stats_overview_cards.dart:44-52 | lib/screens/profile/widgets/stats_overview_cards.dart:72-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/screens/watchium/watchium_page.dart:853 — lib/screens/watchium/watchium_page.dart:853-861 | lib/utils/color_profiler.dart:1192-1200 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) lib/widgets/anymex_widgets/anymex_image.dart:195 — lib/widgets/anymex_widgets/anymex_image.dart:195-203 | lib/widgets/anymex_widgets/anymex_image.dart:214-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/widgets/anymex_widgets/anymex_tile_builder.dart:164 — lib/widgets/anymex_widgets/anymex_tile_builder.dart:164-172 | lib/widgets/anymex_widgets/anymex_tile_builder.dart:217-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/widgets/header/header.dart:739 — lib/widgets/header/header.dart:739-747 | lib/widgets/header/header.dart:776-784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 2 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×27
  • Swallowed exception (empty catch) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:269 — 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) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:280 — 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) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:433 — 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) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:457 — 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) lib/main.dart:127 — 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) lib/controllers/custom_logo/custom_logo_service.dart:54 — 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) lib/controllers/network/cookie_manager.dart:345 — 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) lib/controllers/offline/offline_storage_controller.dart:159 — 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) lib/controllers/services/jikan.dart:44 — 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) lib/controllers/services/anilist/anilist_error_handler.dart:38 — 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) lib/controllers/services/anilist/anilist_auth.dart:1030 — 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) lib/controllers/services/backup_restore/backup_restore_service.dart:385 — 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) lib/controllers/services/backup_restore/backup_format_detector.dart:29 — 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) lib/controllers/services/backup_restore/backup_format_detector.dart:40 — 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) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:37 — 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) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:42 — 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) lib/controllers/services/storage/storage_manager_service.dart:65 — 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) lib/controllers/services/storage/storage_manager_service.dart:112 — 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) lib/controllers/services/storage/storage_manager_service.dart:115 — 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) lib/controllers/services/storage/storage_manager_service.dart:140 — 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) lib/controllers/services/storage/storage_manager_service.dart:142 — 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) lib/controllers/services/storage/storage_manager_service.dart:195 — 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) lib/controllers/services/storage/storage_manager_service.dart:199 — 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) lib/controllers/services/storage/storage_manager_service.dart:220 — 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) lib/controllers/services/storage/storage_manager_service.dart:222 — 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 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×22
  • Duplicated block (14 lines × 2) lib/controllers/services/widgets/widgets_builders.dart:301 — lib/controllers/services/widgets/widgets_builders.dart:301-314 | lib/screens/community/community_recommendations_page.dart:777-790 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 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 (14 lines × 2) lib/screens/anime/misc/calendar.dart:960 — lib/screens/anime/misc/calendar.dart:960-973 | lib/widgets/media_items/media_item.dart:263-276 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/widgets/media_items/media_item.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 (14 lines × 2) lib/screens/anime/misc/calendar.dart:1035 — lib/screens/anime/misc/calendar.dart:1035-1048 | lib/widgets/media_items/media_item.dart:336-349 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/widgets/media_items/media_item.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 (14 lines × 2) lib/screens/anime/watch/controller/player_controller.dart:1094 — lib/screens/anime/watch/controller/player_controller.dart:1094-1107 | lib/screens/anime/watch/controller/player_controller.dart:1959-1972 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) lib/screens/anime/watch/controls/bottom_controls.dart:442 — lib/screens/anime/watch/controls/bottom_controls.dart:442-455 | lib/screens/anime/watch/controls/bottom_controls.dart:533-546 — both copies are in the same file, so extract the 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/screens/anime/watch/controls/center_controls.dart:80 — lib/screens/anime/watch/controls/center_controls.dart:80-93 | lib/screens/anime/watch/controls/center_controls.dart:156-169 — both copies are in the same file, so extract the 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/screens/anime/watch/controls/widgets/tracks_popup.dart:152 — lib/screens/anime/watch/controls/widgets/tracks_popup.dart:152-165 | lib/widgets/anymex_widgets/anymex_tile_builder.dart:94-107 — 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 (14 lines × 2) lib/screens/anime/widgets/character_staff_sheet.dart:920 — lib/screens/anime/widgets/character_staff_sheet.dart:920-933 | lib/screens/anime/widgets/character_staff_sheet.dart:955-968 — both copies are in the same file, so extract the 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/screens/anime/widgets/comments/comments_section.dart:1548 — lib/screens/anime/widgets/comments/comments_section.dart:1548-1561 | lib/screens/anime/widgets/comments/comments_section.dart:1893-1906 — both copies are in the same file, so extract the 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/screens/anime/widgets/list_editor.dart:579 — lib/screens/anime/widgets/list_editor.dart:579-592 | lib/screens/anime/widgets/list_editor.dart:678-691 — both copies are in the same file, so extract the 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/screens/downloads/download_screen.dart:310 — lib/screens/downloads/download_screen.dart:310-323 | lib/screens/downloads/download_screen.dart:354-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) lib/screens/downloads/download_screen.dart:1177 — lib/screens/downloads/download_screen.dart:1177-1190 | lib/screens/downloads/download_screen.dart:1446-1459 — both copies are in the same file, so extract the 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/screens/library/stats_page.dart:95 — lib/screens/library/stats_page.dart:95-108 | lib/screens/library/stats_page.dart:113-126 — both copies are in the same file, so extract the 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/screens/manga/widgets/chapter_list_builder.dart:518 — lib/screens/manga/widgets/chapter_list_builder.dart:518-531 | lib/screens/manga/widgets/chapter_list_builder.dart:572-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) lib/screens/profile/widgets/profile_header.dart:147 — lib/screens/profile/widgets/profile_header.dart:147-161 | lib/screens/profile/widgets/user_profile_header.dart:129-142 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) lib/screens/search/widgets/extension_filter_sheet.dart:459 — lib/screens/search/widgets/extension_filter_sheet.dart:459-472 | lib/screens/search/widgets/extension_filter_sheet.dart:616-629 — both copies are in the same file, so extract the 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/screens/settings/sub_settings/settings_ui.dart:685 — lib/screens/settings/sub_settings/settings_ui.dart:685-698 | lib/screens/settings/sub_settings/settings_ui.dart:730-743 — both copies are in the same file, so extract the 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/services/commentum_service.dart:606 — lib/services/commentum_service.dart:606-619 | lib/services/commentum_service.dart:966-979 — both copies are in the same file, so extract the 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/widgets/anymex_widgets/anymex_tile.dart:110 — lib/widgets/anymex_widgets/anymex_tile.dart:110-123 | lib/widgets/anymex_widgets/anymex_tile.dart:336-349 — both copies are in the same file, so extract the 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/widgets/anymex_widgets/anymex_tile.dart:383 — lib/widgets/anymex_widgets/anymex_tile.dart:383-396 | lib/widgets/anymex_widgets/anymex_tile.dart:420-433 — both copies are in the same file, so extract the 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/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:72 — lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:72-85 | lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:135-148 — both copies are in the same file, so extract the 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/screens/extensions/ExtensionTesting/extension_test_item.dart:372 — lib/screens/extensions/ExtensionTesting/extension_test_item.dart:372-385 | lib/screens/extensions/ExtensionTesting/extension_test_page.dart:393-406 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×22
  • Duplicated block (7 lines × 2) lib/controllers/offline/offline_storage_controller.dart:656 — lib/controllers/offline/offline_storage_controller.dart:656-662 | lib/controllers/offline/offline_storage_controller.dart:697-703 — both copies are in the same file, so extract the 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/controllers/services/mal/mal_service.dart:656 — lib/controllers/services/mal/mal_service.dart:656-662 | lib/controllers/services/mal/mal_service.dart:680-686 — both copies are in the same file, so extract the 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/controllers/services/storage/storage_manager_service.dart:55 — lib/controllers/services/storage/storage_manager_service.dart:55-61 | lib/controllers/services/storage/storage_manager_service.dart:103-109 — both copies are in the same file, so extract the 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/models/Media/media.dart:266 — lib/models/Media/media.dart:266-272 | lib/models/Media/media.dart:465-471 — both copies are in the same file, so extract the 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/screens/anime/watch/controls/widgets/speed_popup.dart:410 — lib/screens/anime/watch/controls/widgets/speed_popup.dart:410-416 | lib/utils/al_about_me_helpers.dart:245-251 — 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/screens/downloads/controller/download_controller.dart:359 — lib/screens/downloads/controller/download_controller.dart:359-365 | lib/screens/downloads/controller/download_controller.dart:400-406 — both copies are in the same file, so extract the 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/screens/downloads/nested_screens/active_downloads/active_downloads.dart:530 — lib/screens/downloads/nested_screens/active_downloads/active_downloads.dart:530-536 | lib/screens/downloads/nested_screens/active_downloads/active_downloads.dart:635-641 — both copies are in the same file, so extract the 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/screens/local_source/controller/local_source_controller.dart:359 — lib/screens/local_source/controller/local_source_controller.dart:359-365 | lib/screens/local_source/controller/local_source_controller.dart:392-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lib/screens/manga/widgets/reader/continuous_reader.dart:340 — lib/screens/manga/widgets/reader/continuous_reader.dart:340-346 | lib/screens/manga/widgets/reader/reader_view.dart:301-307 — before extracting anything, compare `lib/screens/manga/widgets/reader/continuous_reader.dart` and `lib/screens/manga/widgets/reader/reader_view.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/screens/profile/compatibility/compatibility_input_page.dart:423 — lib/screens/profile/compatibility/compatibility_input_page.dart:423-430 | lib/screens/settings/sub_settings/settings_addons.dart:276-282 — 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/screens/search/widgets/search_widgets.dart:1217 — lib/screens/search/widgets/search_widgets.dart:1217-1223 | lib/screens/search/widgets/search_widgets.dart:1289-1295 — both copies are in the same file, so extract the 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/widgets/anime/visuals/visuals_popup.dart:72 — lib/widgets/anime/visuals/visuals_popup.dart:72-78 | lib/widgets/anime/visuals/visuals_popup.dart:138-144 — both copies are in the same file, so extract the 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/widgets/common/navbar/styles/classic_navbar.dart:62 — lib/widgets/common/navbar/styles/classic_navbar.dart:62-68 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:58-64 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/widgets/watchium/watchium_live_overlays.dart:130 — lib/widgets/watchium/watchium_live_overlays.dart:130-136 | lib/widgets/watchium/watchium_live_overlays.dart:305-311 — both copies are in the same file, so extract the 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/screens/library/history_page.dart:71 — lib/screens/library/history_page.dart:71-77 | lib/screens/library/my_library.dart:72-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) lib/screens/library/online/anime_list.dart:81 — lib/screens/library/online/anime_list.dart:81-87 | lib/screens/library/online/manga_list.dart:79-85 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/screens/manga/controller/reader_controller.dart:451 — lib/screens/manga/controller/reader_controller.dart:451-457 | lib/screens/novel/reader/controller/reader_controller.dart:237-243 — before extracting anything, compare `lib/screens/manga/controller/reader_controller.dart` and `lib/screens/novel/reader/controller/reader_controller.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:80 — lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:80-86 | lib/widgets/header/header.dart:655-661 — before extracting anything, compare `lib/screens/manga/widgets/reader/tabbed_reader_settings.dart` and `lib/widgets/header/header.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:88 — lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:88-94 | lib/widgets/header/header.dart:663-669 — before extracting anything, compare `lib/screens/manga/widgets/reader/tabbed_reader_settings.dart` and `lib/widgets/header/header.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/screens/profile/profile_page.dart:1034 — lib/screens/profile/profile_page.dart:1034-1040 | lib/screens/profile/user_profile_page.dart:982-988 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lib/widgets/non_widgets/in_app_notification_banner.dart:157 — lib/widgets/non_widgets/in_app_notification_banner.dart:157-163 | lib/widgets/non_widgets/snackbar.dart:196-202 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) lib/utils/compatibility/matchmaker.dart:679 — lib/utils/compatibility/matchmaker.dart:679-685 | lib/utils/compatibility/matchmaker.dart:945-951 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×22
  • Low cohesion: CommentumService (LCOM4 28) lib/services/commentum_service.dart:48 — CommentumService's methods fall into 28 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 28 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: OfflineStorageController (LCOM4 21) lib/controllers/offline/offline_storage_controller.dart:23 — OfflineStorageController's methods fall into 21 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 21 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AnilistAuth (LCOM4 11) lib/controllers/services/anilist/anilist_auth.dart:32 — AnilistAuth'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: ServiceHandler (LCOM4 8) lib/controllers/service_handler/service_handler.dart:57 — ServiceHandler'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: _SettingsPlayerState (LCOM4 8) lib/screens/settings/sub_settings/settings_player.dart:139 — _SettingsPlayerState'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: SourceController (LCOM4 7) lib/controllers/source/source_controller.dart:31 — SourceController'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: AnilistData (LCOM4 6) lib/controllers/services/anilist/anilist_data.dart:52 — AnilistData'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: Settings (LCOM4 6) lib/controllers/settings/settings.dart:25 — Settings'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: _CommentInputBarState (LCOM4 6) lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:34 — _CommentInputBarState'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: CookieManager (LCOM4 5) lib/controllers/network/cookie_manager.dart:9 — CookieManager'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: _CommentSectionState (LCOM4 5) lib/screens/anime/widgets/comments/comments_section.dart:52 — _CommentSectionState'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: _MentionAutocompleteState (LCOM4 5) lib/screens/anime/widgets/comments/mention_autocomplete.dart:30 — _MentionAutocompleteState'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: _ListEditorModalState (LCOM4 5) lib/screens/anime/widgets/list_editor.dart:46 — _ListEditorModalState'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: _FuturisticFilterSheetState (LCOM4 5) lib/screens/search/widgets/search_widgets.dart:263 — _FuturisticFilterSheetState'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: _MediaPeekPopupState (LCOM4 5) lib/widgets/media_items/media_peek_popup.dart:130 — _MediaPeekPopupState'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: _FilterScreenState (LCOM4 4) lib/main.dart:439 — _FilterScreenState'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: BackupRestoreService (LCOM4 4) lib/controllers/services/backup_restore/backup_restore_service.dart:362 — BackupRestoreService'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: TrackBindingController (LCOM4 4) lib/controllers/track/track_binding_controller.dart:15 — TrackBindingController'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: _ExtensionListState (LCOM4 4) lib/screens/extensions/ExtensionList.dart:38 — _ExtensionListState'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: LocalSourceController (LCOM4 4) lib/screens/local_source/controller/local_source_controller.dart:26 — LocalSourceController'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: NotificationService (LCOM4 4) lib/utils/notification.dart:115 — NotificationService'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: _ReasonsSheetState (LCOM4 4) lib/widgets/non_widgets/reasons_sheet.dart:54 — _ReasonsSheetState'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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×21
  • Duplicated block (16 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:1253 — lib/controllers/services/anilist/anilist_auth.dart:1253-1268 | lib/controllers/services/anilist/anilist_auth.dart:1313-1328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) lib/controllers/watchium/watchium_service.dart:79 — lib/controllers/watchium/watchium_service.dart:79-94 | lib/widgets/watchium/watchium_party_popup.dart:252-267 — 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 (16 lines × 2) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:164 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:164-179 | lib/widgets/common/anymex_slider_m3.dart:169-184 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 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 (16 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:924 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:924-939 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:815-830 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:68 — lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:68-83 | lib/screens/anime/watch/controls/themes/player_control_themes/netflix_mobile_player_theme.dart:83-98 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/netflix_mobile_player_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:608 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:608-623 | lib/widgets/watchium/watchium_create_dialog.dart:529-544 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (16 lines × 2) lib/screens/anime/widgets/anime_stats.dart:54 — lib/screens/anime/widgets/anime_stats.dart:54-69 | lib/screens/manga/widgets/manga_stats.dart:69-84 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (16 lines × 2) lib/screens/anime/widgets/anime_stats.dart:824 — lib/screens/anime/widgets/anime_stats.dart:824-839 | lib/screens/manga/widgets/manga_stats.dart:490-505 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (16 lines × 2) lib/screens/anime/widgets/character_staff_sheet.dart:493 — lib/screens/anime/widgets/character_staff_sheet.dart:493-508 | lib/screens/anime/widgets/character_staff_sheet.dart:513-528 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/screens/library/widgets/unified_history_card.dart:230 — lib/screens/library/widgets/unified_history_card.dart:230-245 | lib/screens/library/widgets/unified_history_card.dart:368-383 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/screens/manga/widgets/reader/top_controls.dart:79 — lib/screens/manga/widgets/reader/top_controls.dart:79-94 | lib/screens/novel/reader/widgets/top_controls.dart:56-71 — before extracting anything, compare `lib/screens/manga/widgets/reader/top_controls.dart` and `lib/screens/novel/reader/widgets/top_controls.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 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 (16 lines × 2) lib/screens/profile/profile_page.dart:406 — lib/screens/profile/profile_page.dart:406-421 | lib/widgets/non_widgets/activity_card.dart:461-476 — 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 (16 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart:70 — lib/screens/settings/sub_settings/settings_comments.dart:70-85 | lib/screens/settings/sub_settings/settings_moderation.dart:56-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 (16 lines × 2) lib/screens/settings/sub_settings/settings_moderation.dart:1964 — lib/screens/settings/sub_settings/settings_moderation.dart:1964-1979 | lib/screens/settings/sub_settings/settings_moderation.dart:2031-2046 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/screens/settings/sub_settings/widgets/about_deps.dart:27 — lib/screens/settings/sub_settings/widgets/about_deps.dart:27-42 | lib/screens/settings/sub_settings/widgets/about_deps.dart:112-127 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/services/cast/cast_proxy_server.dart:234 — lib/services/cast/cast_proxy_server.dart:234-249 | lib/services/cast/cast_proxy_server.dart:319-334 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/utils/updater.dart:90 — lib/utils/updater.dart:90-105 | lib/utils/updater.dart:123-138 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/widgets/animation/animations.dart:316 — lib/widgets/animation/animations.dart:316-331 | lib/widgets/animation/animations.dart:390-405 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/widgets/common/navbar.dart:172 — lib/widgets/common/navbar.dart:172-187 | lib/widgets/common/navbar.dart:209-224 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:107 — lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:107-122 | lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:158-173 — both copies are in the same file, so extract the 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 (16 lines × 2) lib/screens/extensions/ExtensionTesting/extension_test_page.dart:75 — lib/screens/extensions/ExtensionTesting/extension_test_page.dart:75-90 | lib/screens/extensions/ExtensionTesting/extension_test_page.dart:159-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×20
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/discord/discord_rpc.dart:498 — lib/controllers/discord/discord_rpc.dart:498-625 | lib/controllers/discord/discord_rpc.dart:627-740 | lib/controllers/discord/discord_rpc.dart:742-852 | lib/controllers/discord/discord_rpc.dart:854-957 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/network/cookie_manager.dart:683 — lib/controllers/network/cookie_manager.dart:683-715 | lib/database/comments/model/comment.dart:158-243 | lib/screens/anime/watch/player/base_player.dart:101-121 | lib/widgets/common/anymex_slider_m3.dart:53-81 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/offline/offline_storage_controller.dart:646 — lib/controllers/offline/offline_storage_controller.dart:646-684 | lib/controllers/offline/offline_storage_controller.dart:686-724 | lib/controllers/offline/offline_storage_controller.dart:809-883 | lib/screens/manga/controller/reader_controller.dart:777-807 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/services/anilist/anilist_auth.dart:837 — lib/controllers/services/anilist/anilist_auth.dart:837-996 | lib/controllers/services/anilist/anilist_auth.dart:1001-1032 | lib/controllers/services/anilist/anilist_auth.dart:1071-1171 | lib/controllers/services/anilist/anilist_auth.dart:1177-1213 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/services/anilist/anilist_auth.dart:2186 — lib/controllers/services/anilist/anilist_auth.dart:2186-2317 | lib/controllers/services/anilist/anilist_auth.dart:2319-2431 | lib/controllers/services/anilist/anilist_auth.dart:2433-2486 | lib/controllers/services/anilist/anilist_auth.dart:2488-2541 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/services/community_service.dart:1023 — lib/controllers/services/community_service.dart:1023-1052 | lib/controllers/services/community_service.dart:1054-1083 | lib/controllers/services/community_service.dart:1085-1107 | lib/controllers/services/community_service.dart:1109-1134 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/services/widgets/widgets_builders.dart:281 — lib/controllers/services/widgets/widgets_builders.dart:281-359 | lib/screens/anime/watch/controls/widgets/shader_osd.dart:10-66 | lib/screens/community/community_recommendations_page.dart:523-579 | lib/screens/community/community_recommendations_page.dart:770-810 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/controllers/services/widgets/widgets_builders.dart:420 — lib/controllers/services/widgets/widgets_builders.dart:420-453 | lib/screens/community/community_recommendations_page.dart:730-763 | lib/screens/community/user_recommendations_page.dart:360-393 | lib/widgets/media_items/media_peek_popup.dart:1135-1168 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/models/notification/notification_item.dart:81 — lib/models/notification/notification_item.dart:81-130 | lib/screens/anime/misc/list_exporter.dart:213-238 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1540-1585 | lib/screens/search/widgets/search_widgets.dart:33-58 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/anime/widgets/list_editor.dart:630 — lib/screens/anime/widgets/list_editor.dart:630-670 | lib/screens/anime/widgets/list_editor.dart:757-797 | lib/widgets/common/source_selector.dart:459-633 | lib/widgets/header/header.dart:501-559 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/downloads/download_screen.dart:861 — lib/screens/downloads/download_screen.dart:861-1204 | lib/screens/downloads/download_screen.dart:1206-1473 | lib/screens/downloads/download_screen.dart:1475-1597 | lib/screens/downloads/widgets/download_server_selector.dart:229-509 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/downloads/widgets/downloaded_media_view.dart:360 — lib/screens/downloads/widgets/downloaded_media_view.dart:360-523 | lib/screens/downloads/widgets/downloaded_media_view.dart:688-971 | lib/screens/downloads/widgets/downloaded_media_view.dart:973-1145 | lib/screens/extensions/ExtensionItem.dart:106-324 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/library/editor/list_editor.dart:532 — lib/screens/library/editor/list_editor.dart:532-571 | lib/screens/local_source/local_source_view.dart:818-869 | lib/screens/local_source/local_source_view.dart:871-922 | lib/screens/local_source/local_source_view.dart:924-959 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/library/widgets/library_deps.dart:136 — lib/screens/library/widgets/library_deps.dart:136-232 | lib/widgets/common/custom_tiles.dart:144-200 | lib/widgets/common/custom_tiles.dart:227-285 | lib/widgets/common/custom_tiles.dart:314-418 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:110 — lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:110-188 | lib/widgets/anime/visuals/visuals_popup.dart:162-280 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:27-146 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:148-190 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/manga/widgets/reader/top_controls.dart:79 — lib/screens/manga/widgets/reader/top_controls.dart:79-94 | lib/screens/manga/widgets/reader/top_controls.dart:178-194 | lib/screens/novel/reader/widgets/top_controls.dart:56-71 | lib/screens/novel/reader/widgets/top_controls.dart:162-177 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/novel/reader/widgets/bottom_controls.dart:72 — lib/screens/novel/reader/widgets/bottom_controls.dart:72-94 | lib/screens/novel/reader/widgets/bottom_controls.dart:151-230 | lib/screens/novel/reader/widgets/bottom_controls.dart:232-296 | lib/screens/novel/reader/widgets/bottom_controls.dart:298-321 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/screens/search/widgets/search_widgets.dart:1426 — lib/screens/search/widgets/search_widgets.dart:1426-1454 | lib/screens/search/widgets/search_widgets.dart:1509-1597 | lib/screens/search/widgets/search_widgets.dart:1599-1671 | lib/screens/search/widgets/search_widgets.dart:1673-1746 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/utils/color_profiler.dart:353 — lib/utils/color_profiler.dart:353-379 | lib/utils/color_profiler.dart:381-401 | lib/utils/color_profiler.dart:403-421 | lib/utils/color_profiler.dart:429-449 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lib/widgets/anymex_widgets/anymex_animated_logo.dart:667 — lib/widgets/anymex_widgets/anymex_animated_logo.dart:667-731 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:903-1020 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:1119-1211 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:1316-1391 — 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 · Duplicated block (15 lines × 2) · ×18
  • Duplicated block (15 lines × 2) lib/controllers/services/widgets/widgets_builders.dart:304 — lib/controllers/services/widgets/widgets_builders.dart:304-318 | lib/screens/community/community_recommendations_page.dart:537-551 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) lib/screens/anime/studio_details_page.dart:118 — lib/screens/anime/studio_details_page.dart:118-132 | lib/screens/anime/widgets/character_staff_sheet.dart:140-154 — before extracting anything, compare `lib/screens/anime/studio_details_page.dart` and `lib/screens/anime/widgets/character_staff_sheet.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) lib/screens/anime/watch/controller/player_controller.dart:1074 — lib/screens/anime/watch/controller/player_controller.dart:1074-1088 | lib/screens/anime/watch/controller/player_controller.dart:1939-1953 — both copies are in the same file, so extract the 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 (15 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.dart:199 — lib/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.dart:199-213 | lib/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.dart:435-449 — both copies are in the same file, so extract the 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 (15 lines × 2) lib/screens/anime/widgets/comments/discord_markdown.dart:1083 — lib/screens/anime/widgets/comments/discord_markdown.dart:1083-1097 | lib/widgets/non_widgets/activity_composer_sheet.dart:219-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) lib/screens/anime/widgets/episode/styles/minimal_style.dart:81 — lib/screens/anime/widgets/episode/styles/minimal_style.dart:81-95 | lib/screens/manga/widgets/chapter_list_builder.dart:706-720 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) lib/screens/anime/widgets/video_slider.dart:108 — lib/screens/anime/widgets/video_slider.dart:108-122 | lib/widgets/common/slider_semantics.dart:196-210 — before extracting anything, compare `lib/screens/anime/widgets/video_slider.dart` and `lib/widgets/common/slider_semantics.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) lib/screens/downloads/controller/download_controller.dart:92 — lib/screens/downloads/controller/download_controller.dart:92-106 | lib/screens/downloads/controller/download_controller.dart:130-144 — both copies are in the same file, so extract the 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 (15 lines × 2) lib/screens/downloads/widgets/downloaded_media_view.dart:249 — lib/screens/downloads/widgets/downloaded_media_view.dart:249-263 | lib/screens/manga/widgets/chapter_list_builder.dart:1324-1338 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) lib/screens/library/online/anime_list.dart:276 — lib/screens/library/online/anime_list.dart:276-290 | lib/screens/library/online/manga_list.dart:255-269 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:64 — lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:64-78 | lib/widgets/header/header.dart:639-653 — before extracting anything, compare `lib/screens/manga/widgets/reader/tabbed_reader_settings.dart` and `lib/widgets/header/header.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:2530 — lib/screens/profile/compatibility/compatibility_result_page.dart:2530-2544 | lib/screens/settings/sub_settings/settings_addons.dart:182-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) lib/screens/profile/widgets/profile_header.dart:785 — lib/screens/profile/widgets/profile_header.dart:785-799 | lib/screens/profile/widgets/user_profile_app_bar.dart:192-206 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) lib/services/commentum_service.dart:544 — lib/services/commentum_service.dart:544-558 | lib/services/commentum_service.dart:895-909 — both copies are in the same file, so extract the 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 (15 lines × 2) lib/utils/compatibility/matchmaker.dart:162 — lib/utils/compatibility/matchmaker.dart:162-176 | lib/utils/compatibility/matchmaker.dart:348-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) lib/widgets/anymex_widgets/anymex_tile_builder.dart:128 — lib/widgets/anymex_widgets/anymex_tile_builder.dart:128-142 | lib/widgets/anymex_widgets/anymex_tile_builder.dart:183-197 — both copies are in the same file, so extract the 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 (15 lines × 2) lib/widgets/anymex_widgets/anymex_tile_builder.dart:147 — lib/widgets/anymex_widgets/anymex_tile_builder.dart:147-161 | lib/widgets/anymex_widgets/anymex_tile_builder.dart:201-215 — both copies are in the same file, so extract the 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 (15 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:126 — lib/widgets/common/navbar/styles/classic_navbar.dart:126-140 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:99-113 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×17
  • Sync-over-async blocking lib/controllers/services/backup_restore/backup_restore_service.dart:1230 — `pickBackupFile` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/controllers/services/storage/storage_manager_service.dart:50 — `getTorrentCacheSize` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/controllers/services/storage/storage_manager_service.dart:99 — `clearTorrentCacheOnly` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/controllers/services/storage/storage_manager_service.dart:125 — `clearOtherTempOnly` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/controllers/services/storage/storage_manager_service.dart:213 — `_clearDirectoryContents` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/screens/manga/controller/reader_controller.dart:260 — `_fetchChapterPages` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/screens/manga/controller/reader_controller.dart:1850 — `fetchImages` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/rhttp/cargokit/build_tool/lib/src/artifacts_provider.dart:99 — `_getPrecompiledArtifacts` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/rhttp/cargokit/build_tool/lib/src/artifacts_provider.dart:184 — `_tryDownloadArtifacts` is async and calls writeAsBytesSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/rhttp/cargokit/build_tool/lib/src/build_cmake.dart:19 — `build` is async and calls copySync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/rhttp/cargokit/build_tool/lib/src/build_gradle.dart:22 — `build` is async and calls createSync, copySync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/rhttp/cargokit/build_tool/lib/src/build_pod.dart:20 — `build` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking packages/rhttp/cargokit/build_tool/lib/src/precompile_binaries.dart:52 — `run` is async and calls createSync, readAsBytesSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/utils/external_font_loader.dart:255 — `getCustomFontNames` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/utils/external_font_loader.dart:291 — `loadAllCustomFonts` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/utils/external_font_loader.dart:325 — `deleteCustomFont` is async and calls listSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
  • Sync-over-async blocking lib/utils/media_downloader.dart:96 — `download` is async and calls createSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×16
  • Duplicated block (17 lines × 2) lib/models/reader/tap_zones.dart:115 — lib/models/reader/tap_zones.dart:115-131 | lib/models/reader/tap_zones.dart:134-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) lib/models/reader/tap_zones.dart:153 — lib/models/reader/tap_zones.dart:153-169 | lib/models/reader/tap_zones.dart:172-188 — both copies are in the same file, so extract the 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/screens/anime/widgets/episode/styles/compact_style.dart:64 — lib/screens/anime/widgets/episode/styles/compact_style.dart:64-80 | lib/screens/anime/widgets/episode/styles/detailed_style.dart:64-80 — before extracting anything, compare `lib/screens/anime/widgets/episode/styles/compact_style.dart` and `lib/screens/anime/widgets/episode/styles/detailed_style.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) lib/screens/anime/widgets/episode_section.dart:164 — lib/screens/anime/widgets/episode_section.dart:164-180 | lib/screens/manga/widgets/chapter_section.dart:117-133 — 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 (17 lines × 2) lib/screens/downloads/download_screen.dart:1056 — lib/screens/downloads/download_screen.dart:1056-1072 | lib/screens/downloads/download_screen.dart:1331-1347 — both copies are in the same file, so extract the 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/screens/downloads/widgets/downloaded_media_view.dart:460 — lib/screens/downloads/widgets/downloaded_media_view.dart:460-476 | lib/screens/downloads/widgets/downloaded_media_view.dart:1057-1073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) lib/screens/library/online/anime_list.dart:204 — lib/screens/library/online/anime_list.dart:204-220 | lib/screens/library/online/manga_list.dart:182-198 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) lib/screens/library/online/anime_list.dart:542 — lib/screens/library/online/anime_list.dart:542-558 | lib/screens/library/online/manga_list.dart:526-542 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) lib/screens/local_source/local_source_view.dart:98 — lib/screens/local_source/local_source_view.dart:98-114 | lib/screens/settings/misc/sauce_finder_view.dart:129-145 — 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 (17 lines × 2) lib/screens/local_source/local_source_view.dart:853 — lib/screens/local_source/local_source_view.dart:853-869 | lib/screens/local_source/local_source_view.dart:906-922 — both copies are in the same file, so extract the 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/screens/manga/widgets/manga_stats.dart:288 — lib/screens/manga/widgets/manga_stats.dart:288-304 | lib/screens/manga/widgets/manga_stats.dart:337-353 — both copies are in the same file, so extract the 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/screens/settings/misc/sauce_finder_view.dart:329 — lib/screens/settings/misc/sauce_finder_view.dart:329-345 | lib/screens/settings/misc/sauce_finder_view.dart:680-696 — both copies are in the same file, so extract the 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/screens/settings/sub_settings/settings_player.dart:1047 — lib/screens/settings/sub_settings/settings_player.dart:1047-1063 | lib/screens/settings/sub_settings/settings_player.dart:1065-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) lib/utils/color_profiler.dart:814 — lib/utils/color_profiler.dart:814-830 | lib/utils/color_profiler.dart:1326-1342 — both copies are in the same file, so extract the 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/widgets/common/carousel/themes/big_carousel_classic.dart:76 — lib/widgets/common/carousel/themes/big_carousel_classic.dart:76-92 | lib/widgets/common/carousel/themes/big_carousel_portrait.dart:110-126 — before extracting anything, compare `lib/widgets/common/carousel/themes/big_carousel_classic.dart` and `lib/widgets/common/carousel/themes/big_carousel_portrait.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (17 lines × 2) lib/widgets/dialogs/logo_animation_preview_dialog.dart:208 — lib/widgets/dialogs/logo_animation_preview_dialog.dart:208-224 | lib/widgets/dialogs/logo_animation_preview_dialog.dart:465-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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×16
  • Duplicated block (6 lines × 2) lib/controllers/offline/offline_storage_controller.dart:346 — lib/controllers/offline/offline_storage_controller.dart:346-351 | lib/controllers/offline/offline_storage_controller.dart:385-391 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/controllers/offline/offline_storage_controller.dart:613 — lib/controllers/offline/offline_storage_controller.dart:613-618 | lib/controllers/offline/offline_storage_controller.dart:742-747 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/controllers/services/anilist/anilist_data.dart:249 — lib/controllers/services/anilist/anilist_data.dart:249-254 | lib/controllers/services/anilist/anilist_data.dart:263-268 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:87 — lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:87-92 | lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:113-118 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/controllers/sync/progress_sync_section.dart:811 — lib/controllers/sync/progress_sync_section.dart:811-816 | lib/screens/anime/watch/controls/widgets/speed_popup.dart:410-415 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:211 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:211-217 | lib/widgets/watchium/watchium_overlay.dart:117-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/screens/home_page.dart:186 — lib/screens/home_page.dart:186-191 | lib/screens/manga/home_page.dart:51-56 — before extracting anything, compare `lib/screens/home_page.dart` and `lib/screens/manga/home_page.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) lib/screens/manga/widgets/reader/top_controls.dart:99 — lib/screens/manga/widgets/reader/top_controls.dart:99-104 | lib/screens/manga/widgets/reader/top_controls.dart:281-286 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:627 — lib/screens/profile/compatibility/compatibility_result_page.dart:627-632 | lib/screens/profile/compatibility/compatibility_result_page.dart:636-641 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/screens/profile/widgets/profile_stats_tab.dart:286 — lib/screens/profile/widgets/profile_stats_tab.dart:286-291 | lib/screens/profile/widgets/profile_stats_tab.dart:305-310 — both copies are in the same file, so extract the 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 (6 lines × 2) lib/screens/watchium/watchium_page.dart:851 — lib/screens/watchium/watchium_page.dart:851-857 | lib/services/cast/widgets/cast_device_dialog.dart:96-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:310 — lib/widgets/common/navbar/styles/classic_navbar.dart:310-317 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:365-370 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) lib/controllers/services/widgets/widgets_builders.dart:366 — lib/controllers/services/widgets/widgets_builders.dart:366-371 | lib/screens/community/community_recommendations_page.dart:855-860 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:923 — lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:923-928 | lib/screens/anime/watch/controls/widgets/decoder_quick_button.dart:42-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/screens/anime/watch/controls/themes/setup/media_indicator_theme_registry.dart:15 — lib/screens/anime/watch/controls/themes/setup/media_indicator_theme_registry.dart:15-20 | lib/screens/manga/widgets/reader/themes/setup/reader_control_theme_registry.dart:13-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/utils/lanczos_image.dart:91 — lib/utils/lanczos_image.dart:91-96 | lib/utils/lanczos_image.dart:208-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×16
  • Duplicated block (5 lines × 2) lib/controllers/services/backup_restore/backup_restore_service.dart:1717 — lib/controllers/services/backup_restore/backup_restore_service.dart:1717-1721 | lib/controllers/services/backup_restore/backup_restore_service.dart:1787-1791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/models/Anilist/anilist_media_user.dart:293 — lib/models/Anilist/anilist_media_user.dart:293-297 | lib/models/Anilist/anilist_media_user.dart:334-338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/models/Anilist/anilist_profile.dart:344 — lib/models/Anilist/anilist_profile.dart:344-348 | lib/models/Anilist/anilist_profile.dart:416-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/screens/anime/details/media_details_page.dart:531 — lib/screens/anime/details/media_details_page.dart:531-535 | lib/screens/anime/details/media_details_page.dart:555-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.
  • Duplicated block (5 lines × 2) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1733 — lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1733-1737 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1790-1794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/screens/anime/watch/controls/widgets/decoder_quick_button.dart:111 — lib/screens/anime/watch/controls/widgets/decoder_quick_button.dart:111-115 | lib/screens/anime/watch/controls/widgets/decoder_quick_button.dart:118-124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:683 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:683-687 | lib/widgets/watchium/watchium_create_dialog.dart:602-606 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:3496 — lib/screens/anime/widgets/comments/comments_section.dart:3496-3501 | lib/screens/anime/widgets/comments/comments_section.dart:3686-3690 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/screens/downloads/controller/download_controller.dart:1749 — lib/screens/downloads/controller/download_controller.dart:1749-1753 | lib/screens/downloads/controller/download_controller.dart:1842-1846 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/screens/downloads/download_screen.dart:578 — lib/screens/downloads/download_screen.dart:578-582 | lib/widgets/anime/visuals/visuals_popup.dart:446-452 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) lib/screens/extensions/widgets/plugin_manager.dart:147 — lib/screens/extensions/widgets/plugin_manager.dart:147-152 | lib/screens/extensions/widgets/plugin_manager.dart:189-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/widgets/non_widgets/recommend_sheet.dart:283 — lib/widgets/non_widgets/recommend_sheet.dart:283-287 | lib/widgets/non_widgets/recommend_sheet.dart:297-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/database/comments/model/leaderboard_entry.dart:143 — lib/database/comments/model/leaderboard_entry.dart:143-147 | lib/database/comments/model/user_points.dart:68-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) lib/controllers/services/mal/mal_api.dart:71 — lib/controllers/services/mal/mal_api.dart:71-75 | lib/controllers/services/mal/mal_service.dart:295-299 — before extracting anything, compare `lib/controllers/services/mal/mal_api.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) lib/utils/compatibility/matchmaker.dart:815 — lib/utils/compatibility/matchmaker.dart:815-819 | lib/utils/compatibility/matchmaker.dart:856-860 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/utils/media_downloader.dart:295 — lib/utils/media_downloader.dart:295-299 | lib/utils/media_downloader.dart:304-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×14
  • Duplicated block (22 lines × 2) lib/controllers/services/backup_restore/backup_restore_service.dart:1074 — lib/controllers/services/backup_restore/backup_restore_service.dart:1074-1095 | lib/controllers/services/backup_restore/backup_restore_service.dart:1100-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/controllers/services/community_service.dart:227 — lib/controllers/services/community_service.dart:227-248 | lib/controllers/services/community_service.dart:311-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/models/notification/notification_item.dart:109 — lib/models/notification/notification_item.dart:109-130 | lib/screens/anime/misc/list_exporter.dart:217-238 — before extracting anything, compare `lib/models/notification/notification_item.dart` and `lib/screens/anime/misc/list_exporter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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 (22 lines × 2) lib/screens/anime/watch/controls/top_controls.dart:113 — lib/screens/anime/watch/controls/top_controls.dart:113-134 | lib/screens/anime/watch/controls/top_controls.dart:271-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/screens/anime/watch/controls/widgets/progress_slider.dart:364 — lib/screens/anime/watch/controls/widgets/progress_slider.dart:364-385 | lib/screens/anime/watch/controls/widgets/progress_slider.dart:484-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/screens/anime/watch/watch_view.dart:201 — lib/screens/anime/watch/watch_view.dart:201-222 | lib/screens/local_source/player/offline_player.dart:171-192 — before extracting anything, compare `lib/screens/anime/watch/watch_view.dart` and `lib/screens/local_source/player/offline_player.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 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 (22 lines × 2) lib/screens/anime/widgets/character_staff_sheet.dart:1280 — lib/screens/anime/widgets/character_staff_sheet.dart:1280-1301 | lib/screens/anime/widgets/character_staff_sheet.dart:1307-1328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:1116 — lib/screens/anime/widgets/episode_list_builder.dart:1116-1137 | lib/screens/manga/widgets/chapter_list_builder.dart:1246-1267 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 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 (22 lines × 2) lib/screens/library/editor/history_editor.dart:238 — lib/screens/library/editor/history_editor.dart:238-259 | lib/screens/library/editor/list_editor.dart:142-163 — 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 (22 lines × 2) lib/screens/local_source/local_source_view.dart:405 — lib/screens/local_source/local_source_view.dart:405-426 | lib/screens/local_source/local_source_view.dart:429-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/screens/manga/widgets/reader/reader_color_overlay.dart:43 — lib/screens/manga/widgets/reader/reader_color_overlay.dart:43-64 | lib/screens/manga/widgets/reader/reader_view.dart:244-265 — 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 (22 lines × 2) lib/screens/profile/widgets/profile_header.dart:658 — lib/screens/profile/widgets/profile_header.dart:658-679 | lib/screens/profile/widgets/user_profile_app_bar.dart:78-99 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (22 lines × 2) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1317 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1317-1338 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1380-1401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) lib/widgets/common/cards/styles/exotic_card.dart:52 — lib/widgets/common/cards/styles/exotic_card.dart:52-73 | lib/widgets/common/cards/styles/minimal_exotic_card.dart:52-73 — before extracting anything, compare `lib/widgets/common/cards/styles/exotic_card.dart` and `lib/widgets/common/cards/styles/minimal_exotic_card.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×14
  • Duplicated block (20 lines × 2) lib/controllers/services/anilist/anilist_data.dart:1138 — lib/controllers/services/anilist/anilist_data.dart:1138-1157 | lib/controllers/services/anilist/anilist_data.dart:1182-1201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/controllers/services/widgets/widgets_builders.dart:375 — lib/controllers/services/widgets/widgets_builders.dart:375-394 | lib/screens/community/community_recommendations_page.dart:864-883 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) lib/screens/anime/widgets/anime_stats.dart:645 — lib/screens/anime/widgets/anime_stats.dart:645-664 | lib/screens/manga/widgets/manga_stats.dart:348-367 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2084 — lib/screens/anime/widgets/comments/comments_section.dart:2084-2103 | lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:462-481 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2319 — lib/screens/anime/widgets/comments/comments_section.dart:2319-2338 | lib/screens/anime/widgets/comments/comments_section.dart:2858-2877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2781 — lib/screens/anime/widgets/comments/comments_section.dart:2781-2800 | lib/screens/anime/widgets/comments/comments_section.dart:2998-3017 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/screens/anime/widgets/voice_actor.dart:61 — lib/screens/anime/widgets/voice_actor.dart:61-80 | lib/screens/anime/widgets/voice_actor.dart:327-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/screens/library/widgets/unified_history_card.dart:86 — lib/screens/library/widgets/unified_history_card.dart:86-105 | lib/screens/library/widgets/unified_history_card.dart:357-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/screens/profile/widgets/decoration_closet_sheet.dart:675 — lib/screens/profile/widgets/decoration_closet_sheet.dart:675-694 | lib/screens/profile/widgets/decoration_closet_sheet.dart:1139-1158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/screens/search/widgets/search_widgets.dart:1569 — lib/screens/search/widgets/search_widgets.dart:1569-1588 | lib/screens/search/widgets/search_widgets.dart:1643-1662 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/screens/settings/sub_settings/widgets/account_tile.dart:72 — lib/screens/settings/sub_settings/widgets/account_tile.dart:72-91 | lib/screens/settings/sub_settings/widgets/account_tile.dart:131-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/services/commentum_service.dart:2019 — lib/services/commentum_service.dart:2019-2038 | lib/services/commentum_service.dart:2100-2119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/widgets/anymex_widgets/anymex_tile.dart:261 — lib/widgets/anymex_widgets/anymex_tile.dart:261-280 | lib/widgets/anymex_widgets/anymex_tile.dart:329-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lib/widgets/common/carousel/themes/big_carousel_classic.dart:95 — lib/widgets/common/carousel/themes/big_carousel_classic.dart:95-114 | lib/widgets/common/carousel/themes/big_carousel_portrait.dart:129-148 — before extracting anything, compare `lib/widgets/common/carousel/themes/big_carousel_classic.dart` and `lib/widgets/common/carousel/themes/big_carousel_portrait.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D15 · Churn × Complexity Hotspots · Repeated repair · ×13
  • Repeated repair: lib/screens/manga/details_page.dart lib/screens/manga/details_page.dart:22 — lib/screens/manga/details_page.dart changed 13 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is MangaDetailsPage.build at line 22), 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: fixed novels tweaking”; “fix: safe guarding media type”; “fix: fixed wrong placements of button on manga page”; “fix: fixed simkl sorting”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/manga/details_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.
  • Repeated repair: lib/screens/anime/details_page.dart lib/screens/anime/details_page.dart:22 — lib/screens/anime/details_page.dart changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is AnimeDetailsPage.build at line 22), 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: fixed progress tracking of novels”; “fix: fixed search results / details of sources not loading images”; “fix: fixed anify toggle not working”; “chore: dart fix applied on project to remove warnings”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/details_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.
  • Repeated repair: lib/screens/manga/widgets/reader/reader_view.dart lib/screens/manga/widgets/reader/reader_view.dart:168 — lib/screens/manga/widgets/reader/reader_view.dart changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is _ReaderViewState._buildContentView at line 168), 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: fixed the issue of pages not loading on reader, fixed tracker not changing to CURRENT on chapter read”; “fix: centralized chapter calc logic to fix navigate by number for overscroll”; “fix: fixed double tap to zoom and made zoom and pan smooth”; “fix: fit to screen and image width multiplier not working fixed”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/manga/widgets/reader/reader_view.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/database/database.dart lib/database/database.dart:42 — lib/database/database.dart changed 7 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 13 (its worst body is Database.init at line 42), 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(macos): keep the database out of iCloud-synced Documents (#554)”; “chore: dart fix applied on project to remove warnings”; “fix: session cache for discord assets to avoid repeated calls”; “fix: fixed database reset on app crash”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/database/database.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/controllers/discord/discord_rpc.dart lib/controllers/discord/discord_rpc.dart:498 — lib/controllers/discord/discord_rpc.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 13 (its worst body is DiscordRPCController.updateAnimePresence at line 498), 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: fixed rpc for desktop users”; “fix: fixed player crashes”; “chore: dart fix applied on project to remove warnings”; “fix: session cache for discord assets to avoid repeated calls”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/controllers/discord/discord_rpc.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/utils/oauth_helper.dart lib/utils/oauth_helper.dart:78 — lib/utils/oauth_helper.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 11 (its worst body is _OauthWebViewPageState.build at line 78), 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: fixed webview freeze”; “fix: webview header bumping into titlebar”; “fix: fixed bad header in extension tab”; “fix: black screen on login webview”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/utils/oauth_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.
  • Repeated repair: lib/utils/media_downloader.dart lib/utils/media_downloader.dart:471 — lib/utils/media_downloader.dart changed 4 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 14 (its worst body is MediaDownloader.pickBestMatchingVideo at line 471), 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: fixed green screen on some downloads and fixed cancel not actually cancelling”; “fix: fixed .ts segments showing up in gallery”; “fix: fixed subtitles not downloading”; “fix: fixed downloader it was failing in most sources”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/utils/media_downloader.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/screens/anime/watch/controls/widgets/speed_popup.dart lib/screens/anime/watch/controls/widgets/speed_popup.dart:346 — lib/screens/anime/watch/controls/widgets/speed_popup.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 7 (its worst body is _SpeedChip.build at line 346), 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: fixed speed not persisting in a session and speed configs not persisting app restarts”; “fix: fixed subtitle margin to be accurate”; “fix: fixed blank icons”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/watch/controls/widgets/speed_popup.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/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.dart lib/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.dart:227 — lib/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.dart changed 4 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 5 (its worst body is _NFUnlockButtonState.build at line 227), 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: fixed tracking issues and new episode release stale states”; “fix: fixed cast not being visible for existing users”; “fix: fixed blank icons”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/watch/controls/themes/player_control_themes/netflix_shared.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/utils/download_isolate_pool.dart lib/utils/download_isolate_pool.dart:86 — lib/utils/download_isolate_pool.dart changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is DownloadIsolatePool.submitFileDownload at line 86), 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: fixed downloader causing issues on background”; “fix: fixed green screen on some downloads and fixed cancel not actually cancelling”; “fix: fixed downloader it was failing in most sources”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/utils/download_isolate_pool.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/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:91 — lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart changed 4 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 5 (its worst body is NetflixDesktopPlayerControlTheme.buildBottomControls at line 91), 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: fixed cast not being visible for existing users”; “chore: dart fix applied on project to remove warnings”; “fix: fixed blank icons”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.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/database/isar_models/chapter.dart lib/database/isar_models/chapter.dart:23 — lib/database/isar_models/chapter.dart changed 4 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 Chapter.headers at line 23), 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: fixed unformatted chapter number showing up on chapter tiles and ranges”; “fix(reader): fixed wrong page numbers, noised chapter nums”; “fix: fixed chapter mismatching when starting from recent”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/database/isar_models/chapter.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/screens/downloads/widgets/downloaded_watch_page.dart lib/screens/downloads/widgets/downloaded_watch_page.dart:48 — lib/screens/downloads/widgets/downloaded_watch_page.dart changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is _DownloadedWatchPageState.initState at line 48), 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: fixed speed and audio pane not showing for downloaded media”; “fix: fixed search results / details of sources not loading images”; “fix: fixed navigation for downloaded episodes”. 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-07-17..2026-10-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-17 12:55:45 +05:30' --until='2026-10-15 12:55:45 +05:30' --full-history --no-merges -- lib/screens/downloads/widgets/downloaded_watch_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.
D35 · Change Coupling · Change coupling · ×13
  • Change coupling: reader_view.dart ↔ settings_view.dart lib/screens/manga/widgets/reader/reader_view.dart:1 — `lib/screens/manga/widgets/reader/reader_view.dart` and `lib/screens/manga/widgets/reader/settings_view.dart` change together 73% of the time (11 of the 15 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `0de1481e` feat: tachiyomi like overscroll; `d7c2b841` feat: fit to screen for tablets in manga reader, improved the ui a li…; `1630d6b3` Feat: Tap Zones + Better Crop Borders For Manga Reader (#278) — run `git show` on any of them.
  • Change coupling: player_controller.dart ↔ better_player.dart lib/screens/anime/watch/controller/player_controller.dart:1 — `lib/screens/anime/watch/controller/player_controller.dart` and `lib/screens/anime/watch/player/better_player.dart` change together 73% of the time (8 of the 11 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 8 shared commits counted here, the most recent 3 are `1f30b647` feat: settings backup and restore, lots of fixes related to downloads…; `a734d196` fix: fixed broken subs, fixed a minor delay between subs; `adbdf085` fix: fixed some streams not playing, hid buttons that has 0 or 1 entr… — run `git show` on any of them.
  • Change coupling: widgets_builders.dart ↔ main.dart lib/controllers/services/widgets/widgets_builders.dart:1 — `lib/controllers/services/widgets/widgets_builders.dart` and `lib/main.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 `9ed1c1bc` perf: improved page switch performance; `5ea07fca` feat: community recommendations for movies/shows, voting, live filter…; `81a01127` feat: add underrated anime/manga section powered by GitHub JSON (#360) — run `git show` on any of them.
  • Change coupling: episode_list_builder.dart ↔ episode_watch_screen.dart lib/screens/anime/widgets/episode_list_builder.dart:1 — `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/anime/widgets/episode_watch_screen.dart` change together 69% of the time (9 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `d2c4fd5c` feat: Full download support on metadata services, lots of fixes; `b3a76f2b` fix: fixed sub/dub not persisting across all episodes; `67971f62` fix: fixed mal issue where manga and anime were mismatching — run `git show` on any of them.
  • Change coupling: bottom_controls.dart ↔ ios26_player_control_theme.dart lib/screens/anime/watch/controls/bottom_controls.dart:1 — `lib/screens/anime/watch/controls/bottom_controls.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` change together 60% of the time (9 of the 15 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 9 shared commits counted here, the most recent 3 are `9605b5f1` fix: fixed tracking issues and new episode release stale states; `fc8fec32` fix: fixed blank icons; `622e13dd` feat: dynamic orientation button in player — run `git show` on any of them.
  • Change coupling: anime_list.dart ↔ manga_list.dart lib/screens/library/online/anime_list.dart:1 — `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` change together 60% of the time (9 of the 15 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `a277be02` fix: overflow fix on anime and manga list; `d8294db8` fix:: fixed ui not reflecting instant changes and header ui overflow; `47d42453` fix: fixed dupe entries in tracking lists — run `git show` on any of them.
  • Change coupling: ios26_player_control_theme.dart ↔ json_player_control_theme.dart lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:1 — `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart` change together 58% of the time (7 of the 12 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 `9605b5f1` fix: fixed tracking issues and new episode release stale states; `fc8fec32` fix: fixed blank icons; `622e13dd` feat: dynamic orientation button in player — run `git show` on any of them.
  • Change coupling: REDACTED ↔ REDACTED lib/screens/anime/home_page.dart:1 — `lib/screens/anime/home_page.dart` and `lib/screens/home_page.dart` change together 57% of the time (8 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 8 shared commits counted here, the most recent 3 are `7809faa7` fix: fixed appbar disappear even on media tab change; `36754206` feat: enhanced new episode released cards, fixed bugs when deleting h…; `465d66cc` feat: new tabs system (home, discover, library, history, stats) — run `git show` on any of them.
  • Change coupling: better_player.dart ↔ media_kit_player.dart lib/screens/anime/watch/player/better_player.dart:1 — `lib/screens/anime/watch/player/better_player.dart` and `lib/screens/anime/watch/player/media_kit_player.dart` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `1f30b647` feat: settings backup and restore, lots of fixes related to downloads…; `1f9a2509` feat: subtitle delay support for libmpv; `a734d196` fix: fixed broken subs, fixed a minor delay between subs — run `git show` on any of them.
  • Change coupling: details_page.dart ↔ details_page.dart lib/screens/anime/details_page.dart:1 — `lib/screens/anime/details_page.dart` and `lib/screens/manga/details_page.dart` change together 50% of the time (28 of the 56 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 28 shared commits counted here, the most recent 3 are `fc80ccfb` fix: minor fixes; `2f8f2531` perf: improved performance of the tab pages and detail pages; `e0d91a46` feat: tracker support for downloaded media & ext (#484) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ REDACTED lib/screens/anime/home_page.dart:1 — `lib/screens/anime/home_page.dart` and `lib/screens/manga/home_page.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 `24ecc977` fix: fixed lag on keyboard popup; `e659c49a` feat: revamp extension service; `02e6e879` feat: UI Changes (#117) — run `git show` on any of them.
  • Change coupling: ExtensionScreen.dart ↔ plugin_manager.dart lib/screens/extensions/ExtensionScreen.dart:1 — `lib/screens/extensions/ExtensionScreen.dart` and `lib/screens/extensions/widgets/plugin_manager.dart` change together 50% of the time (6 of the 12 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 `67971f62` fix: fixed mal issue where manga and anime were mismatching; `ca74a48b` refactor: adapted to some changes i made on plugin end; `3808ae28` feat: add Extension Manager settings page for plugin (#440) — run `git show` on any of them.
  • Change coupling: themes.dart ↔ main.dart lib/constants/themes.dart:1 — `lib/constants/themes.dart` and `lib/main.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 `55d68e6f` fix: fixed grey screens on watch page; `6cadc081` refactor: migrated to applinks from unilinks; `82ca0f6d` Revert "Add new app bar/header implementation; other fixes (#106)" (#… — run `git show` on any of them.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×13
  • Swallowed exception (caught, then discarded) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:379 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/main.dart:483 — `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/controllers/custom_logo/custom_logo_service.dart:40 — `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/controllers/network/cookie_manager.dart:42 — `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/controllers/network/cookie_manager.dart:550 — `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/controllers/services/community_service.dart:1221 — `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/controllers/services/backup_restore/backup_restore_service.dart:442 — `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/controllers/services/backup_restore/backup_restore_service.dart:894 — `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/controllers/services/backup_restore/backup_restore_service.dart:1622 — `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/controllers/services/backup_restore/backup_format_detector.dart:43 — `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/controllers/services/backup_restore/backup_format_detector.dart:56 — `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/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:254 — `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/controllers/track/track_binding_controller.dart:164 — `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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×12
  • Duplicated block (19 lines × 2) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:72 — lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:72-90 | lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:207-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/screens/anime/widgets/anime_stats.dart:592 — lib/screens/anime/widgets/anime_stats.dart:592-610 | lib/screens/profile/widgets/profile_stats_tab.dart:414-432 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/profile/widgets/profile_stats_tab.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 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 (19 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2295 — lib/screens/anime/widgets/comments/comments_section.dart:2295-2313 | lib/screens/anime/widgets/comments/comments_section.dart:2830-2848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/screens/library/widgets/anime_card.dart:31 — lib/screens/library/widgets/anime_card.dart:31-49 | lib/screens/library/widgets/common_widgets.dart:33-51 — before extracting anything, compare `lib/screens/library/widgets/anime_card.dart` and `lib/screens/library/widgets/common_widgets.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) lib/screens/local_source/local_source_view.dart:606 — lib/screens/local_source/local_source_view.dart:606-624 | lib/screens/local_source/local_source_view.dart:674-692 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1452 — lib/screens/profile/compatibility/compatibility_result_page.dart:1452-1470 | lib/screens/profile/compatibility/compatibility_result_page.dart:1656-1674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/screens/profile/profile_page.dart:56 — lib/screens/profile/profile_page.dart:56-74 | lib/screens/profile/user_profile_page.dart:72-90 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) lib/screens/profile/widgets/profile_header.dart:387 — lib/screens/profile/widgets/profile_header.dart:387-405 | lib/screens/profile/widgets/profile_header.dart:1063-1081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/screens/profile/widgets/profile_header.dart:1053 — lib/screens/profile/widgets/profile_header.dart:1053-1071 | lib/screens/profile/widgets/user_profile_app_bar.dart:568-586 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) lib/screens/settings/misc/sauce_finder_view.dart:360 — lib/screens/settings/misc/sauce_finder_view.dart:360-378 | lib/screens/settings/misc/sauce_finder_view.dart:712-730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:480 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:480-498 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:504-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lib/widgets/header/legacy_header.dart:129 — lib/widgets/header/legacy_header.dart:129-147 | lib/widgets/header/legacy_header.dart:170-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×11
  • Duplicated block (21 lines × 2) lib/screens/anime/watch/controls/bottom_controls.dart:28 — lib/screens/anime/watch/controls/bottom_controls.dart:28-48 | lib/screens/anime/watch/controls/bottom_controls.dart:106-126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/screens/anime/widgets/anime_stats.dart:356 — lib/screens/anime/widgets/anime_stats.dart:356-376 | lib/screens/manga/widgets/manga_stats.dart:407-427 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1628 — lib/screens/anime/widgets/comments/comments_section.dart:1628-1648 | lib/screens/anime/widgets/comments/comments_section.dart:1977-1997 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2589 — lib/screens/anime/widgets/comments/comments_section.dart:2589-2609 | lib/screens/anime/widgets/comments/comments_section.dart:2674-2694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:1100 — lib/screens/anime/widgets/episode_list_builder.dart:1100-1120 | lib/screens/anime/widgets/episode_list_builder.dart:1138-1158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:1158 — lib/screens/anime/widgets/episode_list_builder.dart:1158-1178 | lib/screens/manga/widgets/chapter_list_builder.dart:1280-1300 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) lib/screens/library/editor/history_editor.dart:339 — lib/screens/library/editor/history_editor.dart:339-359 | lib/screens/library/editor/history_editor.dart:439-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/screens/library/online/anime_list.dart:237 — lib/screens/library/online/anime_list.dart:237-257 | lib/screens/library/online/manga_list.dart:215-235 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) lib/screens/search/search_view.dart:433 — lib/screens/search/search_view.dart:433-453 | lib/screens/search/search_view.dart:463-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart:445 — lib/screens/settings/sub_settings/settings_comments.dart:445-465 | lib/screens/settings/sub_settings/settings_comments.dart:475-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21 lines × 2) lib/utils/color_profiler.dart:709 — lib/utils/color_profiler.dart:709-729 | lib/utils/color_profiler.dart:967-987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×11
  • Duplicated block (18 lines × 2) lib/screens/anime/watch/controls/bottom_controls.dart:494 — lib/screens/anime/watch/controls/bottom_controls.dart:494-511 | lib/screens/anime/watch/controls/bottom_controls.dart:594-611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2521 — lib/screens/anime/widgets/comments/comments_section.dart:2521-2538 | lib/screens/anime/widgets/comments/comments_section.dart:2736-2753 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2623 — lib/screens/anime/widgets/comments/comments_section.dart:2623-2640 | lib/screens/anime/widgets/comments/comments_section.dart:2759-2776 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/manga/home_page.dart:53 — lib/screens/manga/home_page.dart:53-70 | lib/screens/novel/home_page.dart:43-60 — `lib/screens/manga/home_page.dart` and `lib/screens/novel/home_page.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 57 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (18 lines × 2) lib/screens/novel/reader/controller/reader_controller.dart:1084 — lib/screens/novel/reader/controller/reader_controller.dart:1084-1101 | lib/screens/novel/reader/controller/reader_controller.dart:1107-1124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/profile/profile_page.dart:586 — lib/screens/profile/profile_page.dart:586-603 | lib/screens/profile/user_profile_page.dart:555-572 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) lib/screens/profile/widgets/profile_header.dart:350 — lib/screens/profile/widgets/profile_header.dart:350-367 | lib/screens/profile/widgets/profile_header.dart:1033-1050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/settings/sub_settings/settings_backup.dart:322 — lib/screens/settings/sub_settings/settings_backup.dart:322-339 | lib/screens/settings/sub_settings/settings_backup.dart:451-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/settings/sub_settings/settings_moderation.dart:822 — lib/screens/settings/sub_settings/settings_moderation.dart:822-839 | lib/screens/settings/sub_settings/settings_moderation.dart:1464-1481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/screens/stats/user_stats_page.dart:393 — lib/screens/stats/user_stats_page.dart:393-410 | lib/screens/stats/user_stats_page.dart:1146-1163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lib/widgets/anymex_widgets/anymex_animated_logo.dart:572 — lib/widgets/anymex_widgets/anymex_animated_logo.dart:572-589 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:647-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×11
  • Duplicated block (13–14 lines × 2) lib/screens/anime/watch/controls/widgets/shader_osd.dart:31 — lib/screens/anime/watch/controls/widgets/shader_osd.dart:31-44 | lib/screens/community/community_recommendations_page.dart:780-792 — 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 (13–14 lines × 2) lib/screens/anime/widgets/voice_actor.dart:121 — lib/screens/anime/widgets/voice_actor.dart:121-134 | lib/screens/anime/widgets/voice_actor.dart:381-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lib/screens/downloads/controller/download_controller.dart:1081 — lib/screens/downloads/controller/download_controller.dart:1081-1094 | lib/screens/downloads/controller/download_controller.dart:1379-1391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lib/screens/downloads/controller/download_controller.dart:1290 — lib/screens/downloads/controller/download_controller.dart:1290-1303 | lib/screens/downloads/controller/download_controller.dart:1353-1365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lib/screens/novel/reader/widgets/bottom_controls.dart:420 — lib/screens/novel/reader/widgets/bottom_controls.dart:420-433 | lib/screens/novel/reader/widgets/bottom_controls.dart:449-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1436 — lib/screens/profile/compatibility/compatibility_result_page.dart:1436-1449 | lib/screens/profile/compatibility/compatibility_result_page.dart:1638-1650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lib/screens/profile/widgets/profile_header.dart:121 — lib/screens/profile/widgets/profile_header.dart:121-133 | lib/screens/profile/widgets/profile_header.dart:850-863 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lib/screens/profile/widgets/user_profile_app_bar.dart:252 — lib/screens/profile/widgets/user_profile_app_bar.dart:252-265 | lib/screens/profile/widgets/user_profile_header.dart:101-113 — before extracting anything, compare `lib/screens/profile/widgets/user_profile_app_bar.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 2) lib/screens/profile/widgets/user_profile_app_bar.dart:547 — lib/screens/profile/widgets/user_profile_app_bar.dart:547-560 | lib/screens/profile/widgets/user_profile_header.dart:334-346 — before extracting anything, compare `lib/screens/profile/widgets/user_profile_app_bar.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 2) lib/screens/profile/widgets/user_profile_app_bar.dart:584 — lib/screens/profile/widgets/user_profile_app_bar.dart:584-597 | lib/screens/profile/widgets/user_profile_header.dart:376-388 — before extracting anything, compare `lib/screens/profile/widgets/user_profile_app_bar.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 2) lib/screens/settings/sub_settings/settings_downloads.dart:23 — lib/screens/settings/sub_settings/settings_downloads.dart:23-35 | lib/screens/settings/sub_settings/settings_ui.dart:59-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×11
  • Duplicated block (13 lines × 3) lib/controllers/watchium/watchium_sync_controller.dart:324 — lib/controllers/watchium/watchium_sync_controller.dart:324-336 | lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:635-647 | lib/widgets/watchium/watchium_create_dialog.dart:557-569 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (13 lines × 3) lib/screens/anime/details/media_details_page.dart:761 — lib/screens/anime/details/media_details_page.dart:761-773 | lib/screens/downloads/widgets/downloaded_media_view.dart:462-474 | lib/screens/downloads/widgets/downloaded_media_view.dart:1059-1071 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (13 lines × 3) lib/screens/anime/misc/calendar.dart:392 — lib/screens/anime/misc/calendar.dart:392-404 | lib/screens/library/online/anime_list.dart:634-646 | lib/screens/library/online/manga_list.dart:618-630 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/screens/library/online/anime_list.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (13 lines × 3) lib/screens/anime/widgets/comments/comments_section.dart:2525 — lib/screens/anime/widgets/comments/comments_section.dart:2525-2537 | lib/screens/anime/widgets/comments/comments_section.dart:2608-2620 | lib/screens/anime/widgets/comments/comments_section.dart:2740-2752 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) lib/screens/anime/widgets/video_slider.dart:154 — lib/screens/anime/widgets/video_slider.dart:154-166 | lib/screens/anime/widgets/video_slider.dart:178-190 | lib/screens/anime/widgets/video_slider.dart:199-211 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) lib/screens/local_source/local_source_view.dart:407 — lib/screens/local_source/local_source_view.dart:407-419 | lib/screens/local_source/local_source_view.dart:431-443 | lib/screens/local_source/local_source_view.dart:796-808 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:195 — lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:195-207 | lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:247-259 | lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:300-312 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) lib/screens/profile/activity_details_page.dart:543 — lib/screens/profile/activity_details_page.dart:543-555 | lib/widgets/non_widgets/activity_card.dart:167-179 | lib/widgets/non_widgets/activity_card.dart:291-303 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/widgets/non_widgets/activity_card.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 190 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 (13 lines × 3) lib/screens/settings/sub_settings/settings_moderation.dart:547 — lib/screens/settings/sub_settings/settings_moderation.dart:547-559 | lib/widgets/non_widgets/recommend_sheet.dart:1097-1109 | lib/widgets/non_widgets/recommend_sheet.dart:1176-1188 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (13 lines × 3) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:58 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:58-70 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1326-1338 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1389-1401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) lib/widgets/common/navbar/styles/classic_navbar.dart:164 — lib/widgets/common/navbar/styles/classic_navbar.dart:164-176 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:144-156 | lib/widgets/header/header.dart:1009-1021 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×11
  • Duplicated block (12–13 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:1724 — lib/controllers/services/anilist/anilist_auth.dart:1724-1735 | lib/controllers/services/anilist/anilist_auth.dart:1766-1778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lib/controllers/services/community_service.dart:1024 — lib/controllers/services/community_service.dart:1024-1036 | lib/controllers/services/community_service.dart:1086-1097 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lib/controllers/services/community_service.dart:1055 — lib/controllers/services/community_service.dart:1055-1067 | lib/controllers/services/community_service.dart:1110-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lib/screens/anime/watch/controls/widgets/progress_slider.dart:88 — lib/screens/anime/watch/controls/widgets/progress_slider.dart:88-100 | lib/screens/anime/watch/controls/widgets/progress_slider.dart:105-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lib/screens/anime/widgets/character_staff_sheet.dart:261 — lib/screens/anime/widgets/character_staff_sheet.dart:261-272 | lib/screens/extensions/ExtensionItem.dart:184-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12–13 lines × 2) lib/screens/profile/profile_page.dart:1000 — lib/screens/profile/profile_page.dart:1000-1011 | lib/screens/profile/user_profile_page.dart:931-943 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12–13 lines × 2) lib/screens/profile/widgets/user_media_list_page.dart:304 — lib/screens/profile/widgets/user_media_list_page.dart:304-315 | lib/widgets/non_widgets/recommend_sheet.dart:168-180 — 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 (12–13 lines × 2) lib/screens/search/search_view.dart:351 — lib/screens/search/search_view.dart:351-363 | lib/screens/search/search_view.dart:379-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lib/widgets/anymex_widgets/anymex_button.dart:139 — lib/widgets/anymex_widgets/anymex_button.dart:139-150 | lib/widgets/anymex_widgets/anymex_container.dart:63-75 — 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–13 lines × 2) lib/widgets/common/cards/card_components.dart:132 — lib/widgets/common/cards/card_components.dart:132-143 | lib/widgets/common/cards/card_components.dart:264-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lib/widgets/helper/platform_builder.dart:184 — lib/widgets/helper/platform_builder.dart:184-195 | lib/widgets/helper/platform_builder.dart:198-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×11
  • Duplicated block (11 lines × 3) lib/models/Media/media.dart:231 — lib/models/Media/media.dart:231-241 | lib/models/Media/media.dart:406-416 | lib/models/Media/media.dart:1110-1120 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) lib/screens/anime/misc/calendar.dart:250 — lib/screens/anime/misc/calendar.dart:250-260 | lib/screens/library/online/anime_list.dart:543-553 | lib/screens/library/online/manga_list.dart:527-537 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/screens/library/online/anime_list.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (11 lines × 3) lib/screens/anime/misc/calendar.dart:380 — lib/screens/anime/misc/calendar.dart:380-390 | lib/screens/library/online/anime_list.dart:622-632 | lib/screens/library/online/manga_list.dart:606-616 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/screens/library/online/anime_list.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (11 lines × 3) lib/screens/anime/misc/list_exporter.dart:387 — lib/screens/anime/misc/list_exporter.dart:387-397 | lib/screens/anime/misc/list_exporter.dart:451-461 | lib/screens/extensions/widgets/plugin_manager.dart:603-613 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (11 lines × 3) lib/screens/downloads/download_screen.dart:1060 — lib/screens/downloads/download_screen.dart:1060-1070 | lib/screens/downloads/download_screen.dart:1335-1345 | lib/screens/downloads/download_screen.dart:1537-1547 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) lib/screens/extensions/ExtensionScreen.dart:528 — lib/screens/extensions/ExtensionScreen.dart:528-538 | lib/screens/search/widgets/extension_filter_sheet.dart:481-491 | lib/screens/search/widgets/extension_filter_sheet.dart:839-849 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (11 lines × 3) lib/screens/library/stats_page.dart:79 — lib/screens/library/stats_page.dart:79-90 | lib/screens/library/stats_page.dart:98-108 | lib/screens/library/stats_page.dart:116-126 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) lib/screens/library/widgets/unified_history_card.dart:95 — lib/screens/library/widgets/unified_history_card.dart:95-105 | lib/screens/library/widgets/unified_history_card.dart:228-238 | lib/screens/library/widgets/unified_history_card.dart:366-376 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) lib/screens/manga/widgets/reader/color_filter_settings_page.dart:84 — lib/screens/manga/widgets/reader/color_filter_settings_page.dart:84-94 | lib/screens/manga/widgets/reader/color_filter_settings_page.dart:98-108 | lib/screens/manga/widgets/reader/color_filter_settings_page.dart:112-122 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:180 — lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:180-190 | lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:232-242 | lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:285-295 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) lib/screens/anime/watch/controls/widgets/audio_popup.dart:24 — lib/screens/anime/watch/controls/widgets/audio_popup.dart:24-34 | lib/screens/anime/watch/controls/widgets/source_popup.dart:24-34 | lib/screens/anime/watch/controls/widgets/tracks_popup.dart:27-37 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/source_popup.dart` and `lib/screens/anime/watch/controls/widgets/tracks_popup.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×9
  • Duplicated block (23 lines × 2) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:152 — lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:152-174 | lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:302-324 — both copies are in the same file, so extract the 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 (23 lines × 2) lib/screens/downloads/widgets/downloaded_media_view.dart:923 — lib/screens/downloads/widgets/downloaded_media_view.dart:923-945 | lib/screens/downloads/widgets/downloaded_media_view.dart:1119-1141 — both copies are in the same file, so extract the 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 (23 lines × 2) lib/screens/manga/widgets/reader/auto_scroll_menu.dart:122 — lib/screens/manga/widgets/reader/auto_scroll_menu.dart:122-144 | lib/screens/novel/reader/novel_reader.dart:187-209 — 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 (23 lines × 2) lib/screens/manga/widgets/reader/top_controls.dart:39 — lib/screens/manga/widgets/reader/top_controls.dart:39-61 | lib/screens/novel/reader/widgets/top_controls.dart:28-50 — before extracting anything, compare `lib/screens/manga/widgets/reader/top_controls.dart` and `lib/screens/novel/reader/widgets/top_controls.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 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 (23 lines × 2) lib/screens/profile/activity_details_page.dart:665 — lib/screens/profile/activity_details_page.dart:665-687 | lib/screens/profile/widgets/social_tab.dart:338-360 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/screens/profile/widgets/social_tab.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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 (23 lines × 2) lib/screens/profile/widgets/profile_header.dart:299 — lib/screens/profile/widgets/profile_header.dart:299-321 | lib/screens/profile/widgets/profile_header.dart:999-1021 — both copies are in the same file, so extract the 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 (23 lines × 2) lib/screens/search/search_view.dart:963 — lib/screens/search/search_view.dart:963-985 | lib/screens/search/search_view.dart:1029-1051 — both copies are in the same file, so extract the 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 (23 lines × 2) lib/screens/search/widgets/extension_filter_sheet.dart:273 — lib/screens/search/widgets/extension_filter_sheet.dart:273-295 | lib/screens/search/widgets/extension_filter_sheet.dart:767-789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2) lib/widgets/media_items/media_peek_popup.dart:457 — lib/widgets/media_items/media_peek_popup.dart:457-479 | lib/widgets/non_widgets/reasons_sheet.dart:431-453 — before extracting anything, compare `lib/widgets/media_items/media_peek_popup.dart` and `lib/widgets/non_widgets/reasons_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×8
  • Duplicated block (26 lines × 2) lib/controllers/services/backup_restore/backup_restore_service.dart:1661 — lib/controllers/services/backup_restore/backup_restore_service.dart:1661-1686 | lib/controllers/services/backup_restore/backup_restore_service.dart:1731-1756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1999 — lib/screens/anime/widgets/comments/comments_section.dart:1999-2024 | lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:376-401 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 113 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 (26 lines × 2) lib/screens/downloads/widgets/download_server_selector.dart:603 — lib/screens/downloads/widgets/download_server_selector.dart:603-628 | lib/screens/downloads/widgets/download_server_selector.dart:644-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) lib/screens/library/editor/history_editor.dart:280 — lib/screens/library/editor/history_editor.dart:280-305 | lib/screens/library/editor/history_editor.dart:380-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) lib/screens/library/editor/history_editor.dart:307 — lib/screens/library/editor/history_editor.dart:307-332 | lib/screens/library/editor/history_editor.dart:407-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) lib/screens/profile/profile_page.dart:181 — lib/screens/profile/profile_page.dart:181-206 | lib/screens/profile/user_profile_page.dart:281-306 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) lib/screens/profile/widgets/profile_header.dart:983 — lib/screens/profile/widgets/profile_header.dart:983-1008 | lib/screens/profile/widgets/user_profile_app_bar.dart:481-506 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) lib/screens/settings/sub_settings/settings_theme.dart:863 — lib/screens/settings/sub_settings/settings_theme.dart:863-888 | lib/screens/settings/sub_settings/settings_theme.dart:900-925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×8
  • Duplicated block (24 lines × 2) lib/models/Media/media.dart:982 — lib/models/Media/media.dart:982-1005 | lib/models/Media/media.dart:1012-1035 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:181 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:181-204 | lib/widgets/common/anymex_slider_m3.dart:186-209 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 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 (24 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:528 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:528-551 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:360-383 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:213 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:213-236 | lib/widgets/watchium/watchium_create_dialog.dart:699-722 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (24 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2057 — lib/screens/anime/widgets/comments/comments_section.dart:2057-2080 | lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:436-459 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 113 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 (24 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:1332 — lib/screens/anime/widgets/episode_list_builder.dart:1332-1355 | lib/screens/manga/widgets/chapter_list_builder.dart:1441-1464 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 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 (24 lines × 2) lib/screens/profile/profile_page.dart:125 — lib/screens/profile/profile_page.dart:125-148 | lib/screens/profile/user_profile_page.dart:226-249 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) lib/utils/compatibility/matchmaker.dart:738 — lib/utils/compatibility/matchmaker.dart:738-761 | lib/utils/compatibility/matchmaker.dart:997-1020 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×8
  • Duplicated block (18–19 lines × 2) lib/controllers/services/backup_restore/backup_restore_service.dart:1340 — lib/controllers/services/backup_restore/backup_restore_service.dart:1340-1357 | lib/controllers/services/backup_restore/backup_restore_service.dart:1384-1402 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) lib/screens/anime/misc/calendar.dart:984 — lib/screens/anime/misc/calendar.dart:984-1002 | lib/widgets/media_items/media_item.dart:288-305 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/widgets/media_items/media_item.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 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 (18–19 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:3242 — lib/screens/anime/widgets/comments/comments_section.dart:3242-3259 | lib/screens/anime/widgets/comments/comments_section.dart:3650-3668 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:205 — lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:205-223 | lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:266-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) lib/screens/library/widgets/unified_history_card.dart:66 — lib/screens/library/widgets/unified_history_card.dart:66-84 | lib/screens/library/widgets/unified_history_card.dart:337-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 (18–19 lines × 2) lib/screens/profile/profile_page.dart:232 — lib/screens/profile/profile_page.dart:232-250 | lib/screens/profile/user_profile_page.dart:339-356 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18–19 lines × 2) lib/screens/profile/widgets/profile_header.dart:885 — lib/screens/profile/widgets/profile_header.dart:885-903 | lib/screens/profile/widgets/user_profile_app_bar.dart:288-305 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18–19 lines × 2) lib/screens/settings/misc/sauce_finder_view.dart:253 — lib/screens/settings/misc/sauce_finder_view.dart:253-271 | lib/screens/settings/misc/sauce_finder_view.dart:461-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×7
  • Duplicated block (28 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:588 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:588-615 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:544-571 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) lib/screens/downloads/download_screen.dart:871 — lib/screens/downloads/download_screen.dart:871-898 | lib/screens/downloads/download_screen.dart:1208-1235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (28 lines × 2) lib/screens/library/editor/list_editor.dart:622 — lib/screens/library/editor/list_editor.dart:622-649 | lib/screens/library/editor/list_editor.dart:685-712 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (28 lines × 2) lib/screens/library/widgets/library_deps.dart:44 — lib/screens/library/widgets/library_deps.dart:44-71 | lib/widgets/common/search_bar.dart:59-86 — 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 (28 lines × 2) lib/utils/lanczos_image.dart:150 — lib/utils/lanczos_image.dart:150-177 | lib/utils/lanczos_image.dart:255-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (28 lines × 2) lib/widgets/media_items/media_peek_popup.dart:221 — lib/widgets/media_items/media_peek_popup.dart:221-248 | lib/widgets/non_widgets/reasons_sheet.dart:169-196 — before extracting anything, compare `lib/widgets/media_items/media_peek_popup.dart` and `lib/widgets/non_widgets/reasons_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 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 (28 lines × 2) lib/screens/extensions/ExtensionTesting/extension_test_page.dart:129 — lib/screens/extensions/ExtensionTesting/extension_test_page.dart:129-156 | lib/screens/extensions/ExtensionTesting/extension_test_page.dart:195-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×7
  • Duplicated block (25 lines × 2) lib/screens/anime/watch/controls/bottom_controls.dart:461 — lib/screens/anime/watch/controls/bottom_controls.dart:461-485 | lib/screens/anime/watch/controls/bottom_controls.dart:552-576 — both copies are in the same file, so extract the 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 (25 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:571 — lib/screens/anime/widgets/comments/comments_section.dart:571-595 | lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:51-75 — 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 (25 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1650 — lib/screens/anime/widgets/comments/comments_section.dart:1650-1674 | lib/screens/anime/widgets/comments/comments_section.dart:2025-2049 — both copies are in the same file, so extract the 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 (25 lines × 2) lib/screens/anime/widgets/list_editor.dart:636 — lib/screens/anime/widgets/list_editor.dart:636-660 | lib/screens/anime/widgets/list_editor.dart:763-787 — both copies are in the same file, so extract the 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 (25 lines × 2) lib/screens/library/online/anime_list.dart:407 — lib/screens/library/online/anime_list.dart:407-431 | lib/screens/library/online/manga_list.dart:391-415 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) lib/screens/library/widgets/unified_history_card.dart:150 — lib/screens/library/widgets/unified_history_card.dart:150-174 | lib/screens/library/widgets/unified_history_card.dart:419-443 — both copies are in the same file, so extract the 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 (25 lines × 2) lib/widgets/non_widgets/recommend_sheet.dart:438 — lib/widgets/non_widgets/recommend_sheet.dart:438-462 | lib/widgets/non_widgets/recommend_sheet.dart:644-668 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×7
  • Duplicated block (16 lines × 3) lib/controllers/services/anilist/anilist_auth.dart:2023 — lib/controllers/services/anilist/anilist_auth.dart:2023-2038 | lib/controllers/services/anilist/anilist_auth.dart:2144-2159 | lib/controllers/services/anilist/anilist_auth.dart:2378-2393 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (16 lines × 3) lib/screens/downloads/widgets/downloaded_media_view.dart:466 — lib/screens/downloads/widgets/downloaded_media_view.dart:466-481 | lib/screens/downloads/widgets/downloaded_media_view.dart:1063-1078 | lib/screens/extensions/ExtensionItem.dart:234-249 — before extracting anything, compare `lib/screens/downloads/widgets/downloaded_media_view.dart` and `lib/screens/extensions/ExtensionItem.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 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 (16 lines × 3) lib/screens/library/online/anime_list.dart:351 — lib/screens/library/online/anime_list.dart:351-366 | lib/screens/library/online/manga_list.dart:334-349 | lib/screens/profile/widgets/user_media_list_page.dart:316-331 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) lib/screens/library/online/anime_list.dart:400 — lib/screens/library/online/anime_list.dart:400-415 | lib/screens/library/online/manga_list.dart:384-399 | lib/screens/profile/widgets/user_media_list_page.dart:361-376 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) lib/screens/library/online/anime_list.dart:820 — lib/screens/library/online/anime_list.dart:820-835 | lib/screens/library/online/manga_list.dart:805-820 | lib/screens/profile/widgets/user_media_list_page.dart:749-764 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 3) lib/services/commentum_service.dart:655 — lib/services/commentum_service.dart:655-670 | lib/services/commentum_service.dart:703-718 | lib/services/commentum_service.dart:912-927 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (16 lines × 3) lib/widgets/animation/animations.dart:63 — lib/widgets/animation/animations.dart:63-78 | lib/widgets/animation/animations.dart:162-177 | lib/widgets/animation/animations.dart:476-491 — 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×7
  • Duplicated block (11–12 lines × 2) lib/controllers/services/mal/mal_api.dart:42 — lib/controllers/services/mal/mal_api.dart:42-52 | lib/controllers/services/mal/mal_service.dart:772-783 — before extracting anything, compare `lib/controllers/services/mal/mal_api.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11–12 lines × 2) lib/screens/downloads/controller/download_controller.dart:1608 — lib/screens/downloads/controller/download_controller.dart:1608-1618 | lib/screens/downloads/controller/download_controller.dart:1622-1633 — both copies are in the same file, so extract the 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–12 lines × 2) lib/screens/library/editor/history_editor.dart:192 — lib/screens/library/editor/history_editor.dart:192-203 | lib/screens/library/editor/history_editor.dart:480-490 — both copies are in the same file, so extract the 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–12 lines × 2) lib/screens/manga/controller/reader_controller.dart:263 — lib/screens/manga/controller/reader_controller.dart:263-273 | lib/screens/manga/controller/reader_controller.dart:1867-1878 — both copies are in the same file, so extract the 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–12 lines × 2) lib/screens/profile/profile_page.dart:76 — lib/screens/profile/profile_page.dart:76-86 | lib/screens/profile/user_profile_page.dart:92-103 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11–12 lines × 2) lib/widgets/common/cards/styles/minimal_exotic_card.dart:81 — lib/widgets/common/cards/styles/minimal_exotic_card.dart:81-92 | lib/widgets/common/cards/styles/modern_card.dart:56-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11–12 lines × 2) lib/widgets/non_widgets/reasons_sheet.dart:672 — lib/widgets/non_widgets/reasons_sheet.dart:672-682 | lib/widgets/non_widgets/recommend_sheet.dart:986-997 — before extracting anything, compare `lib/widgets/non_widgets/reasons_sheet.dart` and `lib/widgets/non_widgets/recommend_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×7
  • Duplicated block (10 lines × 3) lib/controllers/services/widgets/widgets_builders.dart:373 — lib/controllers/services/widgets/widgets_builders.dart:373-382 | lib/screens/community/community_recommendations_page.dart:412-421 | lib/screens/community/community_recommendations_page.dart:862-871 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 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 (10 lines × 3) lib/screens/anime/studio_details_page.dart:361 — lib/screens/anime/studio_details_page.dart:361-370 | lib/screens/anime/widgets/character_staff_sheet.dart:906-918 | lib/screens/anime/widgets/character_staff_sheet.dart:941-953 — before extracting anything, compare `lib/screens/anime/studio_details_page.dart` and `lib/screens/anime/widgets/character_staff_sheet.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 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 (10 lines × 3) lib/screens/anime/widgets/episode/styles/compact_style.dart:121 — lib/screens/anime/widgets/episode/styles/compact_style.dart:121-130 | lib/screens/anime/widgets/episode/styles/detailed_style.dart:121-130 | lib/screens/anime/widgets/episode_watch_screen.dart:493-502 — before extracting anything, compare `lib/screens/anime/widgets/episode/styles/compact_style.dart` and `lib/screens/anime/widgets/episode/styles/detailed_style.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) lib/screens/downloads/widgets/download_server_selector.dart:191 — lib/screens/downloads/widgets/download_server_selector.dart:191-200 | lib/widgets/watchium/watchium_create_dialog.dart:82-91 | lib/widgets/watchium/watchium_server_sheet.dart:72-81 — before extracting anything, compare `lib/screens/downloads/widgets/download_server_selector.dart` and `lib/widgets/watchium/watchium_server_sheet.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) lib/screens/library/editor/history_editor.dart:321 — lib/screens/library/editor/history_editor.dart:321-330 | lib/screens/library/editor/history_editor.dart:421-430 | lib/screens/library/editor/history_editor.dart:819-828 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) lib/screens/manga/widgets/reader/color_filter_settings_page.dart:82 — lib/screens/manga/widgets/reader/color_filter_settings_page.dart:82-91 | lib/screens/manga/widgets/reader/color_filter_settings_page.dart:96-105 | lib/screens/manga/widgets/reader/color_filter_settings_page.dart:124-134 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) lib/screens/anime/widgets/anime_stats.dart:931 — lib/screens/anime/widgets/anime_stats.dart:931-940 | lib/screens/manga/widgets/manga_stats.dart:841-850 | lib/screens/novel/details/widgets/novel_stats.dart:235-244 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×7
  • Duplicated block (9 lines × 3) lib/screens/anime/misc/calendar.dart:262 — lib/screens/anime/misc/calendar.dart:262-270 | lib/screens/library/online/anime_list.dart:555-563 | lib/screens/library/online/manga_list.dart:539-547 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/screens/library/online/anime_list.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) lib/screens/anime/watch/controls/widgets/bottom_sheet.dart:608 — lib/screens/anime/watch/controls/widgets/bottom_sheet.dart:608-616 | lib/screens/anime/watch/controls/widgets/episodes_pane.dart:283-291 | lib/screens/anime/watch/controls/widgets/episodes_pane.dart:319-327 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 3) lib/screens/anime/widgets/episode_list_builder.dart:1154 — lib/screens/anime/widgets/episode_list_builder.dart:1154-1162 | lib/screens/manga/widgets/chapter_list_builder.dart:1276-1284 | lib/widgets/watchium/watchium_party_popup.dart:552-561 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) lib/screens/downloads/widgets/downloaded_media_view.dart:986 — lib/screens/downloads/widgets/downloaded_media_view.dart:986-994 | lib/screens/manga/controller/reader_controller.dart:264-272 | lib/screens/manga/controller/reader_controller.dart:1868-1876 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 3) lib/services/commentum_service.dart:777 — lib/services/commentum_service.dart:777-785 | lib/services/commentum_service.dart:814-822 | lib/services/commentum_service.dart:1269-1277 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) lib/services/commentum_service.dart:775 — lib/services/commentum_service.dart:775-783 | lib/services/commentum_service.dart:811-820 | lib/services/commentum_service.dart:1527-1535 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) lib/widgets/anymex_widgets/linked_accounts_badges.dart:39 — lib/widgets/anymex_widgets/linked_accounts_badges.dart:39-47 | lib/widgets/anymex_widgets/linked_accounts_badges.dart:50-58 | lib/widgets/anymex_widgets/linked_accounts_badges.dart:61-69 — 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×6
  • Duplicated block (34 lines × 2) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:376 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:376-409 | lib/widgets/common/anymex_slider_m3.dart:405-438 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 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 (34 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:245 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:245-278 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:283-316 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (34 lines × 2) lib/screens/downloads/widgets/download_server_selector.dart:469 — lib/screens/downloads/widgets/download_server_selector.dart:469-502 | lib/widgets/watchium/watchium_server_sheet.dart:240-273 — before extracting anything, compare `lib/screens/downloads/widgets/download_server_selector.dart` and `lib/widgets/watchium/watchium_server_sheet.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (34 lines × 2) lib/screens/profile/profile_page.dart:384 — lib/screens/profile/profile_page.dart:384-417 | lib/screens/profile/user_profile_page.dart:1029-1062 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (34 lines × 2) lib/screens/profile/widgets/profile_header.dart:707 — lib/screens/profile/widgets/profile_header.dart:707-740 | lib/screens/profile/widgets/user_profile_app_bar.dart:124-157 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (34 lines × 2) lib/screens/settings/sub_settings/settings_player.dart:1475 — lib/screens/settings/sub_settings/settings_player.dart:1475-1508 | lib/screens/settings/sub_settings/settings_player.dart:1693-1726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×6
  • Duplicated block (29 lines × 2) lib/screens/downloads/widgets/download_server_selector.dart:191 — lib/screens/downloads/widgets/download_server_selector.dart:191-219 | lib/widgets/watchium/watchium_server_sheet.dart:72-100 — before extracting anything, compare `lib/screens/downloads/widgets/download_server_selector.dart` and `lib/widgets/watchium/watchium_server_sheet.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (29 lines × 2) lib/screens/settings/sub_settings/settings_extensions.dart:224 — lib/screens/settings/sub_settings/settings_extensions.dart:224-252 | lib/screens/settings/sub_settings/settings_extensions.dart:329-357 — both copies are in the same file, so extract the 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 (29 lines × 2) lib/utils/download_isolate_pool.dart:104 — lib/utils/download_isolate_pool.dart:104-132 | lib/utils/download_isolate_pool.dart:162-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (29 lines × 2) lib/widgets/common/media_mode_selector.dart:520 — lib/widgets/common/media_mode_selector.dart:520-548 | lib/widgets/common/media_mode_selector.dart:645-673 — both copies are in the same file, so extract the 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 (29 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:380 — lib/widgets/common/navbar/styles/classic_navbar.dart:380-408 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:432-460 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (29 lines × 2) lib/widgets/non_widgets/recommend_sheet.dart:1103 — lib/widgets/non_widgets/recommend_sheet.dart:1103-1131 | lib/widgets/non_widgets/recommend_sheet.dart:1182-1210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×6
  • Duplicated block (8 lines × 3) lib/screens/anime/watch/controls/bottom_controls.dart:69 — lib/screens/anime/watch/controls/bottom_controls.dart:69-76 | lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:268-275 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:306-313 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:160 — lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:160-167 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:191-198 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:222-229 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) lib/screens/profile/widgets/user_media_list_page.dart:530 — lib/screens/profile/widgets/user_media_list_page.dart:530-537 | lib/screens/profile/widgets/user_media_list_page.dart:546-553 | lib/screens/profile/widgets/user_media_list_page.dart:569-576 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) lib/screens/search/widgets/search_widgets.dart:1111 — lib/screens/search/widgets/search_widgets.dart:1111-1118 | lib/screens/search/widgets/search_widgets.dart:1130-1137 | lib/screens/search/widgets/search_widgets.dart:1147-1154 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) lib/widgets/common/anymex_scaffold.dart:332 — lib/widgets/common/anymex_scaffold.dart:332-339 | lib/widgets/common/anymex_scaffold.dart:345-352 | lib/widgets/common/anymex_scaffold.dart:358-365 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) lib/screens/stats/user_stats_page.dart:136 — lib/screens/stats/user_stats_page.dart:136-143 | lib/screens/stats/user_stats_page.dart:152-159 | lib/screens/stats/user_stats_page.dart:167-174 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×6
  • Duplicated block (5 lines × 3) lib/controllers/watchium/watchium_sync_controller.dart:318 — lib/controllers/watchium/watchium_sync_controller.dart:318-322 | lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:629-633 | lib/widgets/watchium/watchium_create_dialog.dart:551-555 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:212 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:212-217 | lib/widgets/watchium/watchium_create_dialog.dart:697-703 | lib/widgets/watchium/watchium_overlay.dart:118-122 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) lib/screens/anime/widgets/anime_stats.dart:914 — lib/screens/anime/widgets/anime_stats.dart:914-918 | lib/screens/manga/widgets/manga_stats.dart:824-828 | lib/screens/novel/details/widgets/novel_stats.dart:216-222 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) lib/screens/anime/widgets/anime_stats.dart:919 — lib/screens/anime/widgets/anime_stats.dart:919-923 | lib/screens/manga/widgets/manga_stats.dart:829-833 | lib/screens/novel/details/widgets/novel_stats.dart:221-227 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) lib/widgets/non_widgets/recommend_sheet.dart:729 — lib/widgets/non_widgets/recommend_sheet.dart:729-733 | lib/widgets/non_widgets/recommend_sheet.dart:741-745 | lib/widgets/non_widgets/recommend_sheet.dart:928-932 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) lib/controllers/services/widgets/widgets_builders.dart:247 — lib/controllers/services/widgets/widgets_builders.dart:247-251 | lib/screens/community/community_recommendations_page.dart:396-400 | lib/screens/community/community_recommendations_page.dart:837-841 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×5
  • Duplicated block (30 lines × 2) lib/controllers/discord/discord_rpc.dart:675 — lib/controllers/discord/discord_rpc.dart:675-704 | lib/controllers/discord/discord_rpc.dart:787-816 — both copies are in the same file, so extract the 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 (30 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:997 — lib/screens/anime/widgets/episode_list_builder.dart:997-1026 | lib/screens/manga/widgets/chapter_list_builder.dart:1128-1157 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) lib/screens/manga/widgets/reader/continuous_reader.dart:392 — lib/screens/manga/widgets/reader/continuous_reader.dart:392-421 | lib/screens/manga/widgets/reader/reader_view.dart:337-366 — before extracting anything, compare `lib/screens/manga/widgets/reader/continuous_reader.dart` and `lib/screens/manga/widgets/reader/reader_view.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (30 lines × 2) lib/services/commentum_service.dart:654 — lib/services/commentum_service.dart:654-683 | lib/services/commentum_service.dart:702-731 — both copies are in the same file, so extract the 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 (30 lines × 2) lib/widgets/media_items/media_peek_popup.dart:923 — lib/widgets/media_items/media_peek_popup.dart:923-952 | lib/widgets/non_widgets/reasons_sheet.dart:772-801 — before extracting anything, compare `lib/widgets/media_items/media_peek_popup.dart` and `lib/widgets/non_widgets/reasons_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×5
  • Duplicated block (21–22 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:85 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:85-106 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:154-174 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21–22 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1526 — lib/screens/anime/widgets/comments/comments_section.dart:1526-1546 | lib/screens/anime/widgets/comments/comments_section.dart:1870-1891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21–22 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:777 — lib/screens/anime/widgets/episode_list_builder.dart:777-797 | lib/screens/manga/widgets/chapter_list_builder.dart:341-362 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21–22 lines × 2) lib/screens/settings/sub_settings/contributors/contributors.dart:649 — lib/screens/settings/sub_settings/contributors/contributors.dart:649-669 | lib/screens/settings/sub_settings/contributors/contributors.dart:778-799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (21–22 lines × 2) lib/widgets/anymex_widgets/anymex_animated_logo.dart:269 — lib/widgets/anymex_widgets/anymex_animated_logo.dart:269-289 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:308-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×5
  • Duplicated block (17–18 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:329 — lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:329-346 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:359-375 — both copies are in the same file, so extract the 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–18 lines × 2) lib/screens/extensions/ExtensionScreen.dart:98 — lib/screens/extensions/ExtensionScreen.dart:98-115 | lib/screens/extensions/ExtensionScreen.dart:191-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.
  • Duplicated block (17–18 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:879 — lib/screens/profile/compatibility/compatibility_result_page.dart:879-895 | lib/screens/profile/compatibility/compatibility_result_page.dart:947-964 — both copies are in the same file, so extract the 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–18 lines × 2) lib/screens/search/widgets/search_widgets.dart:755 — lib/screens/search/widgets/search_widgets.dart:755-771 | lib/screens/search/widgets/search_widgets.dart:2215-2232 — both copies are in the same file, so extract the 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–18 lines × 2) lib/widgets/header/header.dart:107 — lib/widgets/header/header.dart:107-124 | lib/widgets/header/header.dart:191-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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×5
  • Duplicated block (12 lines × 3) lib/screens/novel/reader/controller/reader_controller.dart:1087 — lib/screens/novel/reader/controller/reader_controller.dart:1087-1098 | lib/screens/novel/reader/controller/reader_controller.dart:1110-1121 | lib/screens/novel/reader/controller/reader_controller.dart:1129-1140 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) lib/screens/novel/reader/widgets/bottom_controls.dart:153 — lib/screens/novel/reader/widgets/bottom_controls.dart:153-164 | lib/screens/novel/reader/widgets/bottom_controls.dart:234-245 | lib/screens/novel/reader/widgets/bottom_controls.dart:300-311 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) lib/screens/profile/compatibility/compatibility_result_page.dart:882 — lib/screens/profile/compatibility/compatibility_result_page.dart:882-893 | lib/screens/profile/compatibility/compatibility_result_page.dart:951-962 | lib/screens/profile/compatibility/compatibility_result_page.dart:2338-2349 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) lib/screens/settings/sub_settings/settings_backup.dart:807 — lib/screens/settings/sub_settings/settings_backup.dart:807-818 | lib/screens/settings/sub_settings/settings_common.dart:40-51 | lib/screens/settings/sub_settings/settings_theme.dart:183-194 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (12 lines × 3) lib/screens/settings/sub_settings/settings_theme.dart:833 — lib/screens/settings/sub_settings/settings_theme.dart:833-844 | lib/screens/settings/sub_settings/settings_theme.dart:875-886 | lib/screens/settings/sub_settings/settings_theme.dart:912-923 — 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×5
  • Duplicated block (9–10 lines × 3) lib/screens/anime/misc/calendar.dart:206 — lib/screens/anime/misc/calendar.dart:206-215 | lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:65-73 | lib/widgets/header/header.dart:640-648 — before extracting anything, compare `lib/screens/manga/widgets/reader/tabbed_reader_settings.dart` and `lib/widgets/header/header.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9–10 lines × 3) lib/screens/library/editor/history_editor.dart:292 — lib/screens/library/editor/history_editor.dart:292-301 | lib/screens/library/editor/history_editor.dart:392-401 | lib/screens/library/editor/history_editor.dart:843-851 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9–10 lines × 3) lib/screens/library/widgets/unified_history_card.dart:122 — lib/screens/library/widgets/unified_history_card.dart:122-131 | lib/screens/library/widgets/unified_history_card.dart:268-276 | lib/screens/library/widgets/unified_history_card.dart:392-401 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9–10 lines × 3) lib/screens/profile/activity_details_page.dart:355 — lib/screens/profile/activity_details_page.dart:355-364 | lib/screens/profile/activity_details_page.dart:383-392 | lib/widgets/non_widgets/activity_card.dart:664-672 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/widgets/non_widgets/activity_card.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9–10 lines × 3) lib/screens/settings/sub_settings/settings_extensions.dart:240 — lib/screens/settings/sub_settings/settings_extensions.dart:240-248 | lib/screens/settings/sub_settings/settings_extensions.dart:345-353 | lib/widgets/anymex_widgets/anymex_tabbar.dart:46-55 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
X2 · Cancellation propagation · Function without a CancelToken · ×5
  • Function without a CancelToken: urlToDcAsset lib/controllers/discord/discord_rpc.dart:441 — `urlToDcAsset` calls `Dio(…).post(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: getDetails REDACTED:22 — `getDetails` calls `Dio(…).get(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _downloadShaders lib/screens/settings/sub_settings/settings_player.dart:552 — `_downloadShaders` calls `dio.download(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _downloadAndInstallAndroid lib/utils/updater.dart:418 — `_downloadAndInstallAndroid` calls `dio.download(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
  • Function without a CancelToken: _downloadWindows lib/utils/updater.dart:463 — `_downloadWindows` calls `dio.download(…)` but takes no CancelToken and hands the request none its caller can reach, so its caller cannot cancel the request once it has started. Take `CancelToken? cancelToken` and pass it on as `cancelToken: cancelToken` — or, in a widget's State or a notifier, hold one and cancel it in `dispose`.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×4
  • Duplicated block (42 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:731 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:731-772 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:641-682 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (42 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:463 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:463-504 | lib/widgets/watchium/watchium_create_dialog.dart:387-428 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (42 lines × 2) lib/widgets/animation/animations.dart:32 — lib/widgets/animation/animations.dart:32-73 | lib/widgets/animation/animations.dart:131-172 — both copies are in the same file, so extract the 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 (42 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:197 — lib/widgets/common/navbar/styles/classic_navbar.dart:197-238 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:193-234 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×4
  • Duplicated block (38 lines × 2) lib/controllers/sync/gist_sync_controller.dart:603 — lib/controllers/sync/gist_sync_controller.dart:603-640 | lib/controllers/sync/gist_sync_controller.dart:700-737 — both copies are in the same file, so extract the 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 (38 lines × 2) lib/screens/community/user_recommendations_page.dart:115 — lib/screens/community/user_recommendations_page.dart:115-152 | lib/screens/community/user_recommendations_page.dart:160-197 — both copies are in the same file, so extract the 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 (38 lines × 2) lib/screens/profile/profile_page.dart:762 — lib/screens/profile/profile_page.dart:762-799 | lib/screens/profile/user_profile_page.dart:731-768 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (38 lines × 2) lib/services/commentum_service.dart:561 — lib/services/commentum_service.dart:561-598 | lib/services/commentum_service.dart:1680-1717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×4
  • Duplicated block (36 lines × 2) lib/screens/anime/watch/watch_view.dart:157 — lib/screens/anime/watch/watch_view.dart:157-192 | lib/screens/local_source/player/offline_player.dart:127-162 — before extracting anything, compare `lib/screens/anime/watch/watch_view.dart` and `lib/screens/local_source/player/offline_player.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 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 (36 lines × 2) lib/screens/anime/widgets/anime_stats.dart:682 — lib/screens/anime/widgets/anime_stats.dart:682-717 | lib/screens/manga/widgets/manga_stats.dart:724-759 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (36 lines × 2) lib/screens/profile/activity_details_page.dart:608 — lib/screens/profile/activity_details_page.dart:608-643 | lib/widgets/non_widgets/activity_card.dart:357-392 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/widgets/non_widgets/activity_card.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 190 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 (36 lines × 2) lib/widgets/common/carousel/themes/big_carousel_classic.dart:37 — lib/widgets/common/carousel/themes/big_carousel_classic.dart:37-72 | lib/widgets/common/carousel/themes/big_carousel_portrait.dart:71-106 — before extracting anything, compare `lib/widgets/common/carousel/themes/big_carousel_classic.dart` and `lib/widgets/common/carousel/themes/big_carousel_portrait.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×4
  • Duplicated block (31 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:1507 — lib/controllers/services/anilist/anilist_auth.dart:1507-1537 | lib/controllers/services/anilist/anilist_auth.dart:1606-1636 — both copies are in the same file, so extract the 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 (31 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:2110 — lib/screens/anime/widgets/comments/comments_section.dart:2110-2140 | lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:691-721 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 113 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 (31 lines × 2) lib/screens/search/widgets/extension_filter_sheet.dart:479 — lib/screens/search/widgets/extension_filter_sheet.dart:479-509 | lib/screens/search/widgets/extension_filter_sheet.dart:837-867 — both copies are in the same file, so extract the 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 (31 lines × 2) lib/screens/settings/sub_settings/settings_addons.dart:334 — lib/screens/settings/sub_settings/settings_addons.dart:334-364 | lib/screens/settings/sub_settings/settings_addons.dart:497-527 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×4
  • Duplicated block (27–28 lines × 2) lib/screens/profile/profile_page.dart:312 — lib/screens/profile/profile_page.dart:312-338 | lib/screens/profile/user_profile_page.dart:395-422 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (27–28 lines × 2) lib/screens/settings/sub_settings/settings_comments.dart:513 — lib/screens/settings/sub_settings/settings_comments.dart:513-540 | lib/screens/settings/sub_settings/settings_comments.dart:550-576 — both copies are in the same file, so extract the 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 (27–28 lines × 2) lib/widgets/common/cards/styles/exotic_card.dart:106 — lib/widgets/common/cards/styles/exotic_card.dart:106-132 | lib/widgets/common/cards/styles/minimal_exotic_card.dart:120-147 — before extracting anything, compare `lib/widgets/common/cards/styles/exotic_card.dart` and `lib/widgets/common/cards/styles/minimal_exotic_card.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (27–28 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:348 — lib/widgets/common/navbar/styles/classic_navbar.dart:348-375 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:402-428 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×4
  • Duplicated block (17 lines × 3) lib/screens/anime/widgets/episode_list_builder.dart:612 — lib/screens/anime/widgets/episode_list_builder.dart:612-628 | lib/screens/anime/widgets/episode_list_builder.dart:645-661 | lib/screens/anime/widgets/episode_list_builder.dart:741-757 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (17 lines × 3) lib/screens/community/community_recommendations_page.dart:667 — lib/screens/community/community_recommendations_page.dart:667-683 | lib/widgets/media_items/media_peek_popup.dart:1220-1236 | lib/widgets/non_widgets/reasons_sheet.dart:900-916 — before extracting anything, compare `lib/screens/community/community_recommendations_page.dart` and `lib/widgets/media_items/media_peek_popup.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 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 (17 lines × 3) lib/screens/library/stats_page.dart:35 — lib/screens/library/stats_page.dart:35-51 | lib/screens/library/stats_page.dart:54-70 | lib/screens/library/stats_page.dart:73-89 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (17 lines × 3) lib/screens/local_source/local_source_view.dart:523 — lib/screens/local_source/local_source_view.dart:523-539 | lib/screens/local_source/local_source_view.dart:606-622 | lib/screens/local_source/local_source_view.dart:674-690 — 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×4
  • Duplicated block (16–17 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:590 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:590-606 | lib/widgets/watchium/watchium_create_dialog.dart:512-527 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (16–17 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:738 — lib/screens/anime/widgets/comments/comments_section.dart:738-754 | lib/screens/anime/widgets/comments/comments_section.dart:1817-1832 — both copies are in the same file, so extract the 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 (16–17 lines × 2) lib/screens/profile/widgets/profile_header.dart:244 — lib/screens/profile/widgets/profile_header.dart:244-259 | lib/screens/profile/widgets/user_profile_header.dart:218-234 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16–17 lines × 2) lib/screens/stats/user_stats_page.dart:454 — lib/screens/stats/user_stats_page.dart:454-469 | lib/screens/stats/user_stats_page.dart:953-969 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×4
  • Duplicated block (15–16 lines × 2) lib/screens/anime/watch/controls/widgets/episodes_pane.dart:272 — lib/screens/anime/watch/controls/widgets/episodes_pane.dart:272-287 | lib/screens/anime/watch/controls/widgets/episodes_pane.dart:309-323 — both copies are in the same file, so extract the 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 (15–16 lines × 2) lib/screens/library/editor/list_editor.dart:814 — lib/screens/library/editor/list_editor.dart:814-829 | lib/widgets/anymex_widgets/anymex_tile.dart:362-376 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15–16 lines × 2) lib/screens/profile/widgets/activity_heatmap.dart:86 — lib/screens/profile/widgets/activity_heatmap.dart:86-101 | lib/screens/stats/user_stats_page.dart:589-603 — before extracting anything, compare `lib/screens/profile/widgets/activity_heatmap.dart` and `lib/screens/stats/user_stats_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15–16 lines × 2) lib/widgets/media_items/media_peek_popup.dart:419 — lib/widgets/media_items/media_peek_popup.dart:419-433 | lib/widgets/non_widgets/reasons_sheet.dart:381-396 — before extracting anything, compare `lib/widgets/media_items/media_peek_popup.dart` and `lib/widgets/non_widgets/reasons_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×4
  • Duplicated block (14–15 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:964 — lib/controllers/services/anilist/anilist_auth.dart:964-977 | lib/controllers/services/anilist/anilist_auth.dart:1122-1136 — both copies are in the same file, so extract the 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–15 lines × 2) lib/controllers/source/source_controller.dart:595 — lib/controllers/source/source_controller.dart:595-608 | lib/screens/extensions/widgets/plugin_manager.dart:206-220 — 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 (14–15 lines × 2) lib/screens/anime/watch/controls/widgets/control_button.dart:165 — lib/screens/anime/watch/controls/widgets/control_button.dart:165-178 | lib/screens/anime/watch/controls/widgets/control_button.dart:181-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) lib/screens/profile/widgets/profile_header.dart:188 — lib/screens/profile/widgets/profile_header.dart:188-201 | lib/screens/profile/widgets/user_profile_header.dart:161-175 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×4
  • Duplicated block (14 lines × 3) lib/screens/anime/misc/calendar.dart:225 — lib/screens/anime/misc/calendar.dart:225-238 | lib/screens/library/online/anime_list.dart:222-235 | lib/screens/library/online/manga_list.dart:200-213 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/screens/library/online/anime_list.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 (14 lines × 3) lib/screens/anime/watch/watch_view.dart:159 — lib/screens/anime/watch/watch_view.dart:159-173 | lib/screens/downloads/widgets/downloaded_watch_page.dart:150-163 | lib/screens/local_source/player/offline_player.dart:129-143 — before extracting anything, compare `lib/screens/anime/watch/watch_view.dart` and `lib/screens/local_source/player/offline_player.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 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 (14 lines × 3) lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:180 — lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:180-193 | lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:228-241 | lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:290-303 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) lib/utils/color_profiler.dart:817 — lib/utils/color_profiler.dart:817-830 | lib/utils/color_profiler.dart:1051-1064 | lib/utils/color_profiler.dart:1329-1342 — 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) lib/controllers/services/mal/mal_api.dart:28 — lib/controllers/services/mal/mal_api.dart:28-37 | lib/controllers/services/mal/mal_service.dart:755-765 — before extracting anything, compare `lib/controllers/services/mal/mal_api.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10–11 lines × 2) lib/controllers/stats/stats_tracker.dart:32 — lib/controllers/stats/stats_tracker.dart:32-41 | lib/controllers/stats/stats_tracker.dart:83-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) lib/screens/anime/misc/calendar.dart:99 — lib/screens/anime/misc/calendar.dart:99-108 | lib/screens/anime/misc/calendar.dart:119-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) lib/screens/settings/sub_settings/settings_player.dart:751 — lib/screens/settings/sub_settings/settings_player.dart:751-761 | lib/screens/settings/sub_settings/settings_ui.dart:813-822 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×4
  • Duplicated block (9 lines × 4) lib/controllers/network/cookie_manager.dart:707 — lib/controllers/network/cookie_manager.dart:707-715 | lib/database/comments/model/comment.dart:235-243 | lib/screens/anime/watch/player/base_player.dart:113-121 | lib/widgets/common/anymex_slider_m3.dart:73-81 — 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 (9 lines × 4) lib/controllers/services/anilist/anilist_auth.dart:2309 — lib/controllers/services/anilist/anilist_auth.dart:2309-2317 | lib/controllers/services/anilist/anilist_auth.dart:2423-2431 | lib/controllers/services/anilist/anilist_auth.dart:2478-2486 | lib/controllers/services/anilist/anilist_auth.dart:2533-2541 — 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 (9 lines × 4) lib/screens/downloads/download_screen.dart:1060 — lib/screens/downloads/download_screen.dart:1060-1068 | lib/screens/downloads/download_screen.dart:1335-1343 | lib/screens/downloads/download_screen.dart:1537-1545 | lib/screens/downloads/widgets/download_server_selector.dart:349-357 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 4) lib/screens/novel/reader/widgets/bottom_controls.dart:75 — lib/screens/novel/reader/widgets/bottom_controls.dart:75-83 | lib/screens/novel/reader/widgets/bottom_controls.dart:153-161 | lib/screens/novel/reader/widgets/bottom_controls.dart:234-242 | lib/screens/novel/reader/widgets/bottom_controls.dart:300-308 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×4
  • Duplicated block (7–8 lines × 2) lib/controllers/services/simkl/simkl_service.dart:758 — lib/controllers/services/simkl/simkl_service.dart:758-765 | lib/controllers/services/simkl/simkl_service.dart:872-878 — both copies are in the same file, so extract the 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–8 lines × 2) lib/screens/downloads/widgets/downloaded_media_view.dart:530 — lib/screens/downloads/widgets/downloaded_media_view.dart:530-536 | lib/screens/downloads/widgets/track_sheet.dart:511-518 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7–8 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1146 — lib/screens/profile/compatibility/compatibility_result_page.dart:1146-1152 | lib/screens/profile/compatibility/compatibility_result_page.dart:2653-2660 — both copies are in the same file, so extract the 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–8 lines × 2) lib/screens/profile/widgets/decoration_closet_sheet.dart:528 — lib/screens/profile/widgets/decoration_closet_sheet.dart:528-535 | lib/screens/profile/widgets/decoration_closet_sheet.dart:559-565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×3
  • Duplicated block (41 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:24 — lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart:24-64 | lib/screens/anime/watch/controls/themes/player_control_themes/netflix_mobile_player_theme.dart:39-79 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/netflix_desktop_player_theme.dart.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/netflix_mobile_player_theme.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (41 lines × 2) lib/screens/library/online/anime_list.dart:652 — lib/screens/library/online/anime_list.dart:652-692 | lib/screens/library/online/manga_list.dart:636-676 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (41 lines × 2) lib/screens/search/widgets/search_widgets.dart:1867 — lib/screens/search/widgets/search_widgets.dart:1867-1907 | lib/screens/search/widgets/search_widgets.dart:2047-2087 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (34–35 lines × 2) · ×3
  • Duplicated block (34–35 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:634 — lib/screens/anime/widgets/episode_list_builder.dart:634-668 | lib/screens/anime/widgets/episode_list_builder.dart:730-763 — both copies are in the same file, so extract the 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 (34–35 lines × 2) lib/screens/library/online/anime_list.dart:157 — lib/screens/library/online/anime_list.dart:157-191 | lib/screens/library/online/manga_list.dart:136-169 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (34–35 lines × 2) lib/screens/library/widgets/library_deps.dart:139 — lib/screens/library/widgets/library_deps.dart:139-172 | lib/widgets/common/custom_tiles.dart:319-353 — before extracting anything, compare `lib/screens/library/widgets/library_deps.dart` and `lib/widgets/common/custom_tiles.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×3
  • Duplicated block (24–25 lines × 2) lib/screens/anime/watch/controls/top_controls.dart:214 — lib/screens/anime/watch/controls/top_controls.dart:214-238 | lib/screens/anime/watch/controls/top_controls.dart:465-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24–25 lines × 2) lib/screens/manga/widgets/reader/continuous_reader.dart:222 — lib/screens/manga/widgets/reader/continuous_reader.dart:222-245 | lib/screens/manga/widgets/reader/continuous_reader.dart:247-271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24–25 lines × 2) lib/widgets/common/media_mode_selector.dart:353 — lib/widgets/common/media_mode_selector.dart:353-377 | lib/widgets/common/media_mode_selector.dart:468-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×3
  • Duplicated block (23 lines × 3) lib/controllers/discord/discord_rpc.dart:603 — lib/controllers/discord/discord_rpc.dart:603-625 | lib/controllers/discord/discord_rpc.dart:718-740 | lib/controllers/discord/discord_rpc.dart:830-852 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (23 lines × 3) lib/screens/anime/widgets/anime_stats.dart:305 — lib/screens/anime/widgets/anime_stats.dart:305-327 | lib/screens/anime/widgets/anime_stats.dart:368-390 | lib/screens/anime/widgets/anime_stats.dart:431-453 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (23 lines × 3) lib/screens/library/widgets/manga_card.dart:83 — lib/screens/library/widgets/manga_card.dart:83-105 | lib/screens/library/widgets/unified_history_card.dart:46-68 | lib/widgets/media_items/media_item.dart:279-301 — 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.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×3
  • Duplicated block (20 lines × 4) lib/models/notification/notification_item.dart:83 — lib/models/notification/notification_item.dart:83-102 | lib/screens/anime/misc/list_exporter.dart:215-234 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1542-1561 | lib/screens/search/widgets/search_widgets.dart:35-54 — before extracting anything, compare `lib/models/notification/notification_item.dart` and `lib/screens/anime/misc/list_exporter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 4) lib/models/notification/notification_item.dart:108 — lib/models/notification/notification_item.dart:108-127 | lib/screens/anime/misc/list_exporter.dart:216-235 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1563-1582 | lib/screens/search/widgets/search_widgets.dart:36-55 — before extracting anything, compare `lib/models/notification/notification_item.dart` and `lib/screens/anime/misc/list_exporter.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 4) lib/utils/color_profiler.dart:745 — lib/utils/color_profiler.dart:745-764 | lib/utils/color_profiler.dart:1002-1021 | lib/utils/color_profiler.dart:1165-1184 | lib/utils/color_profiler.dart:1356-1375 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×3
  • Duplicated block (20 lines × 3) lib/database/comments/comments_db.dart:243 — lib/database/comments/comments_db.dart:243-262 | lib/database/comments/comments_db.dart:420-439 | lib/database/comments/comments_db.dart:459-478 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (20 lines × 3) lib/services/commentum_service.dart:672 — lib/services/commentum_service.dart:672-691 | lib/services/commentum_service.dart:720-739 | lib/services/commentum_service.dart:928-947 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (20 lines × 3) lib/widgets/non_widgets/reasons_sheet.dart:296 — lib/widgets/non_widgets/reasons_sheet.dart:296-315 | lib/widgets/non_widgets/recommend_sheet.dart:442-461 | lib/widgets/non_widgets/recommend_sheet.dart:648-667 — before extracting anything, compare `lib/widgets/non_widgets/reasons_sheet.dart` and `lib/widgets/non_widgets/recommend_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×3
  • Duplicated block (19–20 lines × 2) lib/screens/profile/widgets/activity_heatmap.dart:161 — lib/screens/profile/widgets/activity_heatmap.dart:161-180 | lib/screens/stats/user_stats_page.dart:661-679 — before extracting anything, compare `lib/screens/profile/widgets/activity_heatmap.dart` and `lib/screens/stats/user_stats_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (19–20 lines × 2) lib/screens/profile/widgets/profile_header.dart:101 — lib/screens/profile/widgets/profile_header.dart:101-120 | lib/screens/profile/widgets/user_profile_header.dart:82-100 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19–20 lines × 2) package_manager.dart:300 — package_manager.dart:300-319 | package_manager.dart:328-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×3
  • Duplicated block (15–16 lines × 3) lib/screens/anime/widgets/voice_actor.dart:81 — lib/screens/anime/widgets/voice_actor.dart:81-95 | lib/screens/anime/widgets/voice_actor.dart:204-219 | lib/screens/anime/widgets/voice_actor.dart:348-363 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15–16 lines × 3) lib/screens/library/online/anime_list.dart:372 — lib/screens/library/online/anime_list.dart:372-386 | lib/screens/library/online/manga_list.dart:355-370 | lib/screens/profile/widgets/user_media_list_page.dart:333-347 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15–16 lines × 3) lib/screens/search/search_view.dart:413 — lib/screens/search/search_view.dart:413-428 | lib/screens/search/search_view.dart:444-458 | lib/screens/search/search_view.dart:474-488 — 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×3
  • Duplicated block (14–15 lines × 3) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:38 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:38-52 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:40-54 | lib/screens/anime/watch/controls/top_controls.dart:48-61 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14–15 lines × 3) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:90 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:90-104 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:159-172 | lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1264-1277 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14–15 lines × 3) lib/screens/community/community_recommendations_page.dart:691 — lib/screens/community/community_recommendations_page.dart:691-705 | lib/widgets/media_items/media_peek_popup.dart:1245-1258 | lib/widgets/non_widgets/reasons_sheet.dart:925-938 — before extracting anything, compare `lib/screens/community/community_recommendations_page.dart` and `lib/widgets/media_items/media_peek_popup.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×3
  • Duplicated block (13 lines × 4) lib/controllers/services/widgets/widgets_builders.dart:304 — lib/controllers/services/widgets/widgets_builders.dart:304-316 | lib/screens/anime/watch/controls/widgets/shader_osd.dart:31-43 | lib/screens/community/community_recommendations_page.dart:537-549 | lib/screens/community/community_recommendations_page.dart:780-792 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 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 (13 lines × 4) lib/screens/anime/widgets/anime_stats.dart:688 — lib/screens/anime/widgets/anime_stats.dart:688-700 | lib/screens/anime/widgets/anime_stats.dart:725-737 | lib/screens/manga/widgets/manga_stats.dart:730-742 | lib/screens/manga/widgets/manga_stats.dart:767-779 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (13 lines × 4) lib/screens/search/widgets/search_widgets.dart:1432 — lib/screens/search/widgets/search_widgets.dart:1432-1444 | lib/screens/search/widgets/search_widgets.dart:1523-1535 | lib/screens/search/widgets/search_widgets.dart:1605-1617 | lib/screens/search/widgets/search_widgets.dart:1679-1691 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×3
  • Duplicated block (11–13 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1315 — lib/screens/anime/widgets/comments/comments_section.dart:1315-1325 | lib/screens/anime/widgets/comments/comments_section.dart:1399-1411 — both copies are in the same file, so extract the 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–13 lines × 2) lib/screens/anime/widgets/video_slider.dart:71 — lib/screens/anime/widgets/video_slider.dart:71-83 | lib/widgets/common/slider_semantics.dart:299-309 — before extracting anything, compare `lib/screens/anime/widgets/video_slider.dart` and `lib/widgets/common/slider_semantics.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11–13 lines × 2) lib/screens/settings/sub_settings/settings_moderation.dart:1544 — lib/screens/settings/sub_settings/settings_moderation.dart:1544-1556 | lib/screens/settings/sub_settings/settings_moderation.dart:1568-1578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×3
  • Duplicated block (11–12 lines × 3) lib/screens/anime/widgets/comments/comments_section.dart:3242 — lib/screens/anime/widgets/comments/comments_section.dart:3242-3252 | lib/screens/anime/widgets/comments/comments_section.dart:3438-3449 | lib/screens/anime/widgets/comments/comments_section.dart:3650-3660 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11–12 lines × 3) lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:137 — lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:137-147 | lib/widgets/anime/visuals/visuals_popup.dart:214-225 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:79-90 — before extracting anything, compare `lib/widgets/anime/visuals/visuals_popup.dart` and `lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 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 (11–12 lines × 3) lib/screens/anime/widgets/comments/media_comments_page.dart:174 — lib/screens/anime/widgets/comments/media_comments_page.dart:174-185 | lib/screens/anime/widgets/comments/media_comments_page.dart:188-199 | lib/screens/anime/widgets/comments/media_comments_page.dart:200-210 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×3
  • Duplicated block (7 lines × 3) lib/models/Anilist/anilist_media_user.dart:63 — lib/models/Anilist/anilist_media_user.dart:63-69 | lib/models/Anilist/anilist_media_user.dart:74-80 | lib/screens/anime/details/controller/media_details_controller.dart:401-407 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 3) lib/screens/anime/misc/calendar.dart:343 — lib/screens/anime/misc/calendar.dart:343-349 | lib/screens/library/online/anime_list.dart:587-593 | lib/screens/library/online/manga_list.dart:571-577 — before extracting anything, compare `lib/screens/anime/misc/calendar.dart` and `lib/screens/library/online/anime_list.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:673 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:673-679 | lib/widgets/watchium/watchium_create_dialog.dart:592-598 | lib/widgets/watchium/watchium_create_dialog.dart:659-665 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) lib/controllers/offline/offline_storage_controller.dart:608 — lib/controllers/offline/offline_storage_controller.dart:608-613 | lib/controllers/offline/offline_storage_controller.dart:650-655 | lib/controllers/offline/offline_storage_controller.dart:691-696 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) lib/models/Media/media.dart:219 — lib/models/Media/media.dart:219-226 | lib/models/Media/media.dart:394-401 | lib/models/Media/media.dart:1102-1107 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) lib/controllers/services/widgets/widgets_builders.dart:240 — lib/controllers/services/widgets/widgets_builders.dart:240-245 | lib/screens/community/community_recommendations_page.dart:389-394 | lib/screens/community/community_recommendations_page.dart:830-835 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 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.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (73 shared lines) · ×2
  • Near-duplicate member pair (73 shared lines) lib/screens/anime/widgets/comments/comments_section.dart:2560 — lib/screens/anime/widgets/comments/comments_section.dart:2560-2640 | lib/screens/anime/widgets/comments/comments_section.dart:2642-2776 — These two members are variants of one another: 73 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (73 shared lines) lib/widgets/common/carousel/themes/big_carousel_classic.dart:32 — lib/widgets/common/carousel/themes/big_carousel_classic.dart:32-155 | lib/widgets/common/carousel/themes/big_carousel_portrait.dart:58-177 — These two members are variants of one another: 73 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×2
  • Near-duplicate member pair (56 shared lines) lib/screens/anime/misc/calendar.dart:948 — lib/screens/anime/misc/calendar.dart:948-1061 | lib/widgets/media_items/media_item.dart:252-362 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (56 shared lines) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:24 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:24-112 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1047-1470 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:374 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:374-409 | lib/screens/anime/watch/controls/widgets/progress_slider.dart:291-344 | lib/screens/anime/widgets/video_slider.dart:53-87 | lib/widgets/common/anymex_slider_m3.dart:403-438 | lib/widgets/common/slider_semantics.dart:139-172 | lib/widgets/common/slider_semantics.dart:284-313 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:795 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:795-837 | lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:853-908 | lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:947-1015 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:701-728 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:744-799 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:838-906 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lib/screens/library/editor/history_editor.dart:261 — lib/screens/library/editor/history_editor.dart:261-359 | lib/screens/library/editor/history_editor.dart:361-459 | lib/screens/library/editor/history_editor.dart:795-884 | lib/screens/library/editor/list_editor.dart:165-320 | lib/screens/library/editor/list_editor.dart:322-383 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lib/screens/local_source/local_source_view.dart:492 — lib/screens/local_source/local_source_view.dart:492-575 | lib/screens/local_source/local_source_view.dart:577-643 | lib/screens/local_source/local_source_view.dart:645-711 | lib/screens/local_source/local_source_view.dart:713-768 | lib/screens/local_source/local_source_view.dart:1131-1259 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (71 lines × 2) · ×2
  • Duplicated block (71 lines × 2) lib/screens/anime/widgets/episode/styles/compact_style.dart:82 — lib/screens/anime/widgets/episode/styles/compact_style.dart:82-152 | lib/screens/anime/widgets/episode/styles/detailed_style.dart:82-152 — before extracting anything, compare `lib/screens/anime/widgets/episode/styles/compact_style.dart` and `lib/screens/anime/widgets/episode/styles/detailed_style.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 131 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (71 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:1029 — lib/screens/anime/widgets/episode_list_builder.dart:1029-1099 | lib/screens/manga/widgets/chapter_list_builder.dart:1160-1230 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (65 lines × 2) · ×2
  • Duplicated block (65 lines × 2) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:246 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:246-310 | lib/widgets/common/anymex_slider_m3.dart:275-339 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 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 (65 lines × 2) lib/screens/profile/profile_page.dart:882 — lib/screens/profile/profile_page.dart:882-946 | lib/screens/profile/user_profile_page.dart:815-879 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×2
  • Duplicated block (44 lines × 2) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:312 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:312-355 | lib/widgets/common/anymex_slider_m3.dart:341-384 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 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 (44 lines × 2) lib/screens/anime/widgets/episode_section.dart:244 — lib/screens/anime/widgets/episode_section.dart:244-287 | lib/screens/manga/widgets/chapter_section.dart:243-286 — 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 · Duplicated block (43–44 lines × 2) · ×2
  • Duplicated block (43–44 lines × 2) lib/screens/library/online/anime_list.dart:342 — lib/screens/library/online/anime_list.dart:342-384 | lib/screens/library/online/manga_list.dart:325-368 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (43–44 lines × 2) lib/screens/profile/profile_page.dart:688 — lib/screens/profile/profile_page.dart:688-730 | lib/screens/profile/user_profile_page.dart:659-702 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×2
  • Duplicated block (43 lines × 2) lib/screens/anime/widgets/anime_stats.dart:228 — lib/screens/anime/widgets/anime_stats.dart:228-270 | lib/screens/manga/widgets/manga_stats.dart:681-723 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 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 (43 lines × 2) lib/screens/settings/sub_settings/settings_moderation.dart:332 — lib/screens/settings/sub_settings/settings_moderation.dart:332-374 | lib/screens/settings/sub_settings/settings_moderation.dart:376-418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×2
  • Duplicated block (40 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:388 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:388-427 | lib/widgets/watchium/watchium_create_dialog.dart:221-260 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 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 (40 lines × 2) lib/widgets/media_items/media_peek_popup.dart:1229 — lib/widgets/media_items/media_peek_popup.dart:1229-1268 | lib/widgets/non_widgets/reasons_sheet.dart:909-948 — before extracting anything, compare `lib/widgets/media_items/media_peek_popup.dart` and `lib/widgets/non_widgets/reasons_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×2
  • Duplicated block (37 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:1216 — lib/controllers/services/anilist/anilist_auth.dart:1216-1252 | lib/controllers/services/anilist/anilist_auth.dart:1276-1312 — both copies are in the same file, so extract the 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 (37 lines × 2) lib/screens/anime/widgets/anime_stats.dart:719 — lib/screens/anime/widgets/anime_stats.dart:719-755 | lib/screens/manga/widgets/manga_stats.dart:761-797 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (35–36 lines × 2) · ×2
  • Duplicated block (35–36 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:553 — lib/screens/anime/widgets/episode_list_builder.dart:553-587 | lib/screens/anime/widgets/episode_list_builder.dart:690-725 — both copies are in the same file, so extract the 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 (35–36 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:926 — lib/screens/anime/widgets/episode_list_builder.dart:926-960 | lib/screens/manga/widgets/chapter_list_builder.dart:481-516 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) lib/screens/downloads/download_screen.dart:1118 — lib/screens/downloads/download_screen.dart:1118-1150 | lib/screens/downloads/download_screen.dart:1393-1425 — both copies are in the same file, so extract the 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 (33 lines × 2) lib/utils/media_share.dart:123 — lib/utils/media_share.dart:123-155 | lib/utils/media_share.dart:158-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–31 lines × 2) · ×2
  • Duplicated block (25–31 lines × 2) lib/screens/profile/widgets/social_tab.dart:300 — lib/screens/profile/widgets/social_tab.dart:300-330 | lib/widgets/non_widgets/activity_card.dart:383-407 — before extracting anything, compare `lib/screens/profile/widgets/social_tab.dart` and `lib/widgets/non_widgets/activity_card.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (25–31 lines × 2) lib/utils/anime_themes_api.dart:12 — lib/utils/anime_themes_api.dart:12-42 | lib/utils/anime_themes_api.dart:105-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×2
  • Duplicated block (28–29 lines × 2) lib/screens/library/online/anime_list.dart:302 — lib/screens/library/online/anime_list.dart:302-329 | lib/screens/profile/widgets/user_media_list_page.dart:249-277 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/profile/widgets/user_media_list_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 270 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 (28–29 lines × 2) lib/screens/profile/profile_page.dart:611 — lib/screens/profile/profile_page.dart:611-638 | lib/screens/profile/user_profile_page.dart:579-607 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×2
  • Duplicated block (25–26 lines × 2) lib/screens/manga/controller/reader_controller.dart:688 — lib/screens/manga/controller/reader_controller.dart:688-712 | lib/screens/manga/controller/reader_controller.dart:1510-1535 — both copies are in the same file, so extract the 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 (25–26 lines × 2) lib/screens/profile/widgets/profile_header.dart:460 — lib/screens/profile/widgets/profile_header.dart:460-485 | lib/screens/profile/widgets/user_profile_header.dart:434-458 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×2
  • Duplicated block (24 lines × 3) lib/controllers/discord/discord_rpc.dart:566 — lib/controllers/discord/discord_rpc.dart:566-589 | lib/controllers/discord/discord_rpc.dart:687-710 | lib/controllers/discord/discord_rpc.dart:799-822 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (24 lines × 3) lib/screens/settings/sub_settings/settings_theme.dart:854 — lib/screens/settings/sub_settings/settings_theme.dart:854-877 | lib/screens/settings/sub_settings/settings_theme.dart:891-914 | lib/screens/settings/sub_settings/settings_theme.dart:929-952 — 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.
D4 · Code Duplication · Duplicated block (23–24 lines × 3) · ×2
  • Duplicated block (23–24 lines × 3) lib/screens/anime/widgets/comments/comments_section.dart:2473 — lib/screens/anime/widgets/comments/comments_section.dart:2473-2496 | lib/screens/anime/widgets/comments/comments_section.dart:2562-2584 | lib/screens/anime/widgets/comments/comments_section.dart:2646-2669 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (23–24 lines × 3) lib/screens/library/online/anime_list.dart:746 — lib/screens/library/online/anime_list.dart:746-768 | lib/screens/library/online/manga_list.dart:730-753 | lib/screens/profile/widgets/user_media_list_page.dart:627-649 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–21 lines × 3) · ×2
  • Duplicated block (20–21 lines × 3) lib/screens/anime/watch/controls/top_controls.dart:229 — lib/screens/anime/watch/controls/top_controls.dart:229-249 | lib/screens/anime/watch/controls/top_controls.dart:400-420 | lib/screens/anime/watch/controls/top_controls.dart:479-498 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (20–21 lines × 3) lib/services/commentum_service.dart:437 — lib/services/commentum_service.dart:437-457 | lib/services/commentum_service.dart:631-651 | lib/services/commentum_service.dart:997-1016 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18–21 lines × 3) · ×2
  • Duplicated block (18–21 lines × 3) lib/screens/library/online/anime_list.dart:292 — lib/screens/library/online/anime_list.dart:292-309 | lib/screens/library/online/manga_list.dart:271-288 | lib/screens/profile/widgets/user_media_list_page.dart:237-257 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18–21 lines × 3) lib/screens/profile/activity_details_page.dart:620 — lib/screens/profile/activity_details_page.dart:620-637 | lib/screens/profile/widgets/social_tab.dart:274-294 | lib/widgets/non_widgets/activity_card.dart:369-386 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/screens/profile/widgets/social_tab.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×2
  • Duplicated block (16–20 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:1009 — lib/screens/profile/compatibility/compatibility_result_page.dart:1009-1024 | lib/screens/profile/compatibility/compatibility_result_page.dart:1858-1877 — both copies are in the same file, so extract the 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 (16–20 lines × 2) lib/utils/color_profiler.dart:667 — lib/utils/color_profiler.dart:667-682 | lib/utils/color_profiler.dart:854-873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 4) · ×2
  • Duplicated block (18–19 lines × 4) lib/screens/settings/sub_settings/settings_player.dart:2013 — lib/screens/settings/sub_settings/settings_player.dart:2013-2030 | lib/screens/settings/sub_settings/settings_player.dart:2033-2050 | lib/screens/settings/sub_settings/settings_player.dart:2053-2071 | lib/screens/settings/sub_settings/settings_player.dart:2074-2091 — 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 (18–19 lines × 4) lib/utils/color_profiler.dart:595 — lib/utils/color_profiler.dart:595-613 | lib/utils/color_profiler.dart:794-812 | lib/utils/color_profiler.dart:1031-1048 | lib/utils/color_profiler.dart:1306-1324 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×2
  • Duplicated block (19 lines × 3) lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:198 — lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:198-216 | lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:181-199 | lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:331-349 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (19 lines × 3) lib/screens/anime/widgets/episode_list_builder.dart:529 — lib/screens/anime/widgets/episode_list_builder.dart:529-547 | lib/screens/anime/widgets/episode_list_builder.dart:565-583 | lib/screens/anime/widgets/episode_list_builder.dart:702-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.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×2
  • Duplicated block (18 lines × 4) lib/screens/library/widgets/library_deps.dart:164 — lib/screens/library/widgets/library_deps.dart:164-181 | lib/widgets/common/custom_tiles.dart:151-168 | lib/widgets/common/custom_tiles.dart:245-262 | lib/widgets/common/custom_tiles.dart:345-362 — before extracting anything, compare `lib/screens/library/widgets/library_deps.dart` and `lib/widgets/common/custom_tiles.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (18 lines × 4) lib/screens/settings/sub_settings/settings_player.dart:882 — lib/screens/settings/sub_settings/settings_player.dart:882-899 | lib/screens/settings/sub_settings/settings_player.dart:902-919 | lib/screens/settings/sub_settings/settings_player.dart:922-939 | lib/screens/settings/sub_settings/settings_player.dart:941-959 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×2
  • Duplicated block (18 lines × 3) lib/screens/anime/watch/controls/widgets/audio_popup.dart:250 — lib/screens/anime/watch/controls/widgets/audio_popup.dart:250-267 | lib/screens/anime/watch/controls/widgets/source_popup.dart:164-181 | lib/screens/anime/watch/controls/widgets/tracks_popup.dart:259-276 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/source_popup.dart` and `lib/screens/anime/watch/controls/widgets/tracks_popup.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 3) lib/screens/anime/widgets/anime_stats.dart:614 — lib/screens/anime/widgets/anime_stats.dart:614-631 | lib/screens/anime/widgets/anime_stats.dart:663-680 | lib/screens/manga/widgets/manga_stats.dart:317-334 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×2
  • Duplicated block (16–17 lines × 3) lib/screens/anime/watch/controls/widgets/episodes_pane.dart:260 — lib/screens/anime/watch/controls/widgets/episodes_pane.dart:260-275 | lib/screens/anime/widgets/episode_list_builder.dart:506-521 | lib/screens/anime/widgets/episode_list_builder.dart:590-606 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (16–17 lines × 3) lib/screens/anime/widgets/anime_stats.dart:282 — lib/screens/anime/widgets/anime_stats.dart:282-298 | lib/screens/anime/widgets/anime_stats.dart:347-362 | lib/screens/manga/widgets/manga_stats.dart:398-413 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×2
  • Duplicated block (13–15 lines × 2) lib/controllers/services/anilist/anilist_data.dart:310 — lib/controllers/services/anilist/anilist_data.dart:310-322 | lib/controllers/services/mal/mal_service.dart:163-177 — before extracting anything, compare `lib/controllers/services/anilist/anilist_data.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (13–15 lines × 2) lib/screens/manga/widgets/chapter_list_builder.dart:852 — lib/screens/manga/widgets/chapter_list_builder.dart:852-866 | lib/screens/novel/details/widgets/chapter_item.dart:142-154 — 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 · Duplicated block (14 lines × 4) · ×2
  • Duplicated block (14 lines × 4) lib/screens/anime/widgets/episode_list_builder.dart:557 — lib/screens/anime/widgets/episode_list_builder.dart:557-570 | lib/screens/anime/widgets/episode_list_builder.dart:637-650 | lib/screens/anime/widgets/episode_list_builder.dart:694-707 | lib/screens/anime/widgets/episode_list_builder.dart:733-746 — 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 (14 lines × 4) lib/utils/color_profiler.dart:366 — lib/utils/color_profiler.dart:366-379 | lib/utils/color_profiler.dart:388-401 | lib/utils/color_profiler.dart:408-421 | lib/utils/color_profiler.dart:436-449 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×2
  • Duplicated block (12–14 lines × 2) lib/screens/downloads/widgets/downloaded_media_view.dart:1193 — lib/screens/downloads/widgets/downloaded_media_view.dart:1193-1204 | lib/screens/search/widgets/search_widgets.dart:794-807 — 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 (12–14 lines × 2) lib/screens/manga/widgets/reader/continuous_reader.dart:435 — lib/screens/manga/widgets/reader/continuous_reader.dart:435-446 | lib/screens/manga/widgets/reader/reader_view.dart:380-393 — before extracting anything, compare `lib/screens/manga/widgets/reader/continuous_reader.dart` and `lib/screens/manga/widgets/reader/reader_view.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) lib/screens/anime/widgets/episode_list_builder.dart:1068 — lib/screens/anime/widgets/episode_list_builder.dart:1068-1078 | lib/screens/anime/widgets/episode_list_builder.dart:1156-1166 | lib/screens/manga/widgets/chapter_list_builder.dart:1199-1209 | lib/screens/manga/widgets/chapter_list_builder.dart:1278-1288 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 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 (11 lines × 4) lib/screens/downloads/widgets/downloaded_media_view.dart:470 — lib/screens/downloads/widgets/downloaded_media_view.dart:470-480 | lib/screens/downloads/widgets/downloaded_media_view.dart:858-869 | lib/screens/downloads/widgets/downloaded_media_view.dart:1067-1077 | lib/screens/extensions/ExtensionItem.dart:238-248 — before extracting anything, compare `lib/screens/downloads/widgets/downloaded_media_view.dart` and `lib/screens/extensions/ExtensionItem.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×2
  • Duplicated block (10–11 lines × 3) lib/screens/anime/home_page.dart:126 — lib/screens/anime/home_page.dart:126-135 | lib/screens/manga/home_page.dart:52-62 | lib/screens/novel/home_page.dart:42-52 — `lib/screens/anime/home_page.dart` and `lib/screens/manga/home_page.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (10–11 lines × 3) lib/services/commentum_service.dart:1074 — lib/services/commentum_service.dart:1074-1083 | lib/services/commentum_service.dart:1108-1117 | lib/services/commentum_service.dart:1228-1238 — 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.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×2
  • Duplicated block (8–11 lines × 2) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:139 — lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:139-146 | lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:286-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–11 lines × 2) lib/models/Media/media.dart:249 — lib/models/Media/media.dart:249-256 | lib/models/Media/media.dart:446-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×2
  • Duplicated block (9–11 lines × 2) lib/screens/anime/misc/dub_service.dart:184 — lib/screens/anime/misc/dub_service.dart:184-192 | lib/screens/anime/misc/dub_service.dart:213-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–11 lines × 2) lib/screens/settings/sub_settings/settings_player.dart:2683 — lib/screens/settings/sub_settings/settings_player.dart:2683-2691 | lib/widgets/common/unified_source_section.dart:103-113 — 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 · Duplicated block (10 lines × 4) · ×2
  • Duplicated block (10 lines × 4) lib/screens/anime/widgets/list_editor.dart:647 — lib/screens/anime/widgets/list_editor.dart:647-656 | lib/screens/anime/widgets/list_editor.dart:774-783 | lib/widgets/common/source_selector.dart:542-552 | lib/widgets/header/header.dart:539-549 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (10 lines × 4) lib/screens/downloads/widgets/downloaded_media_view.dart:492 — lib/screens/downloads/widgets/downloaded_media_view.dart:492-501 | lib/screens/downloads/widgets/downloaded_media_view.dart:882-891 | lib/screens/downloads/widgets/downloaded_media_view.dart:1091-1100 | lib/screens/extensions/ExtensionItem.dart:262-271 — before extracting anything, compare `lib/screens/downloads/widgets/downloaded_media_view.dart` and `lib/screens/extensions/ExtensionItem.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×2
  • Duplicated block (7–10 lines × 2) lib/controllers/source/source_mapper.dart:225 — lib/controllers/source/source_mapper.dart:225-234 | lib/controllers/source/source_mapper.dart:237-243 — both copies are in the same file, so extract the 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–10 lines × 2) lib/screens/downloads/widgets/manga_chapter_download_confirm.dart:122 — lib/screens/downloads/widgets/manga_chapter_download_confirm.dart:122-128 | lib/utils/updater.dart:599-608 — 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 · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:591 — lib/controllers/services/anilist/anilist_auth.dart:591-598 | lib/controllers/services/anilist/anilist_auth.dart:752-760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) lib/screens/library/widgets/unified_history_card.dart:207 — lib/screens/library/widgets/unified_history_card.dart:207-214 | lib/widgets/anime/continue_watching_cards.dart:39-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×2
  • Duplicated block (7–9 lines × 2) lib/screens/extensions/widgets/plugin_manager.dart:125 — lib/screens/extensions/widgets/plugin_manager.dart:125-133 | lib/screens/extensions/widgets/plugin_manager.dart:174-180 — both copies are in the same file, so extract the 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–9 lines × 2) lib/screens/profile/compatibility/compatibility_result_page.dart:915 — lib/screens/profile/compatibility/compatibility_result_page.dart:915-923 | lib/screens/profile/compatibility/compatibility_result_page.dart:981-987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×2
  • Duplicated block (8 lines × 6) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:807 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:807-814 | lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:865-872 | lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:966-973 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:708-715 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:756-763 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:857-864 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 6) lib/screens/anime/widgets/episode_list_builder.dart:1001 — lib/screens/anime/widgets/episode_list_builder.dart:1001-1008 | lib/screens/anime/widgets/episode_list_builder.dart:1033-1040 | lib/screens/manga/widgets/chapter_list_builder.dart:1132-1139 | lib/screens/manga/widgets/chapter_list_builder.dart:1164-1171 | lib/screens/search/widgets/search_widgets.dart:2249-2258 | lib/widgets/watchium/watchium_party_popup.dart:764-771 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×2
  • Duplicated block (8 lines × 5) lib/screens/anime/widgets/anime_stats.dart:605 — lib/screens/anime/widgets/anime_stats.dart:605-615 | lib/screens/anime/widgets/anime_stats.dart:731-740 | lib/screens/manga/widgets/manga_stats.dart:308-318 | lib/screens/manga/widgets/manga_stats.dart:773-782 | lib/screens/profile/widgets/profile_stats_tab.dart:427-434 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 5) lib/screens/anime/widgets/episode_list_builder.dart:1067 — lib/screens/anime/widgets/episode_list_builder.dart:1067-1074 | lib/screens/anime/widgets/episode_list_builder.dart:1155-1162 | lib/screens/manga/widgets/chapter_list_builder.dart:1198-1205 | lib/screens/manga/widgets/chapter_list_builder.dart:1277-1284 | lib/widgets/watchium/watchium_party_popup.dart:553-561 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×2
  • Duplicated block (6–7 lines × 3) lib/screens/downloads/controller/download_controller.dart:1890 — lib/screens/downloads/controller/download_controller.dart:1890-1896 | lib/screens/downloads/controller/download_controller.dart:1948-1953 | lib/screens/downloads/controller/download_controller.dart:1980-1985 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6–7 lines × 3) lib/screens/library/widgets/library_deps.dart:247 — lib/screens/library/widgets/library_deps.dart:247-252 | lib/widgets/common/no_source.dart:20-25 | lib/widgets/common/unified_source_section.dart:68-74 — 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.
C2 · Access Controls · No authorization · ×1
  • No authorization lib/services/cast/cast_proxy_server.dart:29 — This repository serves requests — an HTTP server (HttpServer.bind) (lib/services/cast/cast_proxy_server.dart:29) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
D1 · Cyclomatic Complexity · Media.fromSimkl (cyclomatic 99) · ×1
  • Media.fromSimkl (cyclomatic 99) lib/models/Media/media.dart:489 — Media.fromSimkl has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TachiyomiBackupParser.parseBytes (cyclomatic 90) · ×1
  • TachiyomiBackupParser.parseBytes (cyclomatic 90) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:31 — TachiyomiBackupParser.parseBytes has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CharacterStaffSheetContentState.build (cyclomatic 78) · ×1
  • _CharacterStaffSheetContentState.build (cyclomatic 78) lib/screens/anime/widgets/character_staff_sheet.dart:140 — _CharacterStaffSheetContentState.build has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SourceMapper.mapMedia (cyclomatic 74) · ×1
  • SourceMapper.mapMedia (cyclomatic 74) lib/controllers/source/source_mapper.dart:86 — SourceMapper.mapMedia has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupRestoreService._applyExternalMangaAndAnime (cyclomatic 63) · ×1
  • BackupRestoreService._applyExternalMangaAndAnime (cyclomatic 63) lib/controllers/services/backup_restore/backup_restore_service.dart:1654 — BackupRestoreService._applyExternalMangaAndAnime has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupRestoreService._applyBackupData (cyclomatic 56) · ×1
  • BackupRestoreService._applyBackupData (cyclomatic 56) lib/controllers/services/backup_restore/backup_restore_service.dart:580 — BackupRestoreService._applyBackupData has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KotatsuBackupParser.parse (cyclomatic 51) · ×1
  • KotatsuBackupParser.parse (cyclomatic 51) lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:18 — KotatsuBackupParser.parse has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerController._bindPlayerStreams (cyclomatic 51) · ×1
  • PlayerController._bindPlayerStreams (cyclomatic 51) lib/screens/anime/watch/controller/player_controller.dart:1228 — PlayerController._bindPlayerStreams has cyclomatic complexity 51 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BackupRestoreService.getBackupInfo (cyclomatic 49) · ×1
  • BackupRestoreService.getBackupInfo (cyclomatic 49) lib/controllers/services/backup_restore/backup_restore_service.dart:1306 — BackupRestoreService.getBackupInfo has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UserProfileHeaderState.build (cyclomatic 49) · ×1
  • _UserProfileHeaderState.build (cyclomatic 49) lib/screens/profile/widgets/user_profile_header.dart:62 — _UserProfileHeaderState.build has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReaderSettings.showSettings (cyclomatic 48) · ×1
  • ReaderSettings.showSettings (cyclomatic 48) lib/screens/manga/widgets/reader/settings_view.dart:19 — ReaderSettings.showSettings has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _MediaDetailsPageState._buildContinueButton (cyclomatic 45) · ×1
  • _MediaDetailsPageState._buildContinueButton (cyclomatic 45) lib/screens/anime/details/media_details_page.dart:505 — _MediaDetailsPageState._buildContinueButton has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CommentsRepliesSheetState._buildCommentCard (cyclomatic 45) · ×1
  • _CommentsRepliesSheetState._buildCommentCard (cyclomatic 45) lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:158 — _CommentsRepliesSheetState._buildCommentCard has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DownloadController._syncMediaFolderMeta (cyclomatic 45) · ×1
  • DownloadController._syncMediaFolderMeta (cyclomatic 45) lib/screens/downloads/controller/download_controller.dart:1660 — DownloadController._syncMediaFolderMeta has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Media.fromFullMAL (cyclomatic 43) · ×1
  • Media.fromFullMAL (cyclomatic 43) lib/models/Media/media.dart:340 — Media.fromFullMAL has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DubService.fetchDubSources (cyclomatic 43) · ×1
  • DubService.fetchDubSources (cyclomatic 43) lib/screens/anime/misc/dub_service.dart:10 — DubService.fetchDubSources has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Media.fromJson (cyclomatic 42) · ×1
  • Media.fromJson (cyclomatic 42) lib/models/Media/media.dart:1042 — Media.fromJson has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SettingsExtensionManagerState._buildPluginStatusCard (cyclomatic 42) · ×1
  • _SettingsExtensionManagerState._buildPluginStatusCard (cyclomatic 42) lib/screens/settings/sub_settings/settings_extension_manager.dart:467 — _SettingsExtensionManagerState._buildPluginStatusCard 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.
D1 · Cyclomatic Complexity · _ControlButtonState.build (cyclomatic 40) · ×1
  • _ControlButtonState.build (cyclomatic 40) lib/screens/anime/watch/controls/widgets/control_button.dart:76 — _ControlButtonState.build has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _AnilistAboutMeState.build (cyclomatic 40) · ×1
  • _AnilistAboutMeState.build (cyclomatic 40) lib/utils/al_about_me.dart:205 — _AnilistAboutMeState.build has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UserSearchSheetState.build (cyclomatic 39) · ×1
  • _UserSearchSheetState.build (cyclomatic 39) lib/screens/settings/sub_settings/settings_moderation.dart:302 — _UserSearchSheetState.build has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackedMedia.effectiveProgress (cyclomatic 38) · ×1
  • TrackedMedia.effectiveProgress (cyclomatic 38) lib/models/Anilist/anilist_media_user.dart:54 — TrackedMedia.effectiveProgress has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaDetailsController.getContinueChapter (cyclomatic 38) · ×1
  • MediaDetailsController.getContinueChapter (cyclomatic 38) lib/screens/anime/details/controller/media_details_controller.dart:924 — MediaDetailsController.getContinueChapter has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Media.fromMAL (cyclomatic 37) · ×1
  • Media.fromMAL (cyclomatic 37) lib/models/Media/media.dart:165 — Media.fromMAL has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaDetailsController._fetchContentFromSource (cyclomatic 37) · ×1
  • MediaDetailsController._fetchContentFromSource (cyclomatic 37) lib/screens/anime/details/controller/media_details_controller.dart:509 — MediaDetailsController._fetchContentFromSource has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _RestorePreviewSheetState._buildGroupedOptions (cyclomatic 36) · ×1
  • _RestorePreviewSheetState._buildGroupedOptions (cyclomatic 36) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:592 — _RestorePreviewSheetState._buildGroupedOptions has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ActivityComposerSheetState.build (cyclomatic 36) · ×1
  • ActivityComposerSheetState.build (cyclomatic 36) lib/widgets/non_widgets/activity_composer_sheet.dart:433 — ActivityComposerSheetState.build has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistData.fetchFilterData (cyclomatic 35) · ×1
  • AnilistData.fetchFilterData (cyclomatic 35) lib/controllers/services/anilist/anilist_data.dart:1226 — AnilistData.fetchFilterData has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BottomControls._buildLayout (cyclomatic 35) · ×1
  • BottomControls._buildLayout (cyclomatic 35) lib/screens/anime/watch/controls/bottom_controls.dart:229 — BottomControls._buildLayout has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DownloadScreenState._buildEpisodeStep (cyclomatic 34) · ×1
  • _DownloadScreenState._buildEpisodeStep (cyclomatic 34) lib/screens/downloads/download_screen.dart:861 — _DownloadScreenState._buildEpisodeStep has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ReaderController.handleMouseScroll (cyclomatic 34) · ×1
  • ReaderController.handleMouseScroll (cyclomatic 34) lib/screens/manga/controller/reader_controller.dart:1140 — ReaderController.handleMouseScroll has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UserProfileAppBarState.build (cyclomatic 34) · ×1
  • _UserProfileAppBarState.build (cyclomatic 34) lib/screens/profile/widgets/user_profile_app_bar.dart:61 — _UserProfileAppBarState.build has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BackupRestoreService._buildBackupData (cyclomatic 33) · ×1
  • BackupRestoreService._buildBackupData (cyclomatic 33) lib/controllers/services/backup_restore/backup_restore_service.dart:447 — BackupRestoreService._buildBackupData has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RecommendSheetState._buildAlreadyAdded (cyclomatic 33) · ×1
  • _RecommendSheetState._buildAlreadyAdded (cyclomatic 33) lib/widgets/non_widgets/recommend_sheet.dart:709 — _RecommendSheetState._buildAlreadyAdded has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CookieManager.parseSingleCookie (cyclomatic 32) · ×1
  • CookieManager.parseSingleCookie (cyclomatic 32) lib/controllers/network/cookie_manager.dart:258 — CookieManager.parseSingleCookie has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MobileProfileHeaderSliver.build (cyclomatic 31) · ×1
  • MobileProfileHeaderSliver.build (cyclomatic 31) lib/screens/profile/widgets/profile_header.dart:614 — MobileProfileHeaderSliver.build has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _BackupRestorePageState._buildImportSection (cyclomatic 31) · ×1
  • _BackupRestorePageState._buildImportSection (cyclomatic 31) lib/screens/settings/sub_settings/settings_backup.dart:411 — _BackupRestorePageState._buildImportSection has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SubsamplingScaleImageViewState.build (cyclomatic 31) · ×1
  • _SubsamplingScaleImageViewState.build (cyclomatic 31) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:1397 — _SubsamplingScaleImageViewState.build has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MainActivity.configureFlutterEngine (cyclomatic 31) · ×1
  • MainActivity.configureFlutterEngine (cyclomatic 31) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:81 — MainActivity.configureFlutterEngine has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CommentSectionState._showUserHistoryDialog (cyclomatic 30) · ×1
  • _CommentSectionState._showUserHistoryDialog (cyclomatic 30) lib/screens/anime/widgets/comments/comments_section.dart:3640 — _CommentSectionState._showUserHistoryDialog has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _SearchPageState._performSearch (cyclomatic 30) · ×1
  • _SearchPageState._performSearch (cyclomatic 30) lib/screens/search/search_view.dart:216 — _SearchPageState._performSearch has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CompatibilityController.runMatch (cyclomatic 29) · ×1
  • CompatibilityController.runMatch (cyclomatic 29) lib/controllers/services/anilist/compatibility_controller.dart:30 — CompatibilityController.runMatch has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupRestoreService.restoreBackup (cyclomatic 29) · ×1
  • BackupRestoreService.restoreBackup (cyclomatic 29) lib/controllers/services/backup_restore/backup_restore_service.dart:1132 — BackupRestoreService.restoreBackup has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaDetailsController._initOfflineAndTrackedData (cyclomatic 29) · ×1
  • MediaDetailsController._initOfflineAndTrackedData (cyclomatic 29) lib/screens/anime/details/controller/media_details_controller.dart:334 — MediaDetailsController._initOfflineAndTrackedData has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ThemeRenderer._doAction (cyclomatic 29) · ×1
  • ThemeRenderer._doAction (cyclomatic 29) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1167 — ThemeRenderer._doAction has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ActiveDownloads._buildActiveTaskCard (cyclomatic 29) · ×1
  • ActiveDownloads._buildActiveTaskCard (cyclomatic 29) lib/screens/downloads/nested_screens/active_downloads/active_downloads.dart:89 — ActiveDownloads._buildActiveTaskCard has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UserStatsPageState._buildHeatmapSection (cyclomatic 29) · ×1
  • _UserStatsPageState._buildHeatmapSection (cyclomatic 29) lib/screens/stats/user_stats_page.dart:549 — _UserStatsPageState._buildHeatmapSection has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _VisualsPopupState._saveImage (cyclomatic 29) · ×1
  • _VisualsPopupState._saveImage (cyclomatic 29) lib/widgets/anime/visuals/visuals_popup.dart:162 — _VisualsPopupState._saveImage has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _FullscreenImageViewerState._saveImage (cyclomatic 29) · ×1
  • _FullscreenImageViewerState._saveImage (cyclomatic 29) lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:27 — _FullscreenImageViewerState._saveImage has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaModeSelector.build (cyclomatic 29) · ×1
  • MediaModeSelector.build (cyclomatic 29) lib/widgets/common/media_mode_selector.dart:109 — MediaModeSelector.build has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CommentSectionState._buildCommentItem (cyclomatic 28) · ×1
  • _CommentSectionState._buildCommentItem (cyclomatic 28) lib/screens/anime/widgets/comments/comments_section.dart:1852 — _CommentSectionState._buildCommentItem has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _LeaderboardSheetState._buildLeaderboardTile (cyclomatic 28) · ×1
  • _LeaderboardSheetState._buildLeaderboardTile (cyclomatic 28) lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart:324 — _LeaderboardSheetState._buildLeaderboardTile has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _PressableHighlightCardState.build (cyclomatic 28) · ×1
  • _PressableHighlightCardState.build (cyclomatic 28) lib/screens/profile/widgets/stats_overview_cards.dart:461 — _PressableHighlightCardState.build has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ActivityCardState.build (cyclomatic 28) · ×1
  • _ActivityCardState.build (cyclomatic 28) lib/widgets/non_widgets/activity_card.dart:522 — _ActivityCardState.build has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ActivityComposerSheetState._buildFormatButton (cyclomatic 28) · ×1
  • ActivityComposerSheetState._buildFormatButton (cyclomatic 28) lib/widgets/non_widgets/activity_composer_sheet.dart:183 — ActivityComposerSheetState._buildFormatButton has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistData.anilistSearch (cyclomatic 27) · ×1
  • AnilistData.anilistSearch (cyclomatic 27) lib/controllers/services/anilist/anilist_data.dart:948 — AnilistData.anilistSearch has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SyncSubsContentState._buildCueViewer (cyclomatic 27) · ×1
  • _SyncSubsContentState._buildCueViewer (cyclomatic 27) lib/screens/anime/watch/controls/widgets/sync_subs_popup.dart:194 — _SyncSubsContentState._buildCueViewer has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WrongTitleModalState.build (cyclomatic 27) · ×1
  • _WrongTitleModalState.build (cyclomatic 27) lib/screens/anime/widgets/wrongtitle_modal.dart:90 — _WrongTitleModalState.build has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DownloadController.resyncDownloads (cyclomatic 27) · ×1
  • DownloadController.resyncDownloads (cyclomatic 27) lib/screens/downloads/controller/download_controller.dart:1553 — DownloadController.resyncDownloads has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReaderController._onPositionChanged (cyclomatic 27) · ×1
  • ReaderController._onPositionChanged (cyclomatic 27) lib/screens/manga/controller/reader_controller.dart:1267 — ReaderController._onPositionChanged has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ReadingModePage.build (cyclomatic 27) · ×1
  • _ReadingModePage.build (cyclomatic 27) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:162 — _ReadingModePage.build has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _ProfilePageState._buildOverviewTab (cyclomatic 27) · ×1
  • _ProfilePageState._buildOverviewTab (cyclomatic 27) lib/screens/profile/profile_page.dart:754 — _ProfilePageState._buildOverviewTab has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _UserProfilePageState._buildOverviewTab (cyclomatic 27) · ×1
  • _UserProfilePageState._buildOverviewTab (cyclomatic 27) lib/screens/profile/user_profile_page.dart:726 — _UserProfilePageState._buildOverviewTab has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _FuturisticFilterSheetState._loadCurrentFilters (cyclomatic 27) · ×1
  • _FuturisticFilterSheetState._loadCurrentFilters (cyclomatic 27) lib/screens/search/widgets/search_widgets.dart:520 — _FuturisticFilterSheetState._loadCurrentFilters has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MangaAnimeUtil.getNextChapterPrediction (cyclomatic 27) · ×1
  • MangaAnimeUtil.getNextChapterPrediction (cyclomatic 27) lib/utils/anime_adaptation_util.dart:98 — MangaAnimeUtil.getNextChapterPrediction has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _FilterScreenState._getNavItemForTab (cyclomatic 26) · ×1
  • _FilterScreenState._getNavItemForTab (cyclomatic 26) lib/main.dart:564 — _FilterScreenState._getNavItemForTab has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupRestoreService.exportBackupToExternal (cyclomatic 26) · ×1
  • BackupRestoreService.exportBackupToExternal (cyclomatic 26) lib/controllers/services/backup_restore/backup_restore_service.dart:899 — BackupRestoreService.exportBackupToExternal has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CompatibilityResultPageState._buildSectionGrid (cyclomatic 26) · ×1
  • _CompatibilityResultPageState._buildSectionGrid (cyclomatic 26) lib/screens/profile/compatibility/compatibility_result_page.dart:621 — _CompatibilityResultPageState._buildSectionGrid has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DesktopProfileHeader.build (cyclomatic 26) · ×1
  • DesktopProfileHeader.build (cyclomatic 26) lib/screens/profile/widgets/profile_header.dart:73 — DesktopProfileHeader.build has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BackupFormatDetector.detectFromBytes (cyclomatic 25) · ×1
  • BackupFormatDetector.detectFromBytes (cyclomatic 25) lib/controllers/services/backup_restore/backup_format_detector.dart:15 — BackupFormatDetector.detectFromBytes has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Character.fromJson (cyclomatic 25) · ×1
  • Character.fromJson (cyclomatic 25) lib/models/Media/character.dart:38 — Character.fromJson has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnimeTheme.fromJson (cyclomatic 25) · ×1
  • AnimeTheme.fromJson (cyclomatic 25) lib/models/animethemes/anime_theme.dart:20 — AnimeTheme.fromJson has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ListEditorModalState.initState (cyclomatic 25) · ×1
  • _ListEditorModalState.initState (cyclomatic 25) lib/screens/anime/widgets/list_editor.dart:157 — _ListEditorModalState.initState has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DownloadController._onForegroundReceiveData (cyclomatic 25) · ×1
  • DownloadController._onForegroundReceiveData (cyclomatic 25) lib/screens/downloads/controller/download_controller.dart:346 — DownloadController._onForegroundReceiveData has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _HomePageState._buildNewEpisodesSection (cyclomatic 25) · ×1
  • _HomePageState._buildNewEpisodesSection (cyclomatic 25) lib/screens/home_page.dart:38 — _HomePageState._buildNewEpisodesSection has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReaderController._initTracking (cyclomatic 25) · ×1
  • ReaderController._initTracking (cyclomatic 25) lib/screens/manga/controller/reader_controller.dart:1468 — ReaderController._initTracking has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _ChapterListBuilderState._buildChapterDownloadButton (cyclomatic 25) · ×1
  • _ChapterListBuilderState._buildChapterDownloadButton (cyclomatic 25) lib/screens/manga/widgets/chapter_list_builder.dart:1043 — _ChapterListBuilderState._buildChapterDownloadButton has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _FuturisticFilterSheetState._applyFilters (cyclomatic 25) · ×1
  • _FuturisticFilterSheetState._applyFilters (cyclomatic 25) lib/screens/search/widgets/search_widgets.dart:2345 — _FuturisticFilterSheetState._applyFilters has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WatchiumPageState._buildRoomCard (cyclomatic 25) · ×1
  • _WatchiumPageState._buildRoomCard (cyclomatic 25) lib/screens/watchium/watchium_page.dart:1135 — _WatchiumPageState._buildRoomCard has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Matchmaker._computeReleaseYearOverlap (cyclomatic 25) · ×1
  • Matchmaker._computeReleaseYearOverlap (cyclomatic 25) lib/utils/compatibility/matchmaker.dart:584 — Matchmaker._computeReleaseYearOverlap has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GridAnimeCard.build (cyclomatic 25) · ×1
  • GridAnimeCard.build (cyclomatic 25) lib/widgets/media_items/media_item.dart:115 — GridAnimeCard.build has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _RecommendSheetState._userHasReason (cyclomatic 25) · ×1
  • _RecommendSheetState._userHasReason (cyclomatic 25) lib/widgets/non_widgets/recommend_sheet.dart:263 — _RecommendSheetState._userHasReason has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_RecommendSheetState._findUserReason) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · _RecommendSheetState._findUserReason (cyclomatic 25) · ×1
  • _RecommendSheetState._findUserReason (cyclomatic 25) lib/widgets/non_widgets/recommend_sheet.dart:305 — _RecommendSheetState._findUserReason has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (_RecommendSheetState._userHasReason) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · AnilistAuth.updateListEntry (cyclomatic 24) · ×1
  • AnilistAuth.updateListEntry (cyclomatic 24) lib/controllers/services/anilist/anilist_auth.dart:2186 — AnilistAuth.updateListEntry has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerController._trackOnline (cyclomatic 24) · ×1
  • PlayerController._trackOnline (cyclomatic 24) lib/screens/anime/watch/controller/player_controller.dart:2857 — PlayerController._trackOnline has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ChapterListSheetState.build (cyclomatic 24) · ×1
  • _ChapterListSheetState.build (cyclomatic 24) lib/screens/manga/widgets/reader/top_controls.dart:288 — _ChapterListSheetState.build has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NovelReaderController.onScrollNotification (cyclomatic 24) · ×1
  • NovelReaderController.onScrollNotification (cyclomatic 24) lib/screens/novel/reader/controller/reader_controller.dart:1307 — NovelReaderController.onScrollNotification has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DecorationClosetSheetState._onSavePressed (cyclomatic 24) · ×1
  • _DecorationClosetSheetState._onSavePressed (cyclomatic 24) lib/screens/profile/widgets/decoration_closet_sheet.dart:131 — _DecorationClosetSheetState._onSavePressed has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SettingsReaderState.build (cyclomatic 24) · ×1
  • _SettingsReaderState.build (cyclomatic 24) lib/screens/settings/sub_settings/settings_reader.dart:313 — _SettingsReaderState.build has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MalService.updateListEntry (cyclomatic 23) · ×1
  • MalService.updateListEntry (cyclomatic 23) lib/controllers/services/mal/mal_service.dart:785 — MalService.updateListEntry has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ThemeRenderer._buildTitleAreaThing (cyclomatic 23) · ×1
  • ThemeRenderer._buildTitleAreaThing (cyclomatic 23) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:405 — ThemeRenderer._buildTitleAreaThing has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ThemeRenderer._buildItem (cyclomatic 23) · ×1
  • ThemeRenderer._buildItem (cyclomatic 23) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:500 — ThemeRenderer._buildItem has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _DownloadScreenState._buildChapterStep (cyclomatic 23) · ×1
  • _DownloadScreenState._buildChapterStep (cyclomatic 23) lib/screens/downloads/download_screen.dart:1206 — _DownloadScreenState._buildChapterStep has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChapterListItem.build (cyclomatic 23) · ×1
  • ChapterListItem.build (cyclomatic 23) lib/screens/novel/details/widgets/chapter_item.dart:34 — ChapterListItem.build has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DesktopStatsGrid.build (cyclomatic 23) · ×1
  • DesktopStatsGrid.build (cyclomatic 23) lib/screens/profile/widgets/stats_overview_cards.dart:15 — DesktopStatsGrid.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.
D1 · Cyclomatic Complexity · AppAbiDetector.getCurrentAppAbi (cyclomatic 23) · ×1
  • AppAbiDetector.getCurrentAppAbi (cyclomatic 23) lib/utils/abi_checker.dart:8 — AppAbiDetector.getCurrentAppAbi has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdateManager.checkForUpdates (cyclomatic 23) · ×1
  • UpdateManager.checkForUpdates (cyclomatic 23) lib/utils/updater.dart:64 — UpdateManager.checkForUpdates has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdateManager._shouldUpdate (cyclomatic 23) · ×1
  • UpdateManager._shouldUpdate (cyclomatic 23) lib/utils/updater.dart:180 — UpdateManager._shouldUpdate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SubsamplingScaleImageViewState._loadFromProvider (cyclomatic 23) · ×1
  • _SubsamplingScaleImageViewState._loadFromProvider (cyclomatic 23) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:612 — _SubsamplingScaleImageViewState._loadFromProvider has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistAuth.deleteMediaFromList (cyclomatic 22) · ×1
  • AnilistAuth.deleteMediaFromList (cyclomatic 22) lib/controllers/services/anilist/anilist_auth.dart:2079 — AnilistAuth.deleteMediaFromList has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackedMedia.formattedProgress (cyclomatic 22) · ×1
  • TrackedMedia.formattedProgress (cyclomatic 22) lib/models/Anilist/anilist_media_user.dart:149 — TrackedMedia.formattedProgress has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _CalendarState.build (cyclomatic 22) · ×1
  • _CalendarState.build (cyclomatic 22) lib/screens/anime/misc/calendar.dart:434 — _CalendarState.build has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _DoubleTapSeekWidgetState.build (cyclomatic 22) · ×1
  • _DoubleTapSeekWidgetState.build (cyclomatic 22) lib/screens/anime/watch/controls/widgets/double_tap_seek.dart:820 — _DoubleTapSeekWidgetState.build has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MinimalEpisodeWidget.build (cyclomatic 22) · ×1
  • MinimalEpisodeWidget.build (cyclomatic 22) lib/screens/anime/widgets/episode/styles/minimal_style.dart:30 — MinimalEpisodeWidget.build has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ReaderController.loadNextChapterInline (cyclomatic 22) · ×1
  • ReaderController.loadNextChapterInline (cyclomatic 22) lib/screens/manga/controller/reader_controller.dart:285 — ReaderController.loadNextChapterInline has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _LogoAnimationPreviewDialogState._showAddCustomLogoDialog (cyclomatic 22) · ×1
  • _LogoAnimationPreviewDialogState._showAddCustomLogoDialog (cyclomatic 22) lib/widgets/dialogs/logo_animation_preview_dialog.dart:96 — _LogoAnimationPreviewDialogState._showAddCustomLogoDialog has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MalService.homeWidgets (cyclomatic 21) · ×1
  • MalService.homeWidgets (cyclomatic 21) lib/controllers/services/mal/mal_service.dart:321 — MalService.homeWidgets has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimklService.updateListEntry (cyclomatic 21) · ×1
  • SimklService.updateListEntry (cyclomatic 21) lib/controllers/services/simkl/simkl_service.dart:503 — SimklService.updateListEntry has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DownloadedMediaViewState._buildContinueFab (cyclomatic 21) · ×1
  • _DownloadedMediaViewState._buildContinueFab (cyclomatic 21) lib/screens/downloads/widgets/downloaded_media_view.dart:170 — _DownloadedMediaViewState._buildContinueFab has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DownloadedMediaViewState._syncBoundTrackersAfterPlay (cyclomatic 21) · ×1
  • _DownloadedMediaViewState._syncBoundTrackersAfterPlay (cyclomatic 21) lib/screens/downloads/widgets/downloaded_media_view.dart:274 — _DownloadedMediaViewState._syncBoundTrackersAfterPlay has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ActivityHeatmapState.build (cyclomatic 21) · ×1
  • _ActivityHeatmapState.build (cyclomatic 21) lib/screens/profile/widgets/activity_heatmap.dart:52 — _ActivityHeatmapState.build has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ListStatusCard.build (cyclomatic 21) · ×1
  • ListStatusCard.build (cyclomatic 21) lib/screens/profile/widgets/list_status_card.dart:28 — ListStatusCard.build has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SocialTabState.build (cyclomatic 21) · ×1
  • SocialTabState.build (cyclomatic 21) lib/screens/profile/widgets/social_tab.dart:153 — SocialTabState.build has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SettingsAddonsState._buildTorrServerTile (cyclomatic 21) · ×1
  • _SettingsAddonsState._buildTorrServerTile (cyclomatic 21) lib/screens/settings/sub_settings/settings_addons.dart:210 — _SettingsAddonsState._buildTorrServerTile has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SettingsPlayerState.build (cyclomatic 21) · ×1
  • _SettingsPlayerState.build (cyclomatic 21) lib/screens/settings/sub_settings/settings_player.dart:1216 — _SettingsPlayerState.build has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WatchiumPageState._joinByCode (cyclomatic 21) · ×1
  • _WatchiumPageState._joinByCode (cyclomatic 21) lib/screens/watchium/watchium_page.dart:132 — _WatchiumPageState._joinByCode has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _FloatingPillNavBarState._buildMobileLayout (cyclomatic 21) · ×1
  • _FloatingPillNavBarState._buildMobileLayout (cyclomatic 21) lib/widgets/common/navbar/styles/floating_pill_navbar.dart:187 — _FloatingPillNavBarState._buildMobileLayout has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _WatchiumPartyPopupContentState._buildChat (cyclomatic 21) · ×1
  • _WatchiumPartyPopupContentState._buildChat (cyclomatic 21) lib/widgets/watchium/watchium_party_popup.dart:305 — _WatchiumPartyPopupContentState._buildChat has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OfflineStorageController.addMedia (cyclomatic 20) · ×1
  • OfflineStorageController.addMedia (cyclomatic 20) lib/controllers/offline/offline_storage_controller.dart:543 — OfflineStorageController.addMedia has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ReasonUserProfile.matchesUser (cyclomatic 20) · ×1
  • ReasonUserProfile.matchesUser (cyclomatic 20) lib/controllers/services/community_service.dart:124 — ReasonUserProfile.matchesUser has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WatchiumService._connectSocket (cyclomatic 20) · ×1
  • WatchiumService._connectSocket (cyclomatic 20) lib/controllers/watchium/watchium_service.dart:172 — WatchiumService._connectSocket has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Ios26PlayerControlTheme.buildBottomControls (cyclomatic 20) · ×1
  • Ios26PlayerControlTheme.buildBottomControls (cyclomatic 20) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:229 — Ios26PlayerControlTheme.buildBottomControls has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ThemeRenderer._makeButtonThing (cyclomatic 20) · ×1
  • ThemeRenderer._makeButtonThing (cyclomatic 20) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:716 — ThemeRenderer._makeButtonThing has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · EpisodesPane.build (cyclomatic 20) · ×1
  • EpisodesPane.build (cyclomatic 20) lib/screens/anime/watch/controls/widgets/episodes_pane.dart:197 — EpisodesPane.build has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CommentSectionState._buildReplyItem (cyclomatic 20) · ×1
  • _CommentSectionState._buildReplyItem (cyclomatic 20) lib/screens/anime/widgets/comments/comments_section.dart:1496 — _CommentSectionState._buildReplyItem has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CommentSectionState._showUserInfoDialog (cyclomatic 20) · ×1
  • _CommentSectionState._showUserInfoDialog (cyclomatic 20) lib/screens/anime/widgets/comments/comments_section.dart:3233 — _CommentSectionState._showUserInfoDialog has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _UserCommentsSheetContentState.build (cyclomatic 20) · ×1
  • _UserCommentsSheetContentState.build (cyclomatic 20) lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart:80 — _UserCommentsSheetContentState.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _DownloadedMediaViewState._buildEpisodeTile (cyclomatic 20) · ×1
  • _DownloadedMediaViewState._buildEpisodeTile (cyclomatic 20) lib/screens/downloads/widgets/downloaded_media_view.dart:688 — _DownloadedMediaViewState._buildEpisodeTile has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · __ListMediaEditorBottomSheetState.build (cyclomatic 20) · ×1
  • __ListMediaEditorBottomSheetState.build (cyclomatic 20) lib/screens/library/editor/list_editor.dart:831 — __ListMediaEditorBottomSheetState.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ReaderController._performFinalSave (cyclomatic 20) · ×1
  • ReaderController._performFinalSave (cyclomatic 20) lib/screens/manga/controller/reader_controller.dart:650 — ReaderController._performFinalSave has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _CompatibilityInputPageState._buildMatchupHero (cyclomatic 20) · ×1
  • _CompatibilityInputPageState._buildMatchupHero (cyclomatic 20) lib/screens/profile/compatibility/compatibility_input_page.dart:333 — _CompatibilityInputPageState._buildMatchupHero has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _UserMediaListPageState.build (cyclomatic 20) · ×1
  • _UserMediaListPageState.build (cyclomatic 20) lib/screens/profile/widgets/user_media_list_page.dart:522 — _UserMediaListPageState.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SearchPageState._buildFilterChips (cyclomatic 20) · ×1
  • _SearchPageState._buildFilterChips (cyclomatic 20) lib/screens/search/search_view.dart:1127 — _SearchPageState._buildFilterChips has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SettingsUiState._buildFontFamilyPickerContent (cyclomatic 20) · ×1
  • _SettingsUiState._buildFontFamilyPickerContent (cyclomatic 20) lib/screens/settings/sub_settings/settings_ui.dart:581 — _SettingsUiState._buildFontFamilyPickerContent has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaHeader.build (cyclomatic 20) · ×1
  • MediaHeader.build (cyclomatic 20) lib/widgets/anime/media_header.dart:37 — MediaHeader.build has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Header.build (cyclomatic 20) · ×1
  • Header.build (cyclomatic 20) lib/widgets/header/legacy_header.dart:41 — Header.build has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistApi.getStaffDetails (cyclomatic 19) · ×1
  • AnilistApi.getStaffDetails (cyclomatic 19) lib/controllers/services/anilist/anilist_api.dart:66 — AnilistApi.getStaffDetails has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackupRestoreService.pickBackupFile (cyclomatic 19) · ×1
  • BackupRestoreService.pickBackupFile (cyclomatic 19) lib/controllers/services/backup_restore/backup_restore_service.dart:1230 — BackupRestoreService.pickBackupFile has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommunityService._buildSubmitBody (cyclomatic 19) · ×1
  • CommunityService._buildSubmitBody (cyclomatic 19) lib/controllers/services/community_service.dart:953 — CommunityService._buildSubmitBody has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimklService.getEpisodesBySeason (cyclomatic 19) · ×1
  • SimklService.getEpisodesBySeason (cyclomatic 19) lib/controllers/services/simkl/simkl_service.dart:444 — SimklService.getEpisodesBySeason has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimklService.updateListEntryFromExternalId (cyclomatic 19) · ×1
  • SimklService.updateListEntryFromExternalId (cyclomatic 19) lib/controllers/services/simkl/simkl_service.dart:635 — SimklService.updateListEntryFromExternalId has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Media.fromSmallSimkl (cyclomatic 19) · ×1
  • Media.fromSmallSimkl (cyclomatic 19) lib/models/Media/media.dart:897 — Media.fromSmallSimkl has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _BottomSheetListItemState.build (cyclomatic 19) · ×1
  • _BottomSheetListItemState.build (cyclomatic 19) lib/screens/anime/watch/controls/widgets/bottom_sheet.dart:285 — _BottomSheetListItemState.build has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DiscordMarkdown.build (cyclomatic 19) · ×1
  • DiscordMarkdown.build (cyclomatic 19) lib/screens/anime/widgets/comments/discord_markdown.dart:36 — DiscordMarkdown.build has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _MentionAutocompleteState._searchUsers (cyclomatic 19) · ×1
  • _MentionAutocompleteState._searchUsers (cyclomatic 19) lib/screens/anime/widgets/comments/mention_autocomplete.dart:122 — _MentionAutocompleteState._searchUsers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DownloadServerSelectorState._buildBody (cyclomatic 19) · ×1
  • _DownloadServerSelectorState._buildBody (cyclomatic 19) lib/screens/downloads/widgets/download_server_selector.dart:229 — _DownloadServerSelectorState._buildBody has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _HistoryEditorState._buildHistoryCard (cyclomatic 19) · ×1
  • _HistoryEditorState._buildHistoryCard (cyclomatic 19) lib/screens/library/editor/history_editor.dart:477 — _HistoryEditorState._buildHistoryCard has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ReaderPageActionsSheet._savePage (cyclomatic 19) · ×1
  • _ReaderPageActionsSheet._savePage (cyclomatic 19) lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:110 — _ReaderPageActionsSheet._savePage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WatchiumPageState._joinRoomFromCard (cyclomatic 19) · ×1
  • _WatchiumPageState._joinRoomFromCard (cyclomatic 19) lib/screens/watchium/watchium_page.dart:1062 — _WatchiumPageState._joinRoomFromCard has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _SubsamplingImageProviderState.build (cyclomatic 19) · ×1
  • _SubsamplingImageProviderState.build (cyclomatic 19) lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:69 — _SubsamplingImageProviderState.build has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _GridAnimeCardState.build (cyclomatic 18) · ×1
  • _GridAnimeCardState.build (cyclomatic 18) lib/screens/anime/misc/calendar.dart:631 — _GridAnimeCardState.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ThemeRenderer._resolveColor (cyclomatic 18) · ×1
  • ThemeRenderer._resolveColor (cyclomatic 18) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1279 — ThemeRenderer._resolveColor has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _AudioPopupContentState._buildInbuiltAudio (cyclomatic 18) · ×1
  • _AudioPopupContentState._buildInbuiltAudio (cyclomatic 18) lib/screens/anime/watch/controls/widgets/audio_popup.dart:153 — _AudioPopupContentState._buildInbuiltAudio has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _TracksPopupContentState._buildSourceSubtitles (cyclomatic 18) · ×1
  • _TracksPopupContentState._buildSourceSubtitles (cyclomatic 18) lib/screens/anime/watch/controls/widgets/tracks_popup.dart:107 — _TracksPopupContentState._buildSourceSubtitles has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CommentSectionState._buildCommentWithReplies (cyclomatic 18) · ×1
  • _CommentSectionState._buildCommentWithReplies (cyclomatic 18) lib/screens/anime/widgets/comments/comments_section.dart:1104 — _CommentSectionState._buildCommentWithReplies has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _DownloadScreenState._checkPermissions (cyclomatic 18) · ×1
  • _DownloadScreenState._checkPermissions (cyclomatic 18) lib/screens/downloads/download_screen.dart:175 — _DownloadScreenState._checkPermissions has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ExtensionListState.build (cyclomatic 18) · ×1
  • _ExtensionListState.build (cyclomatic 18) lib/screens/extensions/ExtensionList.dart:305 — _ExtensionListState.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CompatibilityInputPageState._submit (cyclomatic 18) · ×1
  • _CompatibilityInputPageState._submit (cyclomatic 18) lib/screens/profile/compatibility/compatibility_input_page.dart:204 — _CompatibilityInputPageState._submit has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SettingsDiscordState._buildAccountCard (cyclomatic 18) · ×1
  • _SettingsDiscordState._buildAccountCard (cyclomatic 18) lib/screens/settings/sub_settings/settings_discord.dart:249 — _SettingsDiscordState._buildAccountCard has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _AnymeXModerationActionSheetState.build (cyclomatic 18) · ×1
  • _AnymeXModerationActionSheetState.build (cyclomatic 18) lib/screens/settings/sub_settings/widgets/moderation_action_sheet.dart:262 — _AnymeXModerationActionSheetState.build has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WatchiumPageState._buildJoinByCodeSection (cyclomatic 18) · ×1
  • _WatchiumPageState._buildJoinByCodeSection (cyclomatic 18) lib/screens/watchium/watchium_page.dart:571 — _WatchiumPageState._buildJoinByCodeSection has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _WatchiumPageState._buildCurrentRoomSection (cyclomatic 18) · ×1
  • _WatchiumPageState._buildCurrentRoomSection (cyclomatic 18) lib/screens/watchium/watchium_page.dart:783 — _WatchiumPageState._buildCurrentRoomSection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnymeXDecoratedAvatar.build (cyclomatic 18) · ×1
  • AnymeXDecoratedAvatar.build (cyclomatic 18) lib/widgets/anymex_widgets/anymex_decorated_avatar.dart:32 — AnymeXDecoratedAvatar.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AnymeXDialog.build (cyclomatic 18) · ×1
  • AnymeXDialog.build (cyclomatic 18) lib/widgets/anymex_widgets/anymex_dialog.dart:72 — AnymeXDialog.build has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ActivityCardState._showActivityOptions (cyclomatic 18) · ×1
  • _ActivityCardState._showActivityOptions (cyclomatic 18) lib/widgets/non_widgets/activity_card.dart:150 — _ActivityCardState._showActivityOptions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ReasonsSheetState._buildReasonCard (cyclomatic 18) · ×1
  • _ReasonsSheetState._buildReasonCard (cyclomatic 18) lib/widgets/non_widgets/reasons_sheet.dart:521 — _ReasonsSheetState._buildReasonCard has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SubsamplingScaleImageViewState._handleScaleUpdate (cyclomatic 18) · ×1
  • _SubsamplingScaleImageViewState._handleScaleUpdate (cyclomatic 18) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:1237 — _SubsamplingScaleImageViewState._handleScaleUpdate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OfflineStorageController.addOrUpdateReadChapter (cyclomatic 17) · ×1
  • OfflineStorageController.addOrUpdateReadChapter (cyclomatic 17) lib/controllers/offline/offline_storage_controller.dart:809 — OfflineStorageController.addOrUpdateReadChapter has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistAuth.formatScore (cyclomatic 17) · ×1
  • AnilistAuth.formatScore (cyclomatic 17) lib/controllers/services/anilist/anilist_auth.dart:49 — AnilistAuth.formatScore has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistData.homeWidgets (cyclomatic 17) · ×1
  • AnilistData.homeWidgets (cyclomatic 17) lib/controllers/services/anilist/anilist_data.dart:113 — AnilistData.homeWidgets has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnilistData.fetchStudioDetails (cyclomatic 17) · ×1
  • AnilistData.fetchStudioDetails (cyclomatic 17) lib/controllers/services/anilist/anilist_data.dart:733 — AnilistData.fetchStudioDetails has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MalService._fetchAndStoreMalSessionId (cyclomatic 17) · ×1
  • MalService._fetchAndStoreMalSessionId (cyclomatic 17) lib/controllers/services/mal/mal_service.dart:627 — MalService._fetchAndStoreMalSessionId has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MalService.deleteListEntry (cyclomatic 17) · ×1
  • MalService.deleteListEntry (cyclomatic 17) lib/controllers/services/mal/mal_service.dart:886 — MalService.deleteListEntry has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimklApi.fetchDetails (cyclomatic 17) · ×1
  • SimklApi.fetchDetails (cyclomatic 17) lib/controllers/services/simkl/simkl_api.dart:16 — SimklApi.fetchDetails has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LeaderboardEntry.fromMap (cyclomatic 17) · ×1
  • LeaderboardEntry.fromMap (cyclomatic 17) lib/database/comments/model/leaderboard_entry.dart:66 — LeaderboardEntry.fromMap has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackedMedia.effectiveTotal (cyclomatic 17) · ×1
  • TrackedMedia.effectiveTotal (cyclomatic 17) lib/models/Anilist/anilist_media_user.dart:121 — TrackedMedia.effectiveTotal has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MediaDetailsController._initActiveSource (cyclomatic 17) · ×1
  • MediaDetailsController._initActiveSource (cyclomatic 17) lib/screens/anime/details/controller/media_details_controller.dart:232 — MediaDetailsController._initActiveSource has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IosLegacyPlayerControlTheme.buildBottomControls (cyclomatic 17) · ×1
  • IosLegacyPlayerControlTheme.buildBottomControls (cyclomatic 17) lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:265 — IosLegacyPlayerControlTheme.buildBottomControls has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DiscordMarkdown._parseImgTag (cyclomatic 17) · ×1
  • DiscordMarkdown._parseImgTag (cyclomatic 17) lib/screens/anime/widgets/comments/discord_markdown.dart:452 — DiscordMarkdown._parseImgTag has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ReaderController.fetchImages (cyclomatic 17) · ×1
  • ReaderController.fetchImages (cyclomatic 17) lib/screens/manga/controller/reader_controller.dart:1850 — ReaderController.fetchImages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ChapterListBuilderState._onTap (cyclomatic 17) · ×1
  • _ChapterListBuilderState._onTap (cyclomatic 17) lib/screens/manga/widgets/chapter_list_builder.dart:220 — _ChapterListBuilderState._onTap has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ChapterListBuilderState.build (cyclomatic 17) · ×1
  • _ChapterListBuilderState.build (cyclomatic 17) lib/screens/manga/widgets/chapter_list_builder.dart:290 — _ChapterListBuilderState.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.
D1 · Cyclomatic Complexity · _MangaStatsState.build (cyclomatic 17) · ×1
  • _MangaStatsState.build (cyclomatic 17) lib/screens/manga/widgets/manga_stats.dart:69 — _MangaStatsState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _CompatibilityInputPageState._onUserChanged (cyclomatic 17) · ×1
  • _CompatibilityInputPageState._onUserChanged (cyclomatic 17) lib/screens/profile/compatibility/compatibility_input_page.dart:118 — _CompatibilityInputPageState._onUserChanged has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UserProfilePageState._buildBody (cyclomatic 17) · ×1
  • _UserProfilePageState._buildBody (cyclomatic 17) lib/screens/profile/user_profile_page.dart:308 — _UserProfilePageState._buildBody has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ProfileStatsTabState.build (cyclomatic 17) · ×1
  • _ProfileStatsTabState.build (cyclomatic 17) lib/screens/profile/widgets/profile_stats_tab.dart:37 — _ProfileStatsTabState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _ProfileStatsTabState._overviewView (cyclomatic 17) · ×1
  • _ProfileStatsTabState._overviewView (cyclomatic 17) lib/screens/profile/widgets/profile_stats_tab.dart:174 — _ProfileStatsTabState._overviewView has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SocialTabState.loadMore (cyclomatic 17) · ×1
  • SocialTabState.loadMore (cyclomatic 17) lib/screens/profile/widgets/social_tab.dart:98 — SocialTabState.loadMore has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · _SearchPageState._loadMoreResults (cyclomatic 17) · ×1
  • _SearchPageState._loadMoreResults (cyclomatic 17) lib/screens/search/search_view.dart:573 — _SearchPageState._loadMoreResults has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _GroupFilterWidgetState.build (cyclomatic 17) · ×1
  • _GroupFilterWidgetState.build (cyclomatic 17) lib/screens/search/widgets/extension_filter_sheet.dart:539 — _GroupFilterWidgetState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _SettingsThemeState.showRefreshRateDialog (cyclomatic 17) · ×1
  • _SettingsThemeState.showRefreshRateDialog (cyclomatic 17) lib/screens/settings/sub_settings/settings_theme.dart:410 — _SettingsThemeState.showRefreshRateDialog has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · _ExportBackupSheetState.build (cyclomatic 17) · ×1
  • _ExportBackupSheetState.build (cyclomatic 17) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1047 — _ExportBackupSheetState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _UserStatsPageState.build (cyclomatic 17) · ×1
  • _UserStatsPageState.build (cyclomatic 17) lib/screens/stats/user_stats_page.dart:98 — _UserStatsPageState.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CommentumService._mapCommentumToAnymeXComment (cyclomatic 17) · ×1
  • CommentumService._mapCommentumToAnymeXComment (cyclomatic 17) lib/services/commentum_service.dart:1287 — CommentumService._mapCommentumToAnymeXComment has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AnymeXTileBuilder.build (cyclomatic 17) · ×1
  • AnymeXTileBuilder.build (cyclomatic 17) lib/widgets/anymex_widgets/anymex_tile_builder.dart:60 — AnymeXTileBuilder.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.
D1 · Cyclomatic Complexity · LinkedAccountsBadges.build (cyclomatic 17) · ×1
  • LinkedAccountsBadges.build (cyclomatic 17) lib/widgets/anymex_widgets/linked_accounts_badges.dart:20 — LinkedAccountsBadges.build has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Header.build (cyclomatic 17) · ×1
  • Header.build (cyclomatic 17) lib/widgets/header/header.dart:73 — Header.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.
D1 · Cyclomatic Complexity · _SubsamplingScaleImageViewState.didUpdateWidget (cyclomatic 17) · ×1
  • _SubsamplingScaleImageViewState.didUpdateWidget (cyclomatic 17) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:512 — _SubsamplingScaleImageViewState.didUpdateWidget has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppNamePackageManager.run (cyclomatic 16) · ×1
  • AppNamePackageManager.run (cyclomatic 16) package_manager.dart:12 — AppNamePackageManager.run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WatchiumService.createRoom (cyclomatic 16) · ×1
  • WatchiumService.createRoom (cyclomatic 16) lib/controllers/watchium/watchium_service.dart:468 — WatchiumService.createRoom has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ListExporterPageState.build (cyclomatic 16) · ×1
  • _ListExporterPageState.build (cyclomatic 16) lib/screens/anime/misc/list_exporter.dart:358 — _ListExporterPageState.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.
D1 · Cyclomatic Complexity · ThemeRenderer.buildBottomShit (cyclomatic 16) · ×1
  • ThemeRenderer.buildBottomShit (cyclomatic 16) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:220 — ThemeRenderer.buildBottomShit has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ThemeRenderer._slapPanelOn (cyclomatic 16) · ×1
  • ThemeRenderer._slapPanelOn (cyclomatic 16) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:986 — ThemeRenderer._slapPanelOn has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ThemeRenderer._getDynamicColor (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MediaKitPlayer.initialize (cyclomatic 16) · ×1
  • MediaKitPlayer.initialize (cyclomatic 16) lib/screens/anime/watch/player/media_kit_player.dart:75 — MediaKitPlayer.initialize has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnimeStats.build (cyclomatic 16) · ×1
  • AnimeStats.build (cyclomatic 16) lib/screens/anime/widgets/anime_stats.dart:54 — AnimeStats.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.
D1 · Cyclomatic Complexity · CharactersCarousel.build (cyclomatic 16) · ×1
  • CharactersCarousel.build (cyclomatic 16) lib/screens/anime/widgets/voice_actor.dart:19 — CharactersCarousel.build has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ExtensionListState._onReorder (cyclomatic 16) · ×1
  • _ExtensionListState._onReorder (cyclomatic 16) lib/screens/extensions/ExtensionList.dart:269 — _ExtensionListState._onReorder has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ContinuousReaderViewState._handleScaleUpdate (cyclomatic 16) · ×1
  • _ContinuousReaderViewState._handleScaleUpdate (cyclomatic 16) lib/screens/manga/widgets/reader/continuous_reader.dart:190 — _ContinuousReaderViewState._handleScaleUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _GeneralPage.build (cyclomatic 16) · ×1
  • _GeneralPage.build (cyclomatic 16) lib/screens/manga/widgets/reader/tabbed_reader_settings.dart:387 — _GeneralPage.build has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _SearchPageState._formatFilterValue (cyclomatic 16) · ×1
  • _SearchPageState._formatFilterValue (cyclomatic 16) lib/screens/search/search_view.dart:1666 — _SearchPageState._formatFilterValue has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · _SettingsExtensionManagerState.build (cyclomatic 16) · ×1
  • _SettingsExtensionManagerState.build (cyclomatic 16) lib/screens/settings/sub_settings/settings_extension_manager.dart:346 — _SettingsExtensionManagerState.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.
D1 · Cyclomatic Complexity · _SettingsThemeState._buildModeTemplates (cyclomatic 16) · ×1
  • _SettingsThemeState._buildModeTemplates (cyclomatic 16) lib/screens/settings/sub_settings/settings_theme.dart:492 — _SettingsThemeState._buildModeTemplates has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UserStatsController.syncLibraryStats (cyclomatic 16) · ×1
  • UserStatsController.syncLibraryStats (cyclomatic 16) lib/screens/stats/controller/user_stats_controller.dart:31 — UserStatsController.syncLibraryStats has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CastV2Client._decodeCastMessage (cyclomatic 16) · ×1
  • CastV2Client._decodeCastMessage (cyclomatic 16) lib/services/cast/cast_v2_client.dart:186 — CastV2Client._decodeCastMessage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommentumService.createComment (cyclomatic 16) · ×1
  • CommentumService.createComment (cyclomatic 16) lib/services/commentum_service.dart:246 — CommentumService.createComment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Deeplink._handleWatchiumDeepLink (cyclomatic 16) · ×1
  • Deeplink._handleWatchiumDeepLink (cyclomatic 16) lib/utils/deeplink.dart:397 — Deeplink._handleWatchiumDeepLink has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _BigCarouselPortraitState.build (cyclomatic 16) · ×1
  • _BigCarouselPortraitState.build (cyclomatic 16) lib/widgets/common/carousel/themes/big_carousel_portrait.dart:58 — _BigCarouselPortraitState.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.
D1 · Cyclomatic Complexity · _WatchiumCreateSheetState._joinRoom (cyclomatic 16) · ×1
  • _WatchiumCreateSheetState._joinRoom (cyclomatic 16) lib/widgets/watchium/watchium_create_dialog.dart:608 — _WatchiumCreateSheetState._joinRoom has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _WatchiumPartyPopupContentState._buildMemberTrailing (cyclomatic 16) · ×1
  • _WatchiumPartyPopupContentState._buildMemberTrailing (cyclomatic 16) lib/widgets/watchium/watchium_party_popup.dart:904 — _WatchiumPartyPopupContentState._buildMemberTrailing 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.
D2 · Cognitive Complexity · TachiyomiBackupParser.parseBytes (cognitive 186) · ×1
  • TachiyomiBackupParser.parseBytes (cognitive 186) lib/controllers/services/backup_restore/parsers/tachiyomi_backup_parser.dart:31 — TachiyomiBackupParser.parseBytes has cognitive complexity 186 (threshold 15). Drivers by points: if/else 31 (78 pts), ternaries 35 (75 pts), loops 14 (24 pts), boolean chains 7, error handling 2 (nesting depth added 97). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DubService.fetchDubSources (cognitive 185) · ×1
  • DubService.fetchDubSources (cognitive 185) lib/screens/anime/misc/dub_service.dart:10 — DubService.fetchDubSources has cognitive complexity 185 (threshold 15). Drivers by points: if/else 28 (141 pts), loops 6 (26 pts), error handling 4 (13 pts), boolean chains 5 (nesting depth added 142). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BackupRestoreService._applyExternalMangaAndAnime (cognitive 162) · ×1
  • BackupRestoreService._applyExternalMangaAndAnime (cognitive 162) lib/controllers/services/backup_restore/backup_restore_service.dart:1654 — BackupRestoreService._applyExternalMangaAndAnime has cognitive complexity 162 (threshold 15). Drivers by points: if/else 31 (88 pts), loops 14 (54 pts), boolean chains 20 (nesting depth added 97). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CharacterStaffSheetContentState.build (cognitive 141) · ×1
  • _CharacterStaffSheetContentState.build (cognitive 141) lib/screens/anime/widgets/character_staff_sheet.dart:140 — _CharacterStaffSheetContentState.build has cognitive complexity 141 (threshold 15). Drivers by points: if/else 39 (79 pts), ternaries 18 (34 pts), boolean chains 16, loops 4 (8 pts), error handling 4 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Media.fromSimkl (cognitive 140) · ×1
  • Media.fromSimkl (cognitive 140) lib/models/Media/media.dart:489 — Media.fromSimkl has cognitive complexity 140 (threshold 15). Drivers by points: if/else 40 (67 pts), ternaries 19 (36 pts), boolean chains 26, loops 3 (6 pts), error handling 3 (4 pts), match/switch 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadController._syncMediaFolderMeta (cognitive 119) · ×1
  • DownloadController._syncMediaFolderMeta (cognitive 119) lib/screens/downloads/controller/download_controller.dart:1660 — DownloadController._syncMediaFolderMeta has cognitive complexity 119 (threshold 15). Drivers by points: if/else 24 (78 pts), boolean chains 15, loops 4 (10 pts), ternaries 2 (10 pts), error handling 2 (6 pts) (nesting depth added 72). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DownloadController.resyncDownloads (cognitive 109) · ×1
  • DownloadController.resyncDownloads (cognitive 109) lib/screens/downloads/controller/download_controller.dart:1553 — DownloadController.resyncDownloads has cognitive complexity 109 (threshold 15). Drivers by points: if/else 14 (67 pts), ternaries 3 (21 pts), loops 4 (13 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 82). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SourceMapper.mapMedia (cognitive 102) · ×1
  • SourceMapper.mapMedia (cognitive 102) lib/controllers/source/source_mapper.dart:86 — SourceMapper.mapMedia has cognitive complexity 102 (threshold 15). Drivers by points: if/else 36 (59 pts), boolean chains 24, ternaries 9 (13 pts), loops 3 (5 pts), error handling 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService._applyBackupData (cognitive 90) · ×1
  • BackupRestoreService._applyBackupData (cognitive 90) lib/controllers/services/backup_restore/backup_restore_service.dart:580 — BackupRestoreService._applyBackupData has cognitive complexity 90 (threshold 15). Drivers by points: if/else 23 (46 pts), boolean chains 15, loops 6 (15 pts), ternaries 4 (10 pts), match/switch 1 (4 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService.getBackupInfo (cognitive 89) · ×1
  • BackupRestoreService.getBackupInfo (cognitive 89) lib/controllers/services/backup_restore/backup_restore_service.dart:1306 — BackupRestoreService.getBackupInfo has cognitive complexity 89 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 24, ternaries 8 (23 pts), loops 3 (9 pts), error handling 1 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Header.build (cognitive 89) · ×1
  • Header.build (cognitive 89) lib/widgets/header/legacy_header.dart:41 — Header.build has cognitive complexity 89 (threshold 15). Drivers by points: if/else 26 (75 pts), ternaries 3 (14 pts) (nesting depth added 60). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KotatsuBackupParser.parse (cognitive 88) · ×1
  • KotatsuBackupParser.parse (cognitive 88) lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:18 — KotatsuBackupParser.parse has cognitive complexity 88 (threshold 15). Drivers by points: if/else 29 (59 pts), loops 9 (13 pts), boolean chains 8, ternaries 5 (8 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _BackupRestorePageState._buildImportSection (cognitive 83) · ×1
  • _BackupRestorePageState._buildImportSection (cognitive 83) lib/screens/settings/sub_settings/settings_backup.dart:411 — _BackupRestorePageState._buildImportSection has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (58 pts), ternaries 7 (19 pts), boolean chains 6 (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ReaderController.handleMouseScroll (cognitive 82) · ×1
  • ReaderController.handleMouseScroll (cognitive 82) lib/screens/manga/controller/reader_controller.dart:1140 — ReaderController.handleMouseScroll has cognitive complexity 82 (threshold 15). Drivers by points: if/else 32 (75 pts), boolean chains 6, ternaries 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _UserProfileHeaderState.build (cognitive 81) · ×1
  • _UserProfileHeaderState.build (cognitive 81) lib/screens/profile/widgets/user_profile_header.dart:62 — _UserProfileHeaderState.build has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 25 (55 pts), if/else 13 (14 pts), boolean chains 12 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _VisualsPopupState._saveImage (cognitive 78) · ×1
  • _VisualsPopupState._saveImage (cognitive 78) lib/widgets/anime/visuals/visuals_popup.dart:162 — _VisualsPopupState._saveImage has cognitive complexity 78 (threshold 15). Drivers by points: if/else 19 (58 pts), error handling 5 (15 pts), boolean chains 5 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _FullscreenImageViewerState._saveImage (cognitive 78) · ×1
  • _FullscreenImageViewerState._saveImage (cognitive 78) lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:27 — _FullscreenImageViewerState._saveImage has cognitive complexity 78 (threshold 15). Drivers by points: if/else 19 (58 pts), error handling 5 (15 pts), boolean chains 5 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AnilistData.fetchFilterData (cognitive 76) · ×1
  • AnilistData.fetchFilterData (cognitive 76) lib/controllers/services/anilist/anilist_data.dart:1226 — AnilistData.fetchFilterData has cognitive complexity 76 (threshold 15). Drivers by points: if/else 21 (58 pts), ternaries 14, boolean chains 3, error handling 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MediaDetailsController._fetchContentFromSource (cognitive 76) · ×1
  • MediaDetailsController._fetchContentFromSource (cognitive 76) lib/screens/anime/details/controller/media_details_controller.dart:509 — MediaDetailsController._fetchContentFromSource has cognitive complexity 76 (threshold 15). Drivers by points: if/else 18 (45 pts), boolean chains 16, ternaries 4 (13 pts), error handling 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService.exportBackupToExternal (cognitive 75) · ×1
  • BackupRestoreService.exportBackupToExternal (cognitive 75) lib/controllers/services/backup_restore/backup_restore_service.dart:899 — BackupRestoreService.exportBackupToExternal has cognitive complexity 75 (threshold 15). Drivers by points: if/else 20 (51 pts), ternaries 3 (11 pts), error handling 2 (5 pts), boolean chains 4, loops 1 (4 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TrackedMedia.effectiveProgress (cognitive 75) · ×1
  • TrackedMedia.effectiveProgress (cognitive 75) lib/models/Anilist/anilist_media_user.dart:54 — TrackedMedia.effectiveProgress has cognitive complexity 75 (threshold 15). Drivers by points: ternaries 9 (29 pts), if/else 11 (23 pts), boolean chains 17, loops 2 (6 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _MediaDetailsPageState._buildContinueButton (cognitive 75) · ×1
  • _MediaDetailsPageState._buildContinueButton (cognitive 75) lib/screens/anime/details/media_details_page.dart:505 — _MediaDetailsPageState._buildContinueButton has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (32 pts), ternaries 18 (30 pts), boolean chains 13 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnimeTheme.fromJson (cognitive 74) · ×1
  • AnimeTheme.fromJson (cognitive 74) lib/models/animethemes/anime_theme.dart:20 — AnimeTheme.fromJson has cognitive complexity 74 (threshold 15). Drivers by points: if/else 15 (63 pts), boolean chains 6, ternaries 2 (4 pts), error handling 1 (nesting depth added 50). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DownloadController._onForegroundReceiveData (cognitive 71) · ×1
  • DownloadController._onForegroundReceiveData (cognitive 71) lib/screens/downloads/controller/download_controller.dart:346 — DownloadController._onForegroundReceiveData has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (65 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UpdateManager.checkForUpdates (cognitive 70) · ×1
  • UpdateManager.checkForUpdates (cognitive 70) lib/utils/updater.dart:64 — UpdateManager.checkForUpdates has cognitive complexity 70 (threshold 15). Drivers by points: if/else 18 (64 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AnilistApi.getStaffDetails (cognitive 66) · ×1
  • AnilistApi.getStaffDetails (cognitive 66) lib/controllers/services/anilist/anilist_api.dart:66 — AnilistApi.getStaffDetails has cognitive complexity 66 (threshold 15). Drivers by points: if/else 16 (60 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MangaAnimeUtil.getNextChapterPrediction (cognitive 61) · ×1
  • MangaAnimeUtil.getNextChapterPrediction (cognitive 61) lib/utils/anime_adaptation_util.dart:98 — MangaAnimeUtil.getNextChapterPrediction has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (44 pts), loops 3 (6 pts), error handling 2 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BackupRestoreService.restoreBackup (cognitive 60) · ×1
  • BackupRestoreService.restoreBackup (cognitive 60) lib/controllers/services/backup_restore/backup_restore_service.dart:1132 — BackupRestoreService.restoreBackup has cognitive complexity 60 (threshold 15). Drivers by points: ternaries 9 (27 pts), if/else 10 (21 pts), boolean chains 8, error handling 2 (4 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._bindPlayerStreams (cognitive 59) · ×1
  • PlayerController._bindPlayerStreams (cognitive 59) lib/screens/anime/watch/controller/player_controller.dart:1228 — PlayerController._bindPlayerStreams has cognitive complexity 59 (threshold 15). Drivers by points: if/else 37 (42 pts), boolean chains 12, loops 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _CommentsRepliesSheetState._buildCommentCard (cognitive 57) · ×1
  • _CommentsRepliesSheetState._buildCommentCard (cognitive 57) lib/screens/anime/widgets/comments/widgets/comments_replies_sheet.dart:158 — _CommentsRepliesSheetState._buildCommentCard has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 17 (26 pts), boolean chains 16, if/else 13 (15 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Media.fromJson (cognitive 55) · ×1
  • Media.fromJson (cognitive 55) lib/models/Media/media.dart:1042 — Media.fromJson has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (37 pts), ternaries 10, boolean chains 8 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaDetailsController._initOfflineAndTrackedData (cognitive 55) · ×1
  • MediaDetailsController._initOfflineAndTrackedData (cognitive 55) lib/screens/anime/details/controller/media_details_controller.dart:334 — MediaDetailsController._initOfflineAndTrackedData has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (31 pts), ternaries 5 (11 pts), boolean chains 10, loops 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AnilistAboutMeState.build (cognitive 55) · ×1
  • _AnilistAboutMeState.build (cognitive 55) lib/utils/al_about_me.dart:205 — _AnilistAboutMeState.build has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 2 (7 pts), ternaries 3, match/switch 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _WrongTitleModalState.build (cognitive 53) · ×1
  • _WrongTitleModalState.build (cognitive 53) lib/screens/anime/widgets/wrongtitle_modal.dart:90 — _WrongTitleModalState.build has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 15 (35 pts), if/else 9 (15 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RestorePreviewSheetState._buildGroupedOptions (cognitive 53) · ×1
  • _RestorePreviewSheetState._buildGroupedOptions (cognitive 53) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:592 — _RestorePreviewSheetState._buildGroupedOptions has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 12, ternaries 5 (9 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Media.fromFullMAL (cognitive 52) · ×1
  • Media.fromFullMAL (cognitive 52) lib/models/Media/media.dart:340 — Media.fromFullMAL has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 17, ternaries 8 (11 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ActivityComposerSheetState._buildFormatButton (cognitive 52) · ×1
  • ActivityComposerSheetState._buildFormatButton (cognitive 52) lib/widgets/non_widgets/activity_composer_sheet.dart:183 — ActivityComposerSheetState._buildFormatButton has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (33 pts), ternaries 5 (9 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaDetailsController.getContinueChapter (cognitive 51) · ×1
  • MediaDetailsController.getContinueChapter (cognitive 51) lib/screens/anime/details/controller/media_details_controller.dart:924 — MediaDetailsController.getContinueChapter has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 25, if/else 12 (23 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RecommendSheetState._buildAlreadyAdded (cognitive 51) · ×1
  • _RecommendSheetState._buildAlreadyAdded (cognitive 51) lib/widgets/non_widgets/recommend_sheet.dart:709 — _RecommendSheetState._buildAlreadyAdded has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (24 pts), ternaries 10 (20 pts), boolean chains 7 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainActivity.configureFlutterEngine (cognitive 51) · ×1
  • MainActivity.configureFlutterEngine (cognitive 51) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:81 — MainActivity.configureFlutterEngine has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (30 pts), error handling 5 (14 pts), match/switch 4, boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BottomControls._buildLayout (cognitive 49) · ×1
  • BottomControls._buildLayout (cognitive 49) lib/screens/anime/watch/controls/bottom_controls.dart:229 — BottomControls._buildLayout has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 14 (20 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActivityComposerSheetState.build (cognitive 49) · ×1
  • ActivityComposerSheetState.build (cognitive 49) lib/widgets/non_widgets/activity_composer_sheet.dart:433 — ActivityComposerSheetState.build has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 20 (31 pts), if/else 12 (14 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnilistAuth.deleteMediaFromList (cognitive 48) · ×1
  • AnilistAuth.deleteMediaFromList (cognitive 48) lib/controllers/services/anilist/anilist_auth.dart:2079 — AnilistAuth.deleteMediaFromList has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 5, ternaries 2 (5 pts), error handling 2 (4 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MediaModeSelector.build (cognitive 47) · ×1
  • MediaModeSelector.build (cognitive 47) lib/widgets/common/media_mode_selector.dart:109 — MediaModeSelector.build has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 15 (27 pts), if/else 11 (18 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubsamplingImageProviderState.build (cognitive 47) · ×1
  • _SubsamplingImageProviderState.build (cognitive 47) lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:69 — _SubsamplingImageProviderState.build has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (42 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CookieManager.parseSingleCookie (cognitive 46) · ×1
  • CookieManager.parseSingleCookie (cognitive 46) lib/controllers/network/cookie_manager.dart:258 — CookieManager.parseSingleCookie has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 3 (8 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActiveDownloads._buildActiveTaskCard (cognitive 46) · ×1
  • ActiveDownloads._buildActiveTaskCard (cognitive 46) lib/screens/downloads/nested_screens/active_downloads/active_downloads.dart:89 — ActiveDownloads._buildActiveTaskCard has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (32 pts), boolean chains 9, ternaries 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ReaderPageActionsSheet._savePage (cognitive 46) · ×1
  • _ReaderPageActionsSheet._savePage (cognitive 46) lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:110 — _ReaderPageActionsSheet._savePage has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (34 pts), error handling 3 (8 pts), boolean chains 4 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SettingsExtensionManagerState._buildPluginStatusCard (cognitive 46) · ×1
  • _SettingsExtensionManagerState._buildPluginStatusCard (cognitive 46) lib/screens/settings/sub_settings/settings_extension_manager.dart:467 — _SettingsExtensionManagerState._buildPluginStatusCard has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 24 (27 pts), boolean chains 11, if/else 6 (8 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CompatibilityController.runMatch (cognitive 45) · ×1
  • CompatibilityController.runMatch (cognitive 45) lib/controllers/services/anilist/compatibility_controller.dart:30 — CompatibilityController.runMatch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 16, ternaries 2 (4 pts), error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Character.fromJson (cognitive 44) · ×1
  • Character.fromJson (cognitive 44) lib/models/Media/character.dart:38 — Character.fromJson has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 10, loops 1 (3 pts), ternaries 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Media.fromMAL (cognitive 44) · ×1
  • Media.fromMAL (cognitive 44) lib/models/Media/media.dart:165 — Media.fromMAL has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 16, ternaries 8 (11 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AnilistAuth.updateListEntry (cognitive 43) · ×1
  • AnilistAuth.updateListEntry (cognitive 43) lib/controllers/services/anilist/anilist_auth.dart:2186 — AnilistAuth.updateListEntry has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (29 pts), ternaries 3 (8 pts), boolean chains 5, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MalService._fetchAndStoreMalSessionId (cognitive 43) · ×1
  • MalService._fetchAndStoreMalSessionId (cognitive 43) lib/controllers/services/mal/mal_service.dart:627 — MalService._fetchAndStoreMalSessionId has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (36 pts), boolean chains 3, loops 1 (3 pts), error handling 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _UserSearchSheetState.build (cognitive 43) · ×1
  • _UserSearchSheetState.build (cognitive 43) lib/screens/settings/sub_settings/settings_moderation.dart:302 — _UserSearchSheetState.build has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 20 (23 pts), boolean chains 10, if/else 8 (10 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ReaderSettings.showSettings (cognitive 42) · ×1
  • ReaderSettings.showSettings (cognitive 42) lib/screens/manga/widgets/reader/settings_view.dart:19 — ReaderSettings.showSettings has cognitive complexity 42 (threshold 15). Drivers by points: match/switch 8 (13 pts), ternaries 7 (13 pts), if/else 9, boolean chains 4, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SearchPageState._performSearch (cognitive 42) · ×1
  • _SearchPageState._performSearch (cognitive 42) lib/screens/search/search_view.dart:216 — _SearchPageState._performSearch has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 11, ternaries 2 (4 pts), loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SocialTabState.loadMore (cognitive 41) · ×1
  • SocialTabState.loadMore (cognitive 41) lib/screens/profile/widgets/social_tab.dart:98 — SocialTabState.loadMore has cognitive complexity 41 (threshold 15). Drivers by points: loops 6 (20 pts), if/else 8 (18 pts), boolean chains 2, error handling 1 (nesting depth added 24). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · UserStatsController.syncLibraryStats (cognitive 41) · ×1
  • UserStatsController.syncLibraryStats (cognitive 41) lib/screens/stats/controller/user_stats_controller.dart:31 — UserStatsController.syncLibraryStats has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService.pickBackupFile (cognitive 40) · ×1
  • BackupRestoreService.pickBackupFile (cognitive 40) lib/controllers/services/backup_restore/backup_restore_service.dart:1230 — BackupRestoreService.pickBackupFile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 7, error handling 2 (5 pts), ternaries 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimklService.updateListEntry (cognitive 40) · ×1
  • SimklService.updateListEntry (cognitive 40) lib/controllers/services/simkl/simkl_service.dart:503 — SimklService.updateListEntry has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 6 (17 pts), if/else 7 (14 pts), boolean chains 5, loops 1 (3 pts), error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DownloadScreenState._buildEpisodeStep (cognitive 40) · ×1
  • _DownloadScreenState._buildEpisodeStep (cognitive 40) lib/screens/downloads/download_screen.dart:861 — _DownloadScreenState._buildEpisodeStep has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 14 (15 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReaderController._onPositionChanged (cognitive 40) · ×1
  • ReaderController._onPositionChanged (cognitive 40) lib/screens/manga/controller/reader_controller.dart:1267 — ReaderController._onPositionChanged has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 9, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FuturisticFilterSheetState._loadCurrentFilters (cognitive 40) · ×1
  • _FuturisticFilterSheetState._loadCurrentFilters (cognitive 40) lib/screens/search/widgets/search_widgets.dart:520 — _FuturisticFilterSheetState._loadCurrentFilters has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 8, ternaries 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.
D2 · Cognitive Complexity · AnilistAuth.fetchUserMediaList (cognitive 39) · ×1
  • AnilistAuth.fetchUserMediaList (cognitive 39) lib/controllers/services/anilist/anilist_auth.dart:1071 — AnilistAuth.fetchUserMediaList has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 2 (7 pts), boolean chains 2, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ControlButtonState.build (cognitive 39) · ×1
  • _ControlButtonState.build (cognitive 39) lib/screens/anime/watch/controls/widgets/control_button.dart:76 — _ControlButtonState.build has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 38, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _DownloadedMediaViewState._syncBoundTrackersAfterPlay (cognitive 39) · ×1
  • _DownloadedMediaViewState._syncBoundTrackersAfterPlay (cognitive 39) lib/screens/downloads/widgets/downloaded_media_view.dart:274 — _DownloadedMediaViewState._syncBoundTrackersAfterPlay has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 9, loops 2 (6 pts), error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HomePageState._buildNewEpisodesSection (cognitive 39) · ×1
  • _HomePageState._buildNewEpisodesSection (cognitive 39) lib/screens/home_page.dart:38 — _HomePageState._buildNewEpisodesSection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 12, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ContinuousReaderViewState._handleScaleUpdate (cognitive 39) · ×1
  • _ContinuousReaderViewState._handleScaleUpdate (cognitive 39) lib/screens/manga/widgets/reader/continuous_reader.dart:190 — _ContinuousReaderViewState._handleScaleUpdate has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (19 pts), error handling 4 (16 pts), ternaries 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileProfileHeaderSliver.build (cognitive 39) · ×1
  • MobileProfileHeaderSliver.build (cognitive 39) lib/screens/profile/widgets/profile_header.dart:614 — MobileProfileHeaderSliver.build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 9 (15 pts), boolean chains 7 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SocialTabState.build (cognitive 39) · ×1
  • SocialTabState.build (cognitive 39) lib/screens/profile/widgets/social_tab.dart:153 — SocialTabState.build has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (26 pts), ternaries 7 (10 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FuturisticFilterSheetState._applyFilters (cognitive 39) · ×1
  • _FuturisticFilterSheetState._applyFilters (cognitive 39) lib/screens/search/widgets/search_widgets.dart:2345 — _FuturisticFilterSheetState._applyFilters has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 7, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Matchmaker._computeReleaseYearOverlap (cognitive 39) · ×1
  • Matchmaker._computeReleaseYearOverlap (cognitive 39) lib/utils/compatibility/matchmaker.dart:584 — Matchmaker._computeReleaseYearOverlap has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (20 pts), boolean chains 10, if/else 5 (8 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnilistData.anilistSearch (cognitive 38) · ×1
  • AnilistData.anilistSearch (cognitive 38) lib/controllers/services/anilist/anilist_data.dart:948 — AnilistData.anilistSearch has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 5 (8 pts), boolean chains 5, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupFormatDetector.detectFromBytes (cognitive 38) · ×1
  • BackupFormatDetector.detectFromBytes (cognitive 38) lib/controllers/services/backup_restore/backup_format_detector.dart:15 — BackupFormatDetector.detectFromBytes has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (13 pts), error handling 4 (10 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UserProfileAppBarState.build (cognitive 38) · ×1
  • _UserProfileAppBarState.build (cognitive 38) lib/screens/profile/widgets/user_profile_app_bar.dart:61 — _UserProfileAppBarState.build has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 11 (15 pts), if/else 13, boolean chains 10 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _UserStatsPageState._buildHeatmapSection (cognitive 38) · ×1
  • _UserStatsPageState._buildHeatmapSection (cognitive 38) lib/screens/stats/user_stats_page.dart:549 — _UserStatsPageState._buildHeatmapSection has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 7, ternaries 4, loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _RecommendSheetState._userHasReason (cognitive 38) · ×1
  • _RecommendSheetState._userHasReason (cognitive 38) lib/widgets/non_widgets/recommend_sheet.dart:263 — _RecommendSheetState._userHasReason has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 8, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_RecommendSheetState._findUserReason) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _RecommendSheetState._findUserReason (cognitive 38) · ×1
  • _RecommendSheetState._findUserReason (cognitive 38) lib/widgets/non_widgets/recommend_sheet.dart:305 — _RecommendSheetState._findUserReason has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 8, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_RecommendSheetState._userHasReason) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · MalService.homeWidgets (cognitive 37) · ×1
  • MalService.homeWidgets (cognitive 37) lib/controllers/services/mal/mal_service.dart:321 — MalService.homeWidgets has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 16 (32 pts), if/else 2 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimklService.getEpisodesBySeason (cognitive 37) · ×1
  • SimklService.getEpisodesBySeason (cognitive 37) lib/controllers/services/simkl/simkl_service.dart:444 — SimklService.getEpisodesBySeason has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 7 (13 pts), boolean chains 4, loops 1 (3 pts), error handling 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SimklService.updateListEntryFromExternalId (cognitive 37) · ×1
  • SimklService.updateListEntryFromExternalId (cognitive 37) lib/controllers/services/simkl/simkl_service.dart:635 — SimklService.updateListEntryFromExternalId has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 6, loops 1 (4 pts), ternaries 1 (4 pts), error handling 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlayerController._trackOnline (cognitive 37) · ×1
  • PlayerController._trackOnline (cognitive 37) lib/screens/anime/watch/controller/player_controller.dart:2857 — PlayerController._trackOnline has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 4 (10 pts), boolean chains 9, error handling 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _EpisodeListBuilderState.build (cognitive 37) · ×1
  • _EpisodeListBuilderState.build (cognitive 37) lib/screens/anime/widgets/episode_list_builder.dart:446 — _EpisodeListBuilderState.build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 5 (12 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderController._performFinalSave (cognitive 37) · ×1
  • ReaderController._performFinalSave (cognitive 37) lib/screens/manga/controller/reader_controller.dart:650 — ReaderController._performFinalSave has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 10, error handling 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _WatchiumPageState._buildRoomCard (cognitive 37) · ×1
  • _WatchiumPageState._buildRoomCard (cognitive 37) lib/screens/watchium/watchium_page.dart:1135 — _WatchiumPageState._buildRoomCard has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 13 (14 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SyncSubsContentState._buildCueViewer (cognitive 36) · ×1
  • _SyncSubsContentState._buildCueViewer (cognitive 36) lib/screens/anime/watch/controls/widgets/sync_subs_popup.dart:194 — _SyncSubsContentState._buildCueViewer has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 9 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderController.fetchImages (cognitive 36) · ×1
  • ReaderController.fetchImages (cognitive 36) lib/screens/manga/controller/reader_controller.dart:1850 — ReaderController.fetchImages has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (25 pts), boolean chains 6, ternaries 2 (4 pts), error handling 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _CommentSectionState._buildCommentItem (cognitive 35) · ×1
  • _CommentSectionState._buildCommentItem (cognitive 35) lib/screens/anime/widgets/comments/comments_section.dart:1852 — _CommentSectionState._buildCommentItem has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 8 (11 pts), boolean chains 8 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _MentionAutocompleteState._searchUsers (cognitive 35) · ×1
  • _MentionAutocompleteState._searchUsers (cognitive 35) lib/screens/anime/widgets/comments/mention_autocomplete.dart:122 — _MentionAutocompleteState._searchUsers has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 7, loops 2 (6 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderController.loadNextChapterInline (cognitive 35) · ×1
  • ReaderController.loadNextChapterInline (cognitive 35) lib/screens/manga/controller/reader_controller.dart:285 — ReaderController.loadNextChapterInline has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (6 pts), ternaries 2 (5 pts), boolean chains 4, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CompatibilityResultPageState._buildSectionGrid (cognitive 35) · ×1
  • _CompatibilityResultPageState._buildSectionGrid (cognitive 35) lib/screens/profile/compatibility/compatibility_result_page.dart:621 — _CompatibilityResultPageState._buildSectionGrid has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchiumPageState._joinByCode (cognitive 35) · ×1
  • _WatchiumPageState._joinByCode (cognitive 35) lib/screens/watchium/watchium_page.dart:132 — _WatchiumPageState._joinByCode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (27 pts), ternaries 2 (6 pts), boolean chains 1, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState._loadFromProvider (cognitive 35) · ×1
  • _SubsamplingScaleImageViewState._loadFromProvider (cognitive 35) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:612 — _SubsamplingScaleImageViewState._loadFromProvider has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (31 pts), error handling 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService._restoreRuntimeHost (cognitive 34) · ×1
  • BackupRestoreService._restoreRuntimeHost (cognitive 34) lib/controllers/services/backup_restore/backup_restore_service.dart:1068 — BackupRestoreService._restoreRuntimeHost has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GridAnimeCardState.build (cognitive 34) · ×1
  • _GridAnimeCardState.build (cognitive 34) lib/screens/anime/misc/calendar.dart:631 — _GridAnimeCardState.build has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 9 (14 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SearchPageState._buildFilterChips (cognitive 34) · ×1
  • _SearchPageState._buildFilterChips (cognitive 34) lib/screens/search/search_view.dart:1127 — _SearchPageState._buildFilterChips has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 4 (11 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _LogoAnimationPreviewDialogState._showAddCustomLogoDialog (cognitive 34) · ×1
  • _LogoAnimationPreviewDialogState._showAddCustomLogoDialog (cognitive 34) lib/widgets/dialogs/logo_animation_preview_dialog.dart:96 — _LogoAnimationPreviewDialogState._showAddCustomLogoDialog has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 7 (12 pts), error handling 3 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ActivityCardState.build (cognitive 34) · ×1
  • _ActivityCardState.build (cognitive 34) lib/widgets/non_widgets/activity_card.dart:522 — _ActivityCardState.build has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (21 pts), ternaries 6 (7 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState.build (cognitive 34) · ×1
  • _SubsamplingScaleImageViewState.build (cognitive 34) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:1397 — _SubsamplingScaleImageViewState.build has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 10, if/else 6 (9 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SimklApi.fetchDetails (cognitive 33) · ×1
  • SimklApi.fetchDetails (cognitive 33) lib/controllers/services/simkl/simkl_api.dart:16 — SimklApi.fetchDetails has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 3 (7 pts), boolean chains 6, error handling 2 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThemeRenderer._buildTitleAreaThing (cognitive 33) · ×1
  • ThemeRenderer._buildTitleAreaThing (cognitive 33) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:405 — ThemeRenderer._buildTitleAreaThing has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 3, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GifPickerSheetState._fetchTrending (cognitive 33) · ×1
  • _GifPickerSheetState._fetchTrending (cognitive 33) lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart:79 — _GifPickerSheetState._fetchTrending has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 2 (6 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_GifPickerSheetState._searchGifs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _GifPickerSheetState._searchGifs (cognitive 33) · ×1
  • _GifPickerSheetState._searchGifs (cognitive 33) lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart:164 — _GifPickerSheetState._searchGifs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 2 (6 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_GifPickerSheetState._fetchTrending) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LocalSourceController._requestPermission (cognitive 33) · ×1
  • LocalSourceController._requestPermission (cognitive 33) lib/screens/local_source/controller/local_source_controller.dart:181 — LocalSourceController._requestPermission has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (30 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _ProfilePageState._buildOverviewTab (cognitive 32) · ×1
  • _ProfilePageState._buildOverviewTab (cognitive 32) lib/screens/profile/profile_page.dart:754 — _ProfilePageState._buildOverviewTab has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 10, if/else 9 (10 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _UserProfilePageState._buildOverviewTab (cognitive 32) · ×1
  • _UserProfilePageState._buildOverviewTab (cognitive 32) lib/screens/profile/user_profile_page.dart:726 — _UserProfilePageState._buildOverviewTab has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 10, if/else 9 (10 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _SearchPageState._loadMoreResults (cognitive 32) · ×1
  • _SearchPageState._loadMoreResults (cognitive 32) lib/screens/search/search_view.dart:573 — _SearchPageState._loadMoreResults has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsAddonsState._buildTorrServerTile (cognitive 32) · ×1
  • _SettingsAddonsState._buildTorrServerTile (cognitive 32) lib/screens/settings/sub_settings/settings_addons.dart:210 — _SettingsAddonsState._buildTorrServerTile has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 13 (24 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsPlayerState.build (cognitive 32) · ×1
  • _SettingsPlayerState.build (cognitive 32) lib/screens/settings/sub_settings/settings_player.dart:1216 — _SettingsPlayerState.build has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 7 (15 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfiImageDecoder._cIsolateEntryPoint (cognitive 32) · ×1
  • FfiImageDecoder._cIsolateEntryPoint (cognitive 32) lib/widgets/subsampling_scale_image_view/ffi_image_decoder.dart:203 — FfiImageDecoder._cIsolateEntryPoint has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppNamePackageManager.getCurrentConfig (cognitive 31) · ×1
  • AppNamePackageManager.getCurrentConfig (cognitive 31) package_manager.dart:105 — AppNamePackageManager.getCurrentConfig has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (30 pts), error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChapterListBuilderState._onTap (cognitive 31) · ×1
  • _ChapterListBuilderState._onTap (cognitive 31) lib/screens/manga/widgets/chapter_list_builder.dart:220 — _ChapterListBuilderState._onTap has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ActivityHeatmapState.build (cognitive 31) · ×1
  • _ActivityHeatmapState.build (cognitive 31) lib/screens/profile/widgets/activity_heatmap.dart:52 — _ActivityHeatmapState.build has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, loops 3, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsUiState._buildFontFamilyPickerContent (cognitive 31) · ×1
  • _SettingsUiState._buildFontFamilyPickerContent (cognitive 31) lib/screens/settings/sub_settings/settings_ui.dart:581 — _SettingsUiState._buildFontFamilyPickerContent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (24 pts), ternaries 3, boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentumService.updateCustomizations (cognitive 31) · ×1
  • CommentumService.updateCustomizations (cognitive 31) lib/services/commentum_service.dart:1503 — CommentumService.updateCustomizations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (30 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState.didUpdateWidget (cognitive 31) · ×1
  • _SubsamplingScaleImageViewState.didUpdateWidget (cognitive 31) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:512 — _SubsamplingScaleImageViewState.didUpdateWidget has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (7 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityService._buildSubmitBody (cognitive 30) · ×1
  • CommunityService._buildSubmitBody (cognitive 30) lib/controllers/services/community_service.dart:953 — CommunityService._buildSubmitBody has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MalService.updateListEntry (cognitive 30) · ×1
  • MalService.updateListEntry (cognitive 30) lib/controllers/services/mal/mal_service.dart:785 — MalService.updateListEntry has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerController._initPhysicalOrientationListener (cognitive 30) · ×1
  • PlayerController._initPhysicalOrientationListener (cognitive 30) lib/screens/anime/watch/controller/player_controller.dart:725 — PlayerController._initPhysicalOrientationListener has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 2, error handling 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EpisodesPane.build (cognitive 30) · ×1
  • EpisodesPane.build (cognitive 30) lib/screens/anime/watch/controls/widgets/episodes_pane.dart:197 — EpisodesPane.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 9 (13 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscordMarkdown.build (cognitive 30) · ×1
  • DiscordMarkdown.build (cognitive 30) lib/screens/anime/widgets/comments/discord_markdown.dart:36 — DiscordMarkdown.build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LeaderboardSheetState._buildLeaderboardTile (cognitive 30) · ×1
  • _LeaderboardSheetState._buildLeaderboardTile (cognitive 30) lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart:324 — _LeaderboardSheetState._buildLeaderboardTile has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 14, if/else 10 (11 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _ListEditorModalState.initState (cognitive 30) · ×1
  • _ListEditorModalState.initState (cognitive 30) lib/screens/anime/widgets/list_editor.dart:157 — _ListEditorModalState.initState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 10, ternaries 3 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReaderController.onScrollNotification (cognitive 30) · ×1
  • ReaderController.onScrollNotification (cognitive 30) lib/screens/manga/controller/reader_controller.dart:1051 — ReaderController.onScrollNotification has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _SearchPageState._buildControlsSection (cognitive 30) · ×1
  • _SearchPageState._buildControlsSection (cognitive 30) lib/screens/search/search_view.dart:787 — _SearchPageState._buildControlsSection has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UpdateManager._shouldUpdate (cognitive 30) · ×1
  • UpdateManager._shouldUpdate (cognitive 30) lib/utils/updater.dart:180 — UpdateManager._shouldUpdate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GridAnimeCard.build (cognitive 30) · ×1
  • GridAnimeCard.build (cognitive 30) lib/widgets/media_items/media_item.dart:115 — GridAnimeCard.build has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 17 (22 pts), boolean chains 5, if/else 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AnilistErrorHandler.extractErrorMessage (cognitive 29) · ×1
  • AnilistErrorHandler.extractErrorMessage (cognitive 29) lib/controllers/services/anilist/anilist_error_handler.dart:9 — AnilistErrorHandler.extractErrorMessage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 2, error handling 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Database.init (cognitive 29) · ×1
  • Database.init (cognitive 29) lib/database/database.dart:42 — Database.init has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 5 (12 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderController._initTracking (cognitive 29) · ×1
  • ReaderController._initTracking (cognitive 29) lib/screens/manga/controller/reader_controller.dart:1468 — ReaderController._initTracking has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (14 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NovelReaderController.onScrollNotification (cognitive 29) · ×1
  • NovelReaderController.onScrollNotification (cognitive 29) lib/screens/novel/reader/controller/reader_controller.dart:1307 — NovelReaderController.onScrollNotification has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 10 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CompatibilityInputPageState._onUserChanged (cognitive 29) · ×1
  • _CompatibilityInputPageState._onUserChanged (cognitive 29) lib/screens/profile/compatibility/compatibility_input_page.dart:118 — _CompatibilityInputPageState._onUserChanged has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UserProfilePageState._fetchProfile (cognitive 29) · ×1
  • _UserProfilePageState._fetchProfile (cognitive 29) lib/screens/profile/user_profile_page.dart:113 — _UserProfilePageState._fetchProfile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 3, error handling 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.
D2 · Cognitive Complexity · DesktopProfileHeader.build (cognitive 29) · ×1
  • DesktopProfileHeader.build (cognitive 29) lib/screens/profile/widgets/profile_header.dart:73 — DesktopProfileHeader.build has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 9 (11 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _PressableHighlightCardState.build (cognitive 29) · ×1
  • _PressableHighlightCardState.build (cognitive 29) lib/screens/profile/widgets/stats_overview_cards.dart:461 — _PressableHighlightCardState.build has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 21 (23 pts), if/else 4, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _SearchPageState._performSingleSourceSearch (cognitive 29) · ×1
  • _SearchPageState._performSingleSourceSearch (cognitive 29) lib/screens/search/search_view.dart:344 — _SearchPageState._performSingleSourceSearch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (8 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CastV2Client._decodeCastMessage (cognitive 29) · ×1
  • CastV2Client._decodeCastMessage (cognitive 29) lib/services/cast/cast_v2_client.dart:186 — CastV2Client._decodeCastMessage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (7 pts), boolean chains 2, error handling 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.
D2 · Cognitive Complexity · PlatformBuilderWithTablet.build (cognitive 29) · ×1
  • PlatformBuilderWithTablet.build (cognitive 29) lib/widgets/helper/platform_builder.dart:178 — PlatformBuilderWithTablet.build has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 8 (10 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState._handleScaleUpdate (cognitive 29) · ×1
  • _SubsamplingScaleImageViewState._handleScaleUpdate (cognitive 29) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:1237 — _SubsamplingScaleImageViewState._handleScaleUpdate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · __ListMediaEditorBottomSheetState.build (cognitive 28) · ×1
  • __ListMediaEditorBottomSheetState.build (cognitive 28) lib/screens/library/editor/list_editor.dart:831 — __ListMediaEditorBottomSheetState.build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 7 (10 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentumService.createComment (cognitive 28) · ×1
  • CommentumService.createComment (cognitive 28) lib/services/commentum_service.dart:246 — CommentumService.createComment has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppAbiDetector.getCurrentAppAbi (cognitive 28) · ×1
  • AppAbiDetector.getCurrentAppAbi (cognitive 28) lib/utils/abi_checker.dart:8 — AppAbiDetector.getCurrentAppAbi has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, error handling 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnilistData.homeWidgets (cognitive 27) · ×1
  • AnilistData.homeWidgets (cognitive 27) lib/controllers/services/anilist/anilist_data.dart:113 — AnilistData.homeWidgets has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MalService.deleteListEntry (cognitive 27) · ×1
  • MalService.deleteListEntry (cognitive 27) lib/controllers/services/mal/mal_service.dart:886 — MalService.deleteListEntry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 4 (8 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadController._ensureNoMediaInTempDirs (cognitive 27) · ×1
  • DownloadController._ensureNoMediaInTempDirs (cognitive 27) lib/screens/downloads/controller/download_controller.dart:1519 — DownloadController._ensureNoMediaInTempDirs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), error handling 2 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChapterListBuilderState.build (cognitive 27) · ×1
  • _ChapterListBuilderState.build (cognitive 27) lib/screens/manga/widgets/chapter_list_builder.dart:290 — _ChapterListBuilderState.build has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 4, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChapterListBuilderState._buildChapterDownloadButton (cognitive 27) · ×1
  • _ChapterListBuilderState._buildChapterDownloadButton (cognitive 27) lib/screens/manga/widgets/chapter_list_builder.dart:1043 — _ChapterListBuilderState._buildChapterDownloadButton has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (9 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DecorationClosetSheetState._onSavePressed (cognitive 27) · ×1
  • _DecorationClosetSheetState._onSavePressed (cognitive 27) lib/screens/profile/widgets/decoration_closet_sheet.dart:131 — _DecorationClosetSheetState._onSavePressed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 4, loops 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.
D2 · Cognitive Complexity · OfflineStorageController.addMedia (cognitive 26) · ×1
  • OfflineStorageController.addMedia (cognitive 26) lib/controllers/offline/offline_storage_controller.dart:543 — OfflineStorageController.addMedia has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (13 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AnilistData.fetchStudioDetails (cognitive 26) · ×1
  • AnilistData.fetchStudioDetails (cognitive 26) lib/controllers/services/anilist/anilist_data.dart:733 — AnilistData.fetchStudioDetails has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService._buildBackupData (cognitive 26) · ×1
  • BackupRestoreService._buildBackupData (cognitive 26) lib/controllers/services/backup_restore/backup_restore_service.dart:447 — BackupRestoreService._buildBackupData has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 16, boolean chains 9, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SourceController._activateByName (cognitive 26) · ×1
  • SourceController._activateByName (cognitive 26) lib/controllers/source/source_controller.dart:396 — SourceController._activateByName has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Media.fromSmallSimkl (cognitive 26) · ×1
  • Media.fromSmallSimkl (cognitive 26) lib/models/Media/media.dart:897 — Media.fromSmallSimkl has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 7 (10 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ContinuousReaderViewState._buildImage (cognitive 26) · ×1
  • _ContinuousReaderViewState._buildImage (cognitive 26) lib/screens/manga/widgets/reader/continuous_reader.dart:366 — _ContinuousReaderViewState._buildImage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CastProxyServer._rewriteHlsMasterManifest (cognitive 26) · ×1
  • CastProxyServer._rewriteHlsMasterManifest (cognitive 26) lib/services/cast/cast_proxy_server.dart:261 — CastProxyServer._rewriteHlsMasterManifest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnymeXTileBuilder.build (cognitive 26) · ×1
  • AnymeXTileBuilder.build (cognitive 26) lib/widgets/anymex_widgets/anymex_tile_builder.dart:60 — AnymeXTileBuilder.build has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 5 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FilterScreenState._getNavItemForTab (cognitive 25) · ×1
  • _FilterScreenState._getNavItemForTab (cognitive 25) lib/main.dart:564 — _FilterScreenState._getNavItemForTab has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 8 (10 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnilistAuth._anilistPost (cognitive 25) · ×1
  • AnilistAuth._anilistPost (cognitive 25) lib/controllers/services/anilist/anilist_auth.dart:105 — AnilistAuth._anilistPost has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaDetailsController._initActiveSource (cognitive 25) · ×1
  • MediaDetailsController._initActiveSource (cognitive 25) lib/screens/anime/details/controller/media_details_controller.dart:232 — MediaDetailsController._initActiveSource has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (10 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DownloadedMediaViewState._buildContinueFab (cognitive 25) · ×1
  • _DownloadedMediaViewState._buildContinueFab (cognitive 25) lib/screens/downloads/widgets/downloaded_media_view.dart:170 — _DownloadedMediaViewState._buildContinueFab has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AnymeXModerationActionSheetState.build (cognitive 25) · ×1
  • _AnymeXModerationActionSheetState.build (cognitive 25) lib/screens/settings/sub_settings/widgets/moderation_action_sheet.dart:262 — _AnymeXModerationActionSheetState.build has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (16 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchiumPageState._joinRoomFromCard (cognitive 25) · ×1
  • _WatchiumPageState._joinRoomFromCard (cognitive 25) lib/screens/watchium/watchium_page.dart:1062 — _WatchiumPageState._joinRoomFromCard has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentumService.deleteComment (cognitive 25) · ×1
  • CommentumService.deleteComment (cognitive 25) lib/services/commentum_service.dart:391 — CommentumService.deleteComment has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LogoAnimationPreviewDialogState._buildAnimationList (cognitive 25) · ×1
  • _LogoAnimationPreviewDialogState._buildAnimationList (cognitive 25) lib/widgets/dialogs/logo_animation_preview_dialog.dart:835 — _LogoAnimationPreviewDialogState._buildAnimationList has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (21 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TilingEngine.initialiseTileMap (cognitive 25) · ×1
  • TilingEngine.initialiseTileMap (cognitive 25) lib/widgets/subsampling_scale_image_view/tiling_engine.dart:31 — TilingEngine.initialiseTileMap has cognitive complexity 25 (threshold 15). Drivers by points: loops 5 (10 pts), ternaries 2 (8 pts), boolean chains 4, if/else 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GistSyncService.syncGistHtmlUrl (cognitive 24) · ×1
  • GistSyncService.syncGistHtmlUrl (cognitive 24) lib/controllers/sync/gist_sync_service.dart:289 — GistSyncService.syncGistHtmlUrl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _DoubleTapSeekWidgetState._setPlaybackRate (cognitive 24) · ×1
  • _DoubleTapSeekWidgetState._setPlaybackRate (cognitive 24) lib/screens/anime/watch/controls/widgets/double_tap_seek.dart:278 — _DoubleTapSeekWidgetState._setPlaybackRate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (23 pts), error handling 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CharactersCarousel.build (cognitive 24) · ×1
  • CharactersCarousel.build (cognitive 24) lib/screens/anime/widgets/voice_actor.dart:19 — CharactersCarousel.build has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NovelReaderController._cleanHtmlTags (cognitive 24) · ×1
  • NovelReaderController._cleanHtmlTags (cognitive 24) lib/screens/novel/reader/controller/reader_controller.dart:912 — NovelReaderController._cleanHtmlTags has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, loops 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _NovelContentWidgetState.build (cognitive 24) · ×1
  • _NovelContentWidgetState.build (cognitive 24) lib/screens/novel/reader/widgets/novel_content.dart:40 — _NovelContentWidgetState.build has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _DictionarySheetState._lookup (cognitive 24) · ×1
  • _DictionarySheetState._lookup (cognitive 24) lib/screens/novel/reader/widgets/novel_content.dart:286 — _DictionarySheetState._lookup has cognitive complexity 24 (threshold 15). Drivers by points: loops 3 (12 pts), if/else 5 (11 pts), error handling 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _CompatibilityResultPageState._showCommonMediaSheet (cognitive 24) · ×1
  • _CompatibilityResultPageState._showCommonMediaSheet (cognitive 24) lib/screens/profile/compatibility/compatibility_result_page.dart:1287 — _CompatibilityResultPageState._showCommonMediaSheet has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 5 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopStatsGrid.build (cognitive 24) · ×1
  • DesktopStatsGrid.build (cognitive 24) lib/screens/profile/widgets/stats_overview_cards.dart:15 — DesktopStatsGrid.build has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 4, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _WatchiumPageState._buildCurrentRoomSection (cognitive 24) · ×1
  • _WatchiumPageState._buildCurrentRoomSection (cognitive 24) lib/screens/watchium/watchium_page.dart:783 — _WatchiumPageState._buildCurrentRoomSection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (8 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaSyncer.getSimklIdFromExternal (cognitive 24) · ×1
  • MediaSyncer.getSimklIdFromExternal (cognitive 24) lib/utils/media_syncer.dart:58 — MediaSyncer.getSimklIdFromExternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfiImageDecoder._processNext (cognitive 24) · ×1
  • FfiImageDecoder._processNext (cognitive 24) lib/widgets/subsampling_scale_image_view/ffi_image_decoder.dart:400 — FfiImageDecoder._processNext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _WatchiumCreateSheetState._joinRoom (cognitive 24) · ×1
  • _WatchiumCreateSheetState._joinRoom (cognitive 24) lib/widgets/watchium/watchium_create_dialog.dart:608 — _WatchiumCreateSheetState._joinRoom has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnilistAuth._fetchUserDetailsInternal (cognitive 23) · ×1
  • AnilistAuth._fetchUserDetailsInternal (cognitive 23) lib/controllers/services/anilist/anilist_auth.dart:837 — AnilistAuth._fetchUserDetailsInternal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchiumService._connectSocket (cognitive 23) · ×1
  • WatchiumService._connectSocket (cognitive 23) lib/controllers/watchium/watchium_service.dart:172 — WatchiumService._connectSocket has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (17 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TrackedMedia.formattedProgress (cognitive 23) · ×1
  • TrackedMedia.formattedProgress (cognitive 23) lib/models/Anilist/anilist_media_user.dart:149 — TrackedMedia.formattedProgress has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _CalendarState.build (cognitive 23) · ×1
  • _CalendarState.build (cognitive 23) lib/screens/anime/misc/calendar.dart:434 — _CalendarState.build has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 8, boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ThemeRenderer._makeButtonThing (cognitive 23) · ×1
  • ThemeRenderer._makeButtonThing (cognitive 23) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:716 — ThemeRenderer._makeButtonThing has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 6, boolean chains 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ThemeRenderer._resolveColor (cognitive 23) · ×1
  • ThemeRenderer._resolveColor (cognitive 23) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1279 — ThemeRenderer._resolveColor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UserCommentsSheetContentState.build (cognitive 23) · ×1
  • _UserCommentsSheetContentState.build (cognitive 23) lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart:80 — _UserCommentsSheetContentState.build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, ternaries 3 (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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MinimalEpisodeWidget.build (cognitive 23) · ×1
  • MinimalEpisodeWidget.build (cognitive 23) lib/screens/anime/widgets/episode/styles/minimal_style.dart:30 — MinimalEpisodeWidget.build has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9, boolean chains 8, if/else 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DownloadController._runEpisodeDownload (cognitive 23) · ×1
  • DownloadController._runEpisodeDownload (cognitive 23) lib/screens/downloads/controller/download_controller.dart:714 — DownloadController._runEpisodeDownload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DownloadScreenState._buildChapterStep (cognitive 23) · ×1
  • _DownloadScreenState._buildChapterStep (cognitive 23) lib/screens/downloads/download_screen.dart:1206 — _DownloadScreenState._buildChapterStep has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 12, if/else 7, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _ChapterListSheetState.build (cognitive 23) · ×1
  • _ChapterListSheetState.build (cognitive 23) lib/screens/manga/widgets/reader/top_controls.dart:288 — _ChapterListSheetState.build has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 16, ternaries 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ChapterListItem.build (cognitive 23) · ×1
  • ChapterListItem.build (cognitive 23) lib/screens/novel/details/widgets/chapter_item.dart:34 — ChapterListItem.build has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 18, ternaries 3, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · FavoritesSection.build (cognitive 23) · ×1
  • FavoritesSection.build (cognitive 23) lib/screens/profile/widgets/favorites_section.dart:35 — FavoritesSection.build has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (7 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CastProxyServer._resolveLocalIp (cognitive 23) · ×1
  • CastProxyServer._resolveLocalIp (cognitive 23) lib/services/cast/cast_proxy_server.dart:61 — CastProxyServer._resolveLocalIp has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 7, loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TilingEngine.refreshRequiredTiles (cognitive 23) · ×1
  • TilingEngine.refreshRequiredTiles (cognitive 23) lib/widgets/subsampling_scale_image_view/tiling_engine.dart:112 — TilingEngine.refreshRequiredTiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JikanService.getFillerEpisodes (cognitive 22) · ×1
  • JikanService.getFillerEpisodes (cognitive 22) lib/controllers/services/jikan.dart:7 — JikanService.getFillerEpisodes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (6 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GistSyncCard.build (cognitive 22) · ×1
  • _GistSyncCard.build (cognitive 22) lib/controllers/sync/progress_sync_section.dart:35 — _GistSyncCard.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._trackLocally (cognitive 22) · ×1
  • PlayerController._trackLocally (cognitive 22) lib/screens/anime/watch/controller/player_controller.dart:2775 — PlayerController._trackLocally has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (5 pts), ternaries 2 (4 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Ios26PlayerControlTheme.buildBottomControls (cognitive 22) · ×1
  • Ios26PlayerControlTheme.buildBottomControls (cognitive 22) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:229 — Ios26PlayerControlTheme.buildBottomControls has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 13 (15 pts), if/else 4 (5 pts), 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.
D2 · Cognitive Complexity · _BottomSheetListItemState.build (cognitive 22) · ×1
  • _BottomSheetListItemState.build (cognitive 22) lib/screens/anime/watch/controls/widgets/bottom_sheet.dart:285 — _BottomSheetListItemState.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (14 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _CommentSectionState._buildReplyItem (cognitive 22) · ×1
  • _CommentSectionState._buildReplyItem (cognitive 22) lib/screens/anime/widgets/comments/comments_section.dart:1496 — _CommentSectionState._buildReplyItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 9, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CommentSectionController.formatCommentTimestamp (cognitive 22) · ×1
  • CommentSectionController.formatCommentTimestamp (cognitive 22) lib/screens/anime/widgets/comments/controller/comments_controller.dart:427 — CommentSectionController.formatCommentTimestamp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DownloadServerSelectorState._fetchServers (cognitive 22) · ×1
  • _DownloadServerSelectorState._fetchServers (cognitive 22) lib/screens/downloads/widgets/download_server_selector.dart:82 — _DownloadServerSelectorState._fetchServers has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChapterSliverSectionState._findContinueChapter (cognitive 22) · ×1
  • _ChapterSliverSectionState._findContinueChapter (cognitive 22) lib/screens/novel/details/widgets/chapters_section.dart:167 — _ChapterSliverSectionState._findContinueChapter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 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.
D2 · Cognitive Complexity · ListStatusCard.build (cognitive 22) · ×1
  • ListStatusCard.build (cognitive 22) lib/screens/profile/widgets/list_status_card.dart:28 — ListStatusCard.build has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 16 (17 pts), if/else 4, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _FuturisticFilterSheetState._fetchFilterData (cognitive 22) · ×1
  • _FuturisticFilterSheetState._fetchFilterData (cognitive 22) lib/screens/search/widgets/search_widgets.dart:438 — _FuturisticFilterSheetState._fetchFilterData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsAnilistApiState._buildAboutEditor (cognitive 22) · ×1
  • _SettingsAnilistApiState._buildAboutEditor (cognitive 22) lib/screens/settings/sub_settings/settings_anilist_api.dart:771 — _SettingsAnilistApiState._buildAboutEditor has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 4 (5 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FullscreenImageViewerState._shareImage (cognitive 22) · ×1
  • _FullscreenImageViewerState._shareImage (cognitive 22) lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:148 — _FullscreenImageViewerState._shareImage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MarkdownListInputFormatter.formatEditUpdate (cognitive 22) · ×1
  • MarkdownListInputFormatter.formatEditUpdate (cognitive 22) lib/widgets/non_widgets/activity_composer_sheet.dart:705 — MarkdownListInputFormatter.formatEditUpdate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _WatchiumPartyPopupContentState._buildChat (cognitive 22) · ×1
  • _WatchiumPartyPopupContentState._buildChat (cognitive 22) lib/widgets/watchium/watchium_party_popup.dart:305 — _WatchiumPartyPopupContentState._buildChat has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 6, if/else 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AnilistAuth.formatScore (cognitive 21) · ×1
  • AnilistAuth.formatScore (cognitive 21) lib/controllers/services/anilist/anilist_auth.dart:49 — AnilistAuth.formatScore has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 4 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupRestoreService.isBackupEncrypted (cognitive 21) · ×1
  • BackupRestoreService.isBackupEncrypted (cognitive 21) lib/controllers/services/backup_restore/backup_restore_service.dart:1588 — BackupRestoreService.isBackupEncrypted has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityService.castVote (cognitive 21) · ×1
  • CommunityService.castVote (cognitive 21) lib/controllers/services/community_service.dart:827 — CommunityService.castVote has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchiumService.createRoom (cognitive 21) · ×1
  • WatchiumService.createRoom (cognitive 21) lib/controllers/watchium/watchium_service.dart:468 — WatchiumService.createRoom has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _StudioDetailsSheetContentState.build (cognitive 21) · ×1
  • _StudioDetailsSheetContentState.build (cognitive 21) lib/screens/anime/studio_details_page.dart:118 — _StudioDetailsSheetContentState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 6 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayerController._findBestMatchingTrack (cognitive 21) · ×1
  • PlayerController._findBestMatchingTrack (cognitive 21) lib/screens/anime/watch/controller/player_controller.dart:1731 — PlayerController._findBestMatchingTrack has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 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.
D2 · Cognitive Complexity · _DoubleTapSeekWidgetState.build (cognitive 21) · ×1
  • _DoubleTapSeekWidgetState.build (cognitive 21) lib/screens/anime/watch/controls/widgets/double_tap_seek.dart:820 — _DoubleTapSeekWidgetState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11, if/else 7, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _CommentSectionState._buildCommentWithReplies (cognitive 21) · ×1
  • _CommentSectionState._buildCommentWithReplies (cognitive 21) lib/screens/anime/widgets/comments/comments_section.dart:1104 — _CommentSectionState._buildCommentWithReplies has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _LeaderboardSheetState.build (cognitive 21) · ×1
  • _LeaderboardSheetState.build (cognitive 21) lib/screens/anime/widgets/comments/widgets/leaderboard_sheet.dart:91 — _LeaderboardSheetState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ServerSheetContentState._checkAndAutoSelect (cognitive 21) · ×1
  • _ServerSheetContentState._checkAndAutoSelect (cognitive 21) lib/screens/anime/widgets/episode_list_builder.dart:1549 — _ServerSheetContentState._checkAndAutoSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _HistoryEditorState._buildHistoryCard (cognitive 21) · ×1
  • _HistoryEditorState._buildHistoryCard (cognitive 21) lib/screens/library/editor/history_editor.dart:477 — _HistoryEditorState._buildHistoryCard has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 12 (15 pts), if/else 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.
D2 · Cognitive Complexity · _AnimeListState.initState (cognitive 21) · ×1
  • _AnimeListState.initState (cognitive 21) lib/screens/library/online/anime_list.dart:104 — _AnimeListState.initState has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NovelReaderController._mapPlainToHtmlOffset (cognitive 21) · ×1
  • NovelReaderController._mapPlainToHtmlOffset (cognitive 21) lib/screens/novel/reader/controller/reader_controller.dart:523 — NovelReaderController._mapPlainToHtmlOffset has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CompatibilityInputPageState._submit (cognitive 21) · ×1
  • _CompatibilityInputPageState._submit (cognitive 21) lib/screens/profile/compatibility/compatibility_input_page.dart:204 — _CompatibilityInputPageState._submit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _UserMediaListPageState.build (cognitive 21) · ×1
  • _UserMediaListPageState.build (cognitive 21) lib/screens/profile/widgets/user_media_list_page.dart:522 — _UserMediaListPageState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 7 (8 pts), boolean chains 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _GroupFilterWidgetState.build (cognitive 21) · ×1
  • _GroupFilterWidgetState.build (cognitive 21) lib/screens/search/widgets/extension_filter_sheet.dart:539 — _GroupFilterWidgetState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 2 (5 pts), ternaries 4, boolean chains 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _UserListPageState._loadMoreUsers (cognitive 21) · ×1
  • _UserListPageState._loadMoreUsers (cognitive 21) lib/screens/settings/sub_settings/settings_moderation.dart:1371 — _UserListPageState._loadMoreUsers has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (6 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsUiState._showReorderTabsDialog (cognitive 21) · ×1
  • _SettingsUiState._showReorderTabsDialog (cognitive 21) lib/screens/settings/sub_settings/settings_ui.dart:279 — _SettingsUiState._showReorderTabsDialog has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 6 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CastService._castChromecast (cognitive 21) · ×1
  • CastService._castChromecast (cognitive 21) lib/services/cast/cast_service.dart:340 — CastService._castChromecast has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentumService._mapCommentumToAnymeXComment (cognitive 21) · ×1
  • CommentumService._mapCommentumToAnymeXComment (cognitive 21) lib/services/commentum_service.dart:1287 — CommentumService._mapCommentumToAnymeXComment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WatchOrderUtil.fetchWatchOrder (cognitive 21) · ×1
  • WatchOrderUtil.fetchWatchOrder (cognitive 21) lib/utils/watch_order_util.dart:99 — WatchOrderUtil.fetchWatchOrder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaHeader.build (cognitive 21) · ×1
  • MediaHeader.build (cognitive 21) lib/widgets/anime/media_header.dart:37 — MediaHeader.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 6, if/else 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MediaModeSelector._autoPlayLastMedia (cognitive 21) · ×1
  • MediaModeSelector._autoPlayLastMedia (cognitive 21) lib/widgets/common/media_mode_selector.dart:53 — MediaModeSelector._autoPlayLastMedia has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _FloatingPillNavBarState._buildMobileLayout (cognitive 21) · ×1
  • _FloatingPillNavBarState._buildMobileLayout (cognitive 21) lib/widgets/common/navbar/styles/floating_pill_navbar.dart:187 — _FloatingPillNavBarState._buildMobileLayout has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 5, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Header.build (cognitive 21) · ×1
  • Header.build (cognitive 21) lib/widgets/header/header.dart:73 — Header.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ActivityCardState._showActivityOptions (cognitive 21) · ×1
  • _ActivityCardState._showActivityOptions (cognitive 21) lib/widgets/non_widgets/activity_card.dart:150 — _ActivityCardState._showActivityOptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (7 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OfflineStorageController.addOrUpdateReadChapter (cognitive 20) · ×1
  • OfflineStorageController.addOrUpdateReadChapter (cognitive 20) lib/controllers/offline/offline_storage_controller.dart:809 — OfflineStorageController.addOrUpdateReadChapter has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GistSyncCard._importGistJson (cognitive 20) · ×1
  • _GistSyncCard._importGistJson (cognitive 20) lib/controllers/sync/progress_sync_section.dart:708 — _GistSyncCard._importGistJson has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentsDatabase.organizeComments (cognitive 20) · ×1
  • CommentsDatabase.organizeComments (cognitive 20) lib/database/comments/comments_db.dart:46 — CommentsDatabase.organizeComments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3, boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._isAutoSkipEnabledForCurrentSegment (cognitive 20) · ×1
  • PlayerController._isAutoSkipEnabledForCurrentSegment (cognitive 20) lib/screens/anime/watch/controller/player_controller.dart:263 — PlayerController._isAutoSkipEnabledForCurrentSegment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController.initializePlayerControlsIfNeeded (cognitive 20) · ×1
  • PlayerController.initializePlayerControlsIfNeeded (cognitive 20) lib/screens/anime/watch/controller/player_controller.dart:434 — PlayerController.initializePlayerControlsIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._resolveDecoderHwdec (cognitive 20) · ×1
  • PlayerController._resolveDecoderHwdec (cognitive 20) lib/screens/anime/watch/controller/player_controller.dart:1024 — PlayerController._resolveDecoderHwdec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PlayerController._loadLocalSubtitles (cognitive 20) · ×1
  • PlayerController._loadLocalSubtitles (cognitive 20) lib/screens/anime/watch/controller/player_controller.dart:1458 — PlayerController._loadLocalSubtitles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 1 (3 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaKitPlayer.initialize (cognitive 20) · ×1
  • MediaKitPlayer.initialize (cognitive 20) lib/screens/anime/watch/player/media_kit_player.dart:75 — MediaKitPlayer.initialize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (6 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _EpisodeListBuilderState._updateChunkIndex (cognitive 20) · ×1
  • _EpisodeListBuilderState._updateChunkIndex (cognitive 20) lib/screens/anime/widgets/episode_list_builder.dart:180 — _EpisodeListBuilderState._updateChunkIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 1 (4 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NovelReaderController._loadVoices (cognitive 20) · ×1
  • NovelReaderController._loadVoices (cognitive 20) lib/screens/novel/reader/controller/reader_controller.dart:568 — NovelReaderController._loadVoices has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ProfileStatsTabState._getVal (cognitive 20) · ×1
  • _ProfileStatsTabState._getVal (cognitive 20) lib/screens/profile/widgets/profile_stats_tab.dart:529 — _ProfileStatsTabState._getVal has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UserListPageState._loadUsers (cognitive 20) · ×1
  • _UserListPageState._loadUsers (cognitive 20) lib/screens/settings/sub_settings/settings_moderation.dart:1329 — _UserListPageState._loadUsers has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (5 pts), boolean chains 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UserStatsPageState.build (cognitive 20) · ×1
  • _UserStatsPageState.build (cognitive 20) lib/screens/stats/user_stats_page.dart:98 — _UserStatsPageState.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _WatchiumPageState._buildJoinByCodeSection (cognitive 20) · ×1
  • _WatchiumPageState._buildJoinByCodeSection (cognitive 20) lib/screens/watchium/watchium_page.dart:571 — _WatchiumPageState._buildJoinByCodeSection has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 7 (8 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CastService._startRokuAndSsdpDiscovery (cognitive 20) · ×1
  • CastService._startRokuAndSsdpDiscovery (cognitive 20) lib/services/cast/cast_service.dart:177 — CastService._startRokuAndSsdpDiscovery has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CastService.stopCasting (cognitive 20) · ×1
  • CastService.stopCasting (cognitive 20) lib/services/cast/cast_service.dart:657 — CastService.stopCasting has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (9 pts), if/else 5 (9 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AnilistAboutMeState._openUrl (cognitive 20) · ×1
  • _AnilistAboutMeState._openUrl (cognitive 20) lib/utils/al_about_me.dart:403 — _AnilistAboutMeState._openUrl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaDownloader.download (cognitive 20) · ×1
  • MediaDownloader.download (cognitive 20) lib/utils/media_downloader.dart:96 — MediaDownloader.download has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubtitlePreTranslator.preTranslateFromUrl (cognitive 20) · ×1
  • SubtitlePreTranslator.preTranslateFromUrl (cognitive 20) lib/utils/subtitle_pre_translator.dart:42 — SubtitlePreTranslator.preTranslateFromUrl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AnymeXImageState.build (cognitive 20) · ×1
  • _AnymeXImageState.build (cognitive 20) lib/widgets/anymex_widgets/anymex_image.dart:186 — _AnymeXImageState.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _NavBarItemState.build (cognitive 20) · ×1
  • _NavBarItemState.build (cognitive 20) lib/widgets/common/navbar.dart:135 — _NavBarItemState.build has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState._loadTile (cognitive 20) · ×1
  • _SubsamplingScaleImageViewState._loadTile (cognitive 20) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:1139 — _SubsamplingScaleImageViewState._loadTile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReasonUserProfile.matchesUser (cognitive 19) · ×1
  • ReasonUserProfile.matchesUser (cognitive 19) lib/controllers/services/community_service.dart:124 — ReasonUserProfile.matchesUser has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CustomizationRepository.loadBanners (cognitive 19) · ×1
  • CustomizationRepository.loadBanners (cognitive 19) lib/database/comments/model/user_customization.dart:234 — CustomizationRepository.loadBanners has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, loops 1 (3 pts), error handling 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MediaDetailsController.fetchSourceDetailsFromMedia (cognitive 19) · ×1
  • MediaDetailsController.fetchSourceDetailsFromMedia (cognitive 19) lib/screens/anime/details/controller/media_details_controller.dart:646 — MediaDetailsController.fetchSourceDetailsFromMedia has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ListExporterPageState._convertTrackedListToMalXml (cognitive 19) · ×1
  • _ListExporterPageState._convertTrackedListToMalXml (cognitive 19) lib/screens/anime/misc/list_exporter.dart:82 — _ListExporterPageState._convertTrackedListToMalXml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (8 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ListExporterPageState.build (cognitive 19) · ×1
  • _ListExporterPageState.build (cognitive 19) lib/screens/anime/misc/list_exporter.dart:358 — _ListExporterPageState.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 13 (17 pts), if/else 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PlayerController._openWithCloudFallback (cognitive 19) · ×1
  • PlayerController._openWithCloudFallback (cognitive 19) lib/screens/anime/watch/controller/player_controller.dart:1044 — PlayerController._openWithCloudFallback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IosLegacyPlayerControlTheme.buildBottomControls (cognitive 19) · ×1
  • IosLegacyPlayerControlTheme.buildBottomControls (cognitive 19) lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:265 — IosLegacyPlayerControlTheme.buildBottomControls has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 13 (15 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ThemeRenderer._buildThreeColumnRow (cognitive 19) · ×1
  • ThemeRenderer._buildThreeColumnRow (cognitive 19) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:343 — ThemeRenderer._buildThreeColumnRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DoubleTapSeekWidgetState._handleKeyboard (cognitive 19) · ×1
  • _DoubleTapSeekWidgetState._handleKeyboard (cognitive 19) lib/screens/anime/watch/controls/widgets/double_tap_seek.dart:788 — _DoubleTapSeekWidgetState._handleKeyboard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (19 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TracksPopupContentState._buildSourceSubtitles (cognitive 19) · ×1
  • _TracksPopupContentState._buildSourceSubtitles (cognitive 19) lib/screens/anime/watch/controls/widgets/tracks_popup.dart:107 — _TracksPopupContentState._buildSourceSubtitles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 8, boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _CommentSectionState._findParentUsername (cognitive 19) · ×1
  • _CommentSectionState._findParentUsername (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart:1468 — _CommentSectionState._findParentUsername has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_CommentSectionState._findParentRole) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _CommentSectionState._findParentRole (cognitive 19) · ×1
  • _CommentSectionState._findParentRole (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart:1482 — _CommentSectionState._findParentRole has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (_CommentSectionState._findParentUsername) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · _CommentSectionState._showCommentContextMenu (cognitive 19) · ×1
  • _CommentSectionState._showCommentContextMenu (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart:2196 — _CommentSectionState._showCommentContextMenu has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CommentSectionState._showUserInfoDialog (cognitive 19) · ×1
  • _CommentSectionState._showUserInfoDialog (cognitive 19) lib/screens/anime/widgets/comments/comments_section.dart:3233 — _CommentSectionState._showUserInfoDialog has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _UserCommentsSheetContentState._privateRows (cognitive 19) · ×1
  • _UserCommentsSheetContentState._privateRows (cognitive 19) lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart:808 — _UserCommentsSheetContentState._privateRows has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadController._initialize (cognitive 19) · ×1
  • DownloadController._initialize (cognitive 19) lib/screens/downloads/controller/download_controller.dart:239 — DownloadController._initialize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DownloadScreenState._checkPermissions (cognitive 19) · ×1
  • _DownloadScreenState._checkPermissions (cognitive 19) lib/screens/downloads/download_screen.dart:175 — _DownloadScreenState._checkPermissions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _DownloadServerSelectorState._buildBody (cognitive 19) · ×1
  • _DownloadServerSelectorState._buildBody (cognitive 19) lib/screens/downloads/widgets/download_server_selector.dart:229 — _DownloadServerSelectorState._buildBody has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, ternaries 8, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _DownloadedMediaViewState._buildEpisodeTile (cognitive 19) · ×1
  • _DownloadedMediaViewState._buildEpisodeTile (cognitive 19) lib/screens/downloads/widgets/downloaded_media_view.dart:688 — _DownloadedMediaViewState._buildEpisodeTile has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 6, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _CompatibilityInputPageState._buildMatchupHero (cognitive 19) · ×1
  • _CompatibilityInputPageState._buildMatchupHero (cognitive 19) lib/screens/profile/compatibility/compatibility_input_page.dart:333 — _CompatibilityInputPageState._buildMatchupHero has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 17, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _UserProfilePageState._buildActivitySlivers (cognitive 19) · ×1
  • _UserProfilePageState._buildActivitySlivers (cognitive 19) lib/screens/profile/user_profile_page.dart:497 — _UserProfilePageState._buildActivitySlivers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _ProfileStatsTabState.build (cognitive 19) · ×1
  • _ProfileStatsTabState.build (cognitive 19) lib/screens/profile/widgets/profile_stats_tab.dart:37 — _ProfileStatsTabState.build has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ExtensionFilterSheetState._buildSort (cognitive 19) · ×1
  • ExtensionFilterSheetState._buildSort (cognitive 19) lib/screens/search/widgets/extension_filter_sheet.dart:360 — ExtensionFilterSheetState._buildSort has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _GroupFilterWidgetState._buildSubGroup (cognitive 19) · ×1
  • _GroupFilterWidgetState._buildSubGroup (cognitive 19) lib/screens/search/widgets/extension_filter_sheet.dart:692 — _GroupFilterWidgetState._buildSubGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ReportsQueuePageState._buildReportCard (cognitive 19) · ×1
  • _ReportsQueuePageState._buildReportCard (cognitive 19) lib/screens/settings/sub_settings/settings_moderation.dart:859 — _ReportsQueuePageState._buildReportCard has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchiumPageState._handleDeepLinkRoom (cognitive 19) · ×1
  • _WatchiumPageState._handleDeepLinkRoom (cognitive 19) lib/screens/watchium/watchium_page.dart:76 — _WatchiumPageState._handleDeepLinkRoom has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AniSkipApi.getSkipTimes (cognitive 19) · ×1
  • AniSkipApi.getSkipTimes (cognitive 19) lib/utils/aniskip.dart:8 — AniSkipApi.getSkipTimes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (3 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaDownloader._resolveBestVariant (cognitive 19) · ×1
  • MediaDownloader._resolveBestVariant (cognitive 19) lib/utils/media_downloader.dart:315 — MediaDownloader._resolveBestVariant has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnymeXDecoratedAvatar.build (cognitive 19) · ×1
  • AnymeXDecoratedAvatar.build (cognitive 19) lib/widgets/anymex_widgets/anymex_decorated_avatar.dart:32 — AnymeXDecoratedAvatar.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10, if/else 5 (6 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AnymeXScaffold.build (cognitive 19) · ×1
  • AnymeXScaffold.build (cognitive 19) lib/widgets/common/anymex_scaffold.dart:140 — AnymeXScaffold.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 5 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OfflineStorageController.addOrUpdateAnime (cognitive 18) · ×1
  • OfflineStorageController.addOrUpdateAnime (cognitive 18) lib/controllers/offline/offline_storage_controller.dart:604 — OfflineStorageController.addOrUpdateAnime has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LeaderboardEntry.fromMap (cognitive 18) · ×1
  • LeaderboardEntry.fromMap (cognitive 18) lib/database/comments/model/leaderboard_entry.dart:66 — LeaderboardEntry.fromMap has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 6 (7 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Database._migrateLegacyMacosDatabase (cognitive 18) · ×1
  • Database._migrateLegacyMacosDatabase (cognitive 18) lib/database/database.dart:173 — Database._migrateLegacyMacosDatabase has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AIRecommendationState.fetchAiRecommendations (cognitive 18) · ×1
  • _AIRecommendationState.fetchAiRecommendations (cognitive 18) lib/screens/anime/misc/recommendation.dart:94 — _AIRecommendationState.fetchAiRecommendations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController.fetchEpisode (cognitive 18) · ×1
  • PlayerController.fetchEpisode (cognitive 18) lib/screens/anime/watch/controller/player_controller.dart:1623 — PlayerController.fetchEpisode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThemeRenderer._makeLabelStackThing (cognitive 18) · ×1
  • ThemeRenderer._makeLabelStackThing (cognitive 18) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:608 — ThemeRenderer._makeLabelStackThing has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AudioPopupContentState._buildInbuiltAudio (cognitive 18) · ×1
  • _AudioPopupContentState._buildInbuiltAudio (cognitive 18) lib/screens/anime/watch/controls/widgets/audio_popup.dart:153 — _AudioPopupContentState._buildInbuiltAudio has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DecoderQuickButton.build (cognitive 18) · ×1
  • DecoderQuickButton.build (cognitive 18) lib/screens/anime/watch/controls/widgets/decoder_quick_button.dart:49 — DecoderQuickButton.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscordMarkdown._parseImgTag (cognitive 18) · ×1
  • DiscordMarkdown._parseImgTag (cognitive 18) lib/screens/anime/widgets/comments/discord_markdown.dart:452 — DiscordMarkdown._parseImgTag has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _ListEditorModalState._setProgress (cognitive 18) · ×1
  • _ListEditorModalState._setProgress (cognitive 18) lib/screens/anime/widgets/list_editor.dart:317 — _ListEditorModalState._setProgress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _ExtensionListState._onReorder (cognitive 18) · ×1
  • _ExtensionListState._onReorder (cognitive 18) lib/screens/extensions/ExtensionList.dart:269 — _ExtensionListState._onReorder has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReaderController._updatePageStateForSpread (cognitive 18) · ×1
  • ReaderController._updatePageStateForSpread (cognitive 18) lib/screens/manga/controller/reader_controller.dart:1346 — ReaderController._updatePageStateForSpread has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NovelDetailsController._fetchChaptersOnly (cognitive 18) · ×1
  • NovelDetailsController._fetchChaptersOnly (cognitive 18) lib/screens/novel/details/controller/details_controller.dart:72 — NovelDetailsController._fetchChaptersOnly has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ProfileStatsTabState._overviewView (cognitive 18) · ×1
  • _ProfileStatsTabState._overviewView (cognitive 18) lib/screens/profile/widgets/profile_stats_tab.dart:174 — _ProfileStatsTabState._overviewView has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SocialTabState._fetchSocial (cognitive 18) · ×1
  • SocialTabState._fetchSocial (cognitive 18) lib/screens/profile/widgets/social_tab.dart:53 — SocialTabState._fetchSocial has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (8 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsExtensionManagerState.build (cognitive 18) · ×1
  • _SettingsExtensionManagerState.build (cognitive 18) lib/screens/settings/sub_settings/settings_extension_manager.dart:346 — _SettingsExtensionManagerState.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 4, if/else 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UserStatsController.streaks (cognitive 18) · ×1
  • UserStatsController.streaks (cognitive 18) lib/screens/stats/controller/user_stats_controller.dart:118 — UserStatsController.streaks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Deeplink._handleAnimatchDeepLink (cognitive 18) · ×1
  • Deeplink._handleAnimatchDeepLink (cognitive 18) lib/utils/deeplink.dart:507 — Deeplink._handleAnimatchDeepLink has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AnymeXSectionBuilder.build (cognitive 18) · ×1
  • AnymeXSectionBuilder.build (cognitive 18) lib/widgets/anymex_widgets/anymex_section_builder.dart:58 — AnymeXSectionBuilder.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MediaPeekPopupState._buildContent (cognitive 18) · ×1
  • _MediaPeekPopupState._buildContent (cognitive 18) lib/widgets/media_items/media_peek_popup.dart:743 — _MediaPeekPopupState._buildContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ReasonsSheetState._buildReasonCard (cognitive 18) · ×1
  • _ReasonsSheetState._buildReasonCard (cognitive 18) lib/widgets/non_widgets/reasons_sheet.dart:521 — _ReasonsSheetState._buildReasonCard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 6, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState._initImage (cognitive 18) · ×1
  • _SubsamplingScaleImageViewState._initImage (cognitive 18) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:907 — _SubsamplingScaleImageViewState._initImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchiumPartyPopupContentState._buildMemberTrailing (cognitive 18) · ×1
  • _WatchiumPartyPopupContentState._buildMemberTrailing (cognitive 18) lib/widgets/watchium/watchium_party_popup.dart:904 — _WatchiumPartyPopupContentState._buildMemberTrailing has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 3 (6 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppNamePackageManager.run (cognitive 17) · ×1
  • AppNamePackageManager.run (cognitive 17) package_manager.dart:12 — AppNamePackageManager.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscordRPCController.updateAnimePresence (cognitive 17) · ×1
  • DiscordRPCController.updateAnimePresence (cognitive 17) lib/controllers/discord/discord_rpc.dart:498 — DiscordRPCController.updateAnimePresence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (6 pts), error handling 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OfflineStorageController._attemptDatabaseRepair (cognitive 17) · ×1
  • OfflineStorageController._attemptDatabaseRepair (cognitive 17) lib/controllers/offline/offline_storage_controller.dart:132 — OfflineStorageController._attemptDatabaseRepair has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (6 pts), if/else 2 (6 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StorageManagerService.clearTorrentCacheOnly (cognitive 17) · ×1
  • StorageManagerService.clearTorrentCacheOnly (cognitive 17) lib/controllers/services/storage/storage_manager_service.dart:99 — StorageManagerService.clearTorrentCacheOnly has cognitive complexity 17 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 2 (5 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchiumService._waitForJoin (cognitive 17) · ×1
  • WatchiumService._waitForJoin (cognitive 17) lib/controllers/watchium/watchium_service.dart:614 — WatchiumService._waitForJoin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchiumSyncController._setupJoinerListeners (cognitive 17) · ×1
  • WatchiumSyncController._setupJoinerListeners (cognitive 17) lib/controllers/watchium/watchium_sync_controller.dart:113 — WatchiumSyncController._setupJoinerListeners has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackedMedia.effectiveTotal (cognitive 17) · ×1
  • TrackedMedia.effectiveTotal (cognitive 17) lib/models/Anilist/anilist_media_user.dart:121 — TrackedMedia.effectiveTotal has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PlayerController.delete (cognitive 17) · ×1
  • PlayerController.delete (cognitive 17) lib/screens/anime/watch/controller/player_controller.dart:1976 — PlayerController.delete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 4 (5 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkdownFormattingToolbar._insertNumberedList (cognitive 17) · ×1
  • MarkdownFormattingToolbar._insertNumberedList (cognitive 17) lib/screens/anime/widgets/comments/discord_markdown.dart:1064 — MarkdownFormattingToolbar._insertNumberedList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CommentInputBarState.build (cognitive 17) · ×1
  • _CommentInputBarState.build (cognitive 17) lib/screens/anime/widgets/comments/widgets/comment_input_bar.dart:111 — _CommentInputBarState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _DownloadedMediaViewState._buildChapterTile (cognitive 17) · ×1
  • _DownloadedMediaViewState._buildChapterTile (cognitive 17) lib/screens/downloads/widgets/downloaded_media_view.dart:973 — _DownloadedMediaViewState._buildChapterTile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 4, boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ExtensionListState.build (cognitive 17) · ×1
  • _ExtensionListState.build (cognitive 17) lib/screens/extensions/ExtensionList.dart:305 — _ExtensionListState.build has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _AnilistMangaListState.initState (cognitive 17) · ×1
  • _AnilistMangaListState.initState (cognitive 17) lib/screens/library/online/manga_list.dart:102 — _AnilistMangaListState.initState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalSourceController.loadCurrentDirectory (cognitive 17) · ×1
  • LocalSourceController.loadCurrentDirectory (cognitive 17) lib/screens/local_source/controller/local_source_controller.dart:351 — LocalSourceController.loadCurrentDirectory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LocalSourceController.loadDownloadDirectory) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LocalSourceController.loadDownloadDirectory (cognitive 17) · ×1
  • LocalSourceController.loadDownloadDirectory (cognitive 17) lib/screens/local_source/controller/local_source_controller.dart:384 — LocalSourceController.loadDownloadDirectory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LocalSourceController.loadCurrentDirectory) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · NovelReaderController.handleSwipe (cognitive 17) · ×1
  • NovelReaderController.handleSwipe (cognitive 17) lib/screens/novel/reader/controller/reader_controller.dart:822 — NovelReaderController.handleSwipe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CompatibilityResultPageState._buildShareUrl (cognitive 17) · ×1
  • _CompatibilityResultPageState._buildShareUrl (cognitive 17) lib/screens/profile/compatibility/compatibility_result_page.dart:2728 — _CompatibilityResultPageState._buildShareUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 1 (4 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ContributorsPageState._loadContributors (cognitive 17) · ×1
  • _ContributorsPageState._loadContributors (cognitive 17) lib/screens/settings/sub_settings/contributors/contributors.dart:297 — _ContributorsPageState._loadContributors has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsAccountsState._autoSyncLinkedAccounts (cognitive 17) · ×1
  • _SettingsAccountsState._autoSyncLinkedAccounts (cognitive 17) lib/screens/settings/sub_settings/settings_accounts.dart:37 — _SettingsAccountsState._autoSyncLinkedAccounts has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, error handling 3 (6 pts), if/else 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsDiscordState._buildAccountCard (cognitive 17) · ×1
  • _SettingsDiscordState._buildAccountCard (cognitive 17) lib/screens/settings/sub_settings/settings_discord.dart:249 — _SettingsDiscordState._buildAccountCard has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11, boolean chains 4, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _SettingsThemeState.showRefreshRateDialog (cognitive 17) · ×1
  • _SettingsThemeState.showRefreshRateDialog (cognitive 17) lib/screens/settings/sub_settings/settings_theme.dart:410 — _SettingsThemeState.showRefreshRateDialog has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _ExportBackupSheetState.build (cognitive 17) · ×1
  • _ExportBackupSheetState.build (cognitive 17) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1047 — _ExportBackupSheetState.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 14 (15 pts), boolean chains 1, if/else 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _WatchiumPageState._showPasswordDialog (cognitive 17) · ×1
  • _WatchiumPageState._showPasswordDialog (cognitive 17) lib/screens/watchium/watchium_page.dart:237 — _WatchiumPageState._showPasswordDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 7 (8 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CommentumService.manageUser (cognitive 17) · ×1
  • CommentumService.manageUser (cognitive 17) lib/services/commentum_service.dart:957 — CommentumService.manageUser has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentumService.fetchUserCustomizations (cognitive 17) · ×1
  • CommentumService.fetchUserCustomizations (cognitive 17) lib/services/commentum_service.dart:1422 — CommentumService.fetchUserCustomizations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AnimeThemesAPI.searchAnimeThemes (cognitive 17) · ×1
  • AnimeThemesAPI.searchAnimeThemes (cognitive 17) lib/utils/anime_themes_api.dart:11 — AnimeThemesAPI.searchAnimeThemes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AnimeThemesAPI.getAnimeData) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AnimeThemesAPI.getAnimeData (cognitive 17) · ×1
  • AnimeThemesAPI.getAnimeData (cognitive 17) lib/utils/anime_themes_api.dart:104 — AnimeThemesAPI.getAnimeData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AnimeThemesAPI.searchAnimeThemes) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Deeplink._handleWatchiumDeepLink (cognitive 17) · ×1
  • Deeplink._handleWatchiumDeepLink (cognitive 17) lib/utils/deeplink.dart:397 — Deeplink._handleWatchiumDeepLink has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ExternalFontLoader.getCustomFontNames (cognitive 17) · ×1
  • ExternalFontLoader.getCustomFontNames (cognitive 17) lib/utils/external_font_loader.dart:255 — ExternalFontLoader.getCustomFontNames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (12 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _VisualsPopupState._fetchMalVisuals (cognitive 17) · ×1
  • _VisualsPopupState._fetchMalVisuals (cognitive 17) lib/widgets/anime/visuals/visuals_popup.dart:66 — _VisualsPopupState._fetchMalVisuals has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnymeXDialog.build (cognitive 17) · ×1
  • AnymeXDialog.build (cognitive 17) lib/widgets/anymex_widgets/anymex_dialog.dart:72 — AnymeXDialog.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OfflineStorageController.addOrUpdateManga (cognitive 16) · ×1
  • OfflineStorageController.addOrUpdateManga (cognitive 16) lib/controllers/offline/offline_storage_controller.dart:646 — OfflineStorageController.addOrUpdateManga has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (OfflineStorageController.addOrUpdateNovel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · OfflineStorageController.addOrUpdateNovel (cognitive 16) · ×1
  • OfflineStorageController.addOrUpdateNovel (cognitive 16) lib/controllers/offline/offline_storage_controller.dart:686 — OfflineStorageController.addOrUpdateNovel has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (OfflineStorageController.addOrUpdateManga) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AnilistAuth.fetchUserMangaList (cognitive 16) · ×1
  • AnilistAuth.fetchUserMangaList (cognitive 16) lib/controllers/services/anilist/anilist_auth.dart:2319 — AnilistAuth.fetchUserMangaList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommunityService._buildUserIdentityBody (cognitive 16) · ×1
  • CommunityService._buildUserIdentityBody (cognitive 16) lib/controllers/services/community_service.dart:1136 — CommunityService._buildUserIdentityBody has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimklService.homeWidgets (cognitive 16) · ×1
  • SimklService.homeWidgets (cognitive 16) lib/controllers/services/simkl/simkl_service.dart:183 — SimklService.homeWidgets has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SourceController.isExtensionNewerVersion (cognitive 16) · ×1
  • SourceController.isExtensionNewerVersion (cognitive 16) lib/controllers/source/source_controller.dart:579 — SourceController.isExtensionNewerVersion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GistSyncController.syncEpisodeProgressOnExit (cognitive 16) · ×1
  • GistSyncController.syncEpisodeProgressOnExit (cognitive 16) lib/controllers/sync/gist_sync_controller.dart:551 — GistSyncController.syncEpisodeProgressOnExit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, 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. This shape REPEATS in the file: one other method here (GistSyncController.syncChapterProgressOnExit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GistSyncController.syncChapterProgressOnExit (cognitive 16) · ×1
  • GistSyncController.syncChapterProgressOnExit (cognitive 16) lib/controllers/sync/gist_sync_controller.dart:642 — GistSyncController.syncChapterProgressOnExit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, 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. This shape REPEATS in the file: one other method here (GistSyncController.syncEpisodeProgressOnExit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · WatchiumService._handleMemberChanges (cognitive 16) · ×1
  • WatchiumService._handleMemberChanges (cognitive 16) lib/controllers/watchium/watchium_service.dart:430 — WatchiumService._handleMemberChanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchiumService.joinRoom (cognitive 16) · ×1
  • WatchiumService.joinRoom (cognitive 16) lib/controllers/watchium/watchium_service.dart:563 — WatchiumService.joinRoom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaDetailsController._renewEpisodeData (cognitive 16) · ×1
  • MediaDetailsController._renewEpisodeData (cognitive 16) lib/screens/anime/details/controller/media_details_controller.dart:716 — MediaDetailsController._renewEpisodeData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _CalendarState._isSameDate (cognitive 16) · ×1
  • _CalendarState._isSameDate (cognitive 16) lib/screens/anime/misc/calendar.dart:150 — _CalendarState._isSameDate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._loadVisualSettings (cognitive 16) · ×1
  • PlayerController._loadVisualSettings (cognitive 16) lib/screens/anime/watch/controller/player_controller.dart:672 — PlayerController._loadVisualSettings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._initializeAniSkip (cognitive 16) · ×1
  • PlayerController._initializeAniSkip (cognitive 16) lib/screens/anime/watch/controller/player_controller.dart:1110 — PlayerController._initializeAniSkip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlayerController._initializePersistentListeners (cognitive 16) · ×1
  • PlayerController._initializePersistentListeners (cognitive 16) lib/screens/anime/watch/controller/player_controller.dart:1176 — PlayerController._initializePersistentListeners has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ThemeRenderer.buildBottomShit (cognitive 16) · ×1
  • ThemeRenderer.buildBottomShit (cognitive 16) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:220 — ThemeRenderer.buildBottomShit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ThemeRenderer._checkCondition (cognitive 16) · ×1
  • ThemeRenderer._checkCondition (cognitive 16) lib/screens/anime/watch/controls/themes/setup/json_player_control_theme.dart:1096 — ThemeRenderer._checkCondition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchTogetherPopupContentState._createRoom (cognitive 16) · ×1
  • _WatchTogetherPopupContentState._createRoom (cognitive 16) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:608 — _WatchTogetherPopupContentState._createRoom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadController.fetchServersForEpisode (cognitive 16) · ×1
  • DownloadController.fetchServersForEpisode (cognitive 16) lib/screens/downloads/controller/download_controller.dart:556 — DownloadController.fetchServersForEpisode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadController.updateDownloadedMediaMetadata (cognitive 16) · ×1
  • DownloadController.updateDownloadedMediaMetadata (cognitive 16) lib/screens/downloads/controller/download_controller.dart:1465 — DownloadController.updateDownloadedMediaMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadController._downloadSubtitles (cognitive 16) · ×1
  • DownloadController._downloadSubtitles (cognitive 16) lib/screens/downloads/controller/download_controller.dart:2061 — DownloadController._downloadSubtitles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginManager.syncLocalApk (cognitive 16) · ×1
  • PluginManager.syncLocalApk (cognitive 16) lib/screens/extensions/widgets/plugin_manager.dart:235 — PluginManager.syncLocalApk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MangaStatsState.build (cognitive 16) · ×1
  • _MangaStatsState.build (cognitive 16) lib/screens/manga/widgets/manga_stats.dart:69 — _MangaStatsState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NovelBottomControls._buildScrollProgress (cognitive 16) · ×1
  • NovelBottomControls._buildScrollProgress (cognitive 16) lib/screens/novel/reader/widgets/bottom_controls.dart:151 — NovelBottomControls._buildScrollProgress has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _CompatibilityInputPageState._loadFollowing (cognitive 16) · ×1
  • _CompatibilityInputPageState._loadFollowing (cognitive 16) lib/screens/profile/compatibility/compatibility_input_page.dart:90 — _CompatibilityInputPageState._loadFollowing has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UserProfilePageState._buildBody (cognitive 16) · ×1
  • _UserProfilePageState._buildBody (cognitive 16) lib/screens/profile/user_profile_page.dart:308 — _UserProfilePageState._buildBody has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · _ContributorsPageState._buildFeaturedCard (cognitive 16) · ×1
  • _ContributorsPageState._buildFeaturedCard (cognitive 16) lib/screens/settings/sub_settings/contributors/contributors.dart:458 — _ContributorsPageState._buildFeaturedCard has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SettingsExtensionManagerState._buildExtensionSettings (cognitive 16) · ×1
  • _SettingsExtensionManagerState._buildExtensionSettings (cognitive 16) lib/screens/settings/sub_settings/settings_extension_manager.dart:725 — _SettingsExtensionManagerState._buildExtensionSettings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CommentumService.listUsers (cognitive 16) · ×1
  • CommentumService.listUsers (cognitive 16) lib/services/commentum_service.dart:749 — CommentumService.listUsers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Matchmaker._computeEntityStatOverlap (cognitive 16) · ×1
  • Matchmaker._computeEntityStatOverlap (cognitive 16) lib/utils/compatibility/matchmaker.dart:933 — Matchmaker._computeEntityStatOverlap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4, ternaries 2 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Deeplink.handleDeepLink (cognitive 16) · ×1
  • Deeplink.handleDeepLink (cognitive 16) lib/utils/deeplink.dart:22 — Deeplink.handleDeepLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MediaShare._buildTrackingShareLink (cognitive 16) · ×1
  • MediaShare._buildTrackingShareLink (cognitive 16) lib/utils/media_share.dart:122 — MediaShare._buildTrackingShareLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MediaShare._buildAnymexShareLink) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · MediaShare._buildAnymexShareLink (cognitive 16) · ×1
  • MediaShare._buildAnymexShareLink (cognitive 16) lib/utils/media_share.dart:157 — MediaShare._buildAnymexShareLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MediaShare._buildTrackingShareLink) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · NotificationService._navigateFromNotification (cognitive 16) · ×1
  • NotificationService._navigateFromNotification (cognitive 16) lib/utils/notification.dart:308 — NotificationService._navigateFromNotification has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _OauthWebViewPageState.build (cognitive 16) · ×1
  • _OauthWebViewPageState.build (cognitive 16) lib/utils/oauth_helper.dart:78 — _OauthWebViewPageState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AnymeXExpansionTileState.build (cognitive 16) · ×1
  • _AnymeXExpansionTileState.build (cognitive 16) lib/widgets/anymex_widgets/anymex_expansion_tile.dart:108 — _AnymeXExpansionTileState.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 6, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LinkedAccountsBadges.build (cognitive 16) · ×1
  • LinkedAccountsBadges.build (cognitive 16) lib/widgets/anymex_widgets/linked_accounts_badges.dart:20 — LinkedAccountsBadges.build has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · _BigCarouselPortraitState.build (cognitive 16) · ×1
  • _BigCarouselPortraitState.build (cognitive 16) lib/widgets/common/carousel/themes/big_carousel_portrait.dart:58 — _BigCarouselPortraitState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SourceSelectorWidget.build (cognitive 16) · ×1
  • SourceSelectorWidget.build (cognitive 16) lib/widgets/common/source_selector.dart:94 — SourceSelectorWidget.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MediaPeekPopupState._buildRecommendedBySection (cognitive 16) · ×1
  • _MediaPeekPopupState._buildRecommendedBySection (cognitive 16) lib/widgets/media_items/media_peek_popup.dart:973 — _MediaPeekPopupState._buildRecommendedBySection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SubsamplingScaleImageViewState._findCachedFile (cognitive 16) · ×1
  • _SubsamplingScaleImageViewState._findCachedFile (cognitive 16) lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:583 — _SubsamplingScaleImageViewState._findCachedFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), error handling 3 (5 pts), loops 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _WatchiumCreateSheetState._createRoom (cognitive 16) · ×1
  • _WatchiumCreateSheetState._createRoom (cognitive 16) lib/widgets/watchium/watchium_create_dialog.dart:529 — _WatchiumCreateSheetState._createRoom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: anilist_data.dart, mal_service.dart, simkl_service.dart lib/controllers/services/anilist/anilist_data.dart — 3 files — `lib/controllers/services/anilist/anilist_data.dart`, `lib/controllers/services/mal/mal_service.dart`, `lib/controllers/services/simkl/simkl_service.dart` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 38 shared lines) · ×1
  • Near-duplicate member family (4 members, 38 shared lines) lib/utils/color_profiler.dart:588 — lib/utils/color_profiler.dart:588-764 | lib/utils/color_profiler.dart:783-1021 | lib/utils/color_profiler.dart:1023-1184 | lib/utils/color_profiler.dart:1302-1375 — These 4 members are variants of one another: a block of 38 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 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 · Near-duplicate member family (4 members, 20 shared lines) · ×1
  • Near-duplicate member family (4 members, 20 shared lines) lib/screens/profile/widgets/profile_header.dart:73 — lib/screens/profile/widgets/profile_header.dart:73-595 | lib/screens/profile/widgets/profile_header.dart:614-1107 | lib/screens/profile/widgets/user_profile_app_bar.dart:61-610 | lib/screens/profile/widgets/user_profile_header.dart:62-698 — These 4 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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 · Near-duplicate member family (3 members, 58 shared lines) · ×1
  • Near-duplicate member family (3 members, 58 shared lines) lib/screens/anime/watch/controls/top_controls.dart:103 — lib/screens/anime/watch/controls/top_controls.dart:103-261 | lib/screens/anime/watch/controls/top_controls.dart:263-435 | lib/screens/anime/watch/controls/top_controls.dart:437-574 — These 3 members are variants of one another: a block of 58 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 31 shared lines) · ×1
  • Near-duplicate member family (3 members, 31 shared lines) lib/screens/anime/misc/calendar.dart:311 — lib/screens/anime/misc/calendar.dart:311-407 | lib/screens/library/online/anime_list.dart:565-650 | lib/screens/library/online/manga_list.dart:549-634 — These 3 members are variants of one another: a block of 31 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (148 shared lines) · ×1
  • Near-duplicate member pair (148 shared lines) lib/screens/anime/widgets/episode_list_builder.dart:969 — lib/screens/anime/widgets/episode_list_builder.dart:969-1178 | lib/screens/manga/widgets/chapter_list_builder.dart:1043-1300 — These two members are variants of one another: 148 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (137 shared lines) · ×1
  • Near-duplicate member pair (137 shared lines) lib/screens/profile/profile_page.dart:547 — lib/screens/profile/profile_page.dart:547-730 | lib/screens/profile/user_profile_page.dart:497-702 — These two members are variants of one another: 137 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (133 shared lines) · ×1
  • Near-duplicate member pair (133 shared lines) lib/widgets/dialogs/logo_animation_preview_dialog.dart:96 — lib/widgets/dialogs/logo_animation_preview_dialog.dart:96-414 | lib/widgets/dialogs/logo_animation_preview_dialog.dart:416-639 — These two members are variants of one another: 133 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (128 shared lines) · ×1
  • Near-duplicate member pair (128 shared lines) lib/screens/profile/profile_page.dart:754 — lib/screens/profile/profile_page.dart:754-1032 | lib/screens/profile/user_profile_page.dart:726-961 — These two members are variants of one another: 128 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (126 shared lines) · ×1
  • Near-duplicate member pair (126 shared lines) lib/screens/anime/widgets/comments/comments_section.dart:1496 — lib/screens/anime/widgets/comments/comments_section.dart:1496-1698 | lib/screens/anime/widgets/comments/comments_section.dart:1852-2106 — These two members are variants of one another: 126 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (121 shared lines) · ×1
  • Near-duplicate member pair (121 shared lines) lib/screens/profile/widgets/activity_heatmap.dart:52 — lib/screens/profile/widgets/activity_heatmap.dart:52-288 | lib/screens/stats/user_stats_page.dart:549-817 — These two members are variants of one another: 121 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (115 shared lines) · ×1
  • Near-duplicate member pair (115 shared lines) lib/screens/library/widgets/unified_history_card.dart:19 — lib/screens/library/widgets/unified_history_card.dart:19-180 | lib/screens/library/widgets/unified_history_card.dart:321-447 — These two members are variants of one another: 115 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (107 shared lines) · ×1
  • Near-duplicate member pair (107 shared lines) lib/models/Media/media.dart:165 — lib/models/Media/media.dart:165-289 | lib/models/Media/media.dart:340-487 — These two members are variants of one another: 107 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (72 shared lines) · ×1
  • Near-duplicate member pair (72 shared lines) lib/screens/anime/widgets/voice_actor.dart:19 — lib/screens/anime/widgets/voice_actor.dart:19-281 | lib/screens/anime/widgets/voice_actor.dart:288-414 — These two members are variants of one another: 72 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (58 shared lines) · ×1
  • Near-duplicate member pair (58 shared lines) lib/screens/profile/profile_page.dart:208 — lib/screens/profile/profile_page.dart:208-357 | lib/screens/profile/user_profile_page.dart:308-435 — These two members are variants of one another: 58 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (57 shared lines) · ×1
  • Near-duplicate member pair (57 shared lines) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:608 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:608-679 | lib/widgets/watchium/watchium_create_dialog.dart:529-598 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (52 shared lines) · ×1
  • Near-duplicate member pair (52 shared lines) lib/widgets/common/navbar/styles/classic_navbar.dart:303 — lib/widgets/common/navbar/styles/classic_navbar.dart:303-378 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:361-430 — These two members are variants of one another: 52 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) lib/utils/compatibility/matchmaker.dart:668 — lib/utils/compatibility/matchmaker.dart:668-764 | lib/utils/compatibility/matchmaker.dart:933-1023 — These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (47 shared lines) · ×1
  • Near-duplicate member pair (47 shared lines) lib/screens/library/online/manga_list.dart:325 — lib/screens/library/online/manga_list.dart:325-415 | lib/screens/profile/widgets/user_media_list_page.dart:293-387 — These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) lib/screens/anime/widgets/anime_stats.dart:757 — lib/screens/anime/widgets/anime_stats.dart:757-887 | lib/screens/manga/widgets/manga_stats.dart:456-550 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (39 shared lines) · ×1
  • Near-duplicate member pair (39 shared lines) lib/utils/compatibility/matchmaker.dart:119 — lib/utils/compatibility/matchmaker.dart:119-303 | lib/utils/compatibility/matchmaker.dart:305-440 — These two members are variants of one another: 39 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (108 corresponding lines) · ×1
  • Edited copy of a member (108 corresponding lines) lib/screens/library/online/anime_list.dart:433 — lib/screens/library/online/anime_list.dart:433-540 | lib/screens/library/online/manga_list.dart:417-524 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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/screens/anime/widgets/episode_list_builder.dart:924 — lib/screens/anime/widgets/episode_list_builder.dart:924-962 | lib/screens/manga/widgets/chapter_list_builder.dart:290-619 — 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 (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) lib/screens/settings/sub_settings/settings_comments.dart:509 — lib/screens/settings/sub_settings/settings_comments.dart:509-544 | lib/screens/settings/sub_settings/settings_comments.dart:546-581 — 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 · Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (14 members, 50+ identical tokens) lib/controllers/services/anilist/anilist_auth.dart:391 — lib/controllers/services/anilist/anilist_auth.dart:391-542 | lib/controllers/services/anilist/anilist_auth.dart:1470-1504 | lib/controllers/services/anilist/anilist_auth.dart:1506-1537 | lib/controllers/services/anilist/anilist_auth.dart:1539-1570 | lib/controllers/services/anilist/anilist_auth.dart:1572-1603 | lib/controllers/services/anilist/anilist_auth.dart:1605-1636 | lib/controllers/services/anilist/anilist_auth.dart:1700-1735 | lib/controllers/services/anilist/anilist_auth.dart:1737-1778 | lib/controllers/services/anilist/anilist_auth.dart:1780-1811 | lib/controllers/services/anilist/anilist_auth.dart:1813-1860 | lib/controllers/services/anilist/anilist_auth.dart:1862-1893 | lib/controllers/services/anilist/anilist_auth.dart:1895-1949 | lib/controllers/services/anilist/anilist_auth.dart:2433-2486 | lib/controllers/services/anilist/anilist_auth.dart:2488-2541 — These 14 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 14 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 14 times.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:506 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:506-567 | lib/screens/settings/sub_settings/settings_moderation.dart:302-756 | lib/screens/watchium/watchium_page.dart:237-469 | lib/widgets/non_widgets/reasons_sheet.dart:202-317 | lib/widgets/non_widgets/recommend_sheet.dart:353-462 | lib/widgets/non_widgets/recommend_sheet.dart:558-668 | lib/widgets/non_widgets/recommend_sheet.dart:1060-1134 | lib/widgets/non_widgets/recommend_sheet.dart:1136-1212 | lib/widgets/watchium/watchium_create_dialog.dart:430-493 | lib/widgets/watchium/watchium_party_popup.dart:669-754 — These 10 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 10 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 10 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) lib/screens/anime/home_page.dart:122 — lib/screens/anime/home_page.dart:122-250 | lib/screens/extensions/ExtensionScreen.dart:84-230 | lib/screens/home_page.dart:181-326 | lib/screens/library/history_page.dart:95-239 | lib/screens/library/my_library.dart:80-172 | lib/screens/manga/home_page.dart:48-142 | lib/screens/novel/home_page.dart:40-111 | lib/screens/stats/user_stats_page.dart:98-249 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Duplicated block (116–170 lines × 2) · ×1
  • Duplicated block (116–170 lines × 2) lib/controllers/services/anilist/anilist_data.dart:383 — lib/controllers/services/anilist/anilist_data.dart:383-498 | lib/controllers/services/anilist/anilist_data.dart:522-691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (26–124 lines × 4) · ×1
  • Duplicated block (26–124 lines × 4) lib/controllers/services/anilist/anilist_auth.dart:392 — lib/controllers/services/anilist/anilist_auth.dart:392-515 | lib/controllers/services/anilist/anilist_auth.dart:1896-1922 | lib/controllers/services/anilist/anilist_auth.dart:2439-2464 | lib/controllers/services/anilist/anilist_auth.dart:2494-2519 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (16–124 lines × 4) · ×1
  • Duplicated block (16–124 lines × 4) lib/controllers/services/anilist/anilist_auth.dart:838 — lib/controllers/services/anilist/anilist_auth.dart:838-961 | lib/controllers/services/anilist/anilist_auth.dart:1002-1017 | lib/controllers/services/anilist/anilist_auth.dart:1073-1118 | lib/controllers/services/anilist/anilist_auth.dart:1178-1194 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (103 lines × 2) · ×1
  • Duplicated block (103 lines × 2) lib/widgets/dialogs/logo_animation_preview_dialog.dart:274 — lib/widgets/dialogs/logo_animation_preview_dialog.dart:274-376 | lib/widgets/dialogs/logo_animation_preview_dialog.dart:503-605 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (94–97 lines × 3) · ×1
  • Duplicated block (94–97 lines × 3) lib/screens/library/online/anime_list.dart:443 — lib/screens/library/online/anime_list.dart:443-536 | lib/screens/library/online/manga_list.dart:427-520 | lib/screens/profile/widgets/user_media_list_page.dart:420-516 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (82–95 lines × 2) · ×1
  • Duplicated block (82–95 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:1952 — lib/controllers/services/anilist/anilist_auth.dart:1952-2046 | lib/controllers/services/anilist/anilist_auth.dart:2320-2401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (94 lines × 2) · ×1
  • Duplicated block (94 lines × 2) lib/utils/image_cropper.dart:152 — lib/utils/image_cropper.dart:152-245 | lib/widgets/subsampling_scale_image_view/subsampling_image_provider.dart:210-303 — 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 · Duplicated block (90–92 lines × 2) · ×1
  • Duplicated block (90–92 lines × 2) lib/screens/profile/activity_details_page.dart:517 — lib/screens/profile/activity_details_page.dart:517-606 | lib/widgets/non_widgets/activity_card.dart:264-355 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/widgets/non_widgets/activity_card.dart` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 190 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (86 lines × 2) · ×1
  • Duplicated block (86 lines × 2) lib/screens/library/online/anime_list.dart:565 — lib/screens/library/online/anime_list.dart:565-650 | lib/screens/library/online/manga_list.dart:549-634 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (81 lines × 2) · ×1
  • Duplicated block (81 lines × 2) lib/models/Media/media.dart:167 — lib/models/Media/media.dart:167-247 | lib/models/Media/media.dart:342-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (80–81 lines × 2) · ×1
  • Duplicated block (80–81 lines × 2) lib/widgets/common/media_mode_selector.dart:267 — lib/widgets/common/media_mode_selector.dart:267-347 | lib/widgets/common/media_mode_selector.dart:383-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (77–78 lines × 2) · ×1
  • Duplicated block (77–78 lines × 2) lib/screens/library/online/anime_list.dart:694 — lib/screens/library/online/anime_list.dart:694-770 | lib/screens/library/online/manga_list.dart:678-755 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (78 lines × 2) · ×1
  • Duplicated block (78 lines × 2) lib/screens/library/online/anime_list.dart:772 — lib/screens/library/online/anime_list.dart:772-849 | lib/screens/library/online/manga_list.dart:757-834 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (69 lines × 2) · ×1
  • Duplicated block (69 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:947 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:947-1015 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:838-906 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (67 lines × 2) · ×1
  • Duplicated block (67 lines × 2) lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart:96 — lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart:96-162 | lib/screens/anime/widgets/comments/widgets/gif_picker_sheet.dart:182-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (63–64 lines × 2) · ×1
  • Duplicated block (63–64 lines × 2) lib/screens/anime/widgets/episode_list_builder.dart:817 — lib/screens/anime/widgets/episode_list_builder.dart:817-879 | lib/screens/manga/widgets/chapter_list_builder.dart:386-449 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (60–61 lines × 2) · ×1
  • Duplicated block (60–61 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:508 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:508-567 | lib/widgets/watchium/watchium_create_dialog.dart:433-493 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (60 lines × 2) · ×1
  • Duplicated block (60 lines × 2) lib/widgets/anime/visuals/visuals_popup.dart:181 — lib/widgets/anime/visuals/visuals_popup.dart:181-240 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:46-105 — before extracting anything, compare `lib/widgets/anime/visuals/visuals_popup.dart` and `lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:853 — lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart:853-908 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:744-799 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/player_control_themes/ios26_player_control_theme.dart` and `lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 367 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (54–55 lines × 2) · ×1
  • Duplicated block (54–55 lines × 2) lib/screens/profile/widgets/activity_heatmap.dart:183 — lib/screens/profile/widgets/activity_heatmap.dart:183-236 | lib/screens/stats/user_stats_page.dart:682-736 — before extracting anything, compare `lib/screens/profile/widgets/activity_heatmap.dart` and `lib/screens/stats/user_stats_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (52–54 lines × 2) · ×1
  • Duplicated block (52–54 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1117 — lib/screens/anime/widgets/comments/comments_section.dart:1117-1168 | lib/screens/anime/widgets/comments/comments_section.dart:1181-1234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (46–51 lines × 2) · ×1
  • Duplicated block (46–51 lines × 2) lib/screens/profile/widgets/profile_header.dart:532 — lib/screens/profile/widgets/profile_header.dart:532-582 | lib/screens/profile/widgets/profile_header.dart:788-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (48–49 lines × 2) · ×1
  • Duplicated block (48–49 lines × 2) lib/screens/profile/profile_page.dart:639 — lib/screens/profile/profile_page.dart:639-686 | lib/screens/profile/user_profile_page.dart:609-657 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (46–48 lines × 3) · ×1
  • Duplicated block (46–48 lines × 3) lib/screens/anime/widgets/anime_stats.dart:942 — lib/screens/anime/widgets/anime_stats.dart:942-987 | lib/screens/manga/widgets/manga_stats.dart:852-897 | lib/screens/novel/details/widgets/novel_stats.dart:246-293 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27–46 lines × 2) · ×1
  • Duplicated block (27–46 lines × 2) lib/controllers/services/anilist/anilist_auth.dart:550 — lib/controllers/services/anilist/anilist_auth.dart:550-595 | lib/controllers/services/anilist/anilist_auth.dart:615-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • Duplicated block (45 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:1580 — lib/screens/anime/widgets/comments/comments_section.dart:1580-1624 | lib/screens/anime/widgets/comments/comments_section.dart:1910-1954 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (39–44 lines × 2) · ×1
  • Duplicated block (39–44 lines × 2) lib/screens/profile/widgets/user_profile_app_bar.dart:152 — lib/screens/profile/widgets/user_profile_app_bar.dart:152-190 | lib/screens/profile/widgets/user_profile_header.dart:453-496 — before extracting anything, compare `lib/screens/profile/widgets/user_profile_app_bar.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (40–42 lines × 2) · ×1
  • Duplicated block (40–42 lines × 2) lib/screens/library/widgets/unified_history_card.dart:107 — lib/screens/library/widgets/unified_history_card.dart:107-148 | lib/screens/library/widgets/unified_history_card.dart:378-417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (39–40 lines × 2) · ×1
  • Duplicated block (39–40 lines × 2) lib/screens/profile/profile_page.dart:418 — lib/screens/profile/profile_page.dart:418-457 | lib/screens/profile/user_profile_page.dart:1064-1102 — before extracting anything, compare `lib/screens/profile/profile_page.dart` and `lib/screens/profile/user_profile_page.dart` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 523 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:206 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:206-244 | lib/widgets/common/anymex_slider_m3.dart:211-249 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (36–37 lines × 3) · ×1
  • Duplicated block (36–37 lines × 3) lib/widgets/non_widgets/reasons_sheet.dart:245 — lib/widgets/non_widgets/reasons_sheet.dart:245-281 | lib/widgets/non_widgets/recommend_sheet.dart:395-430 | lib/widgets/non_widgets/recommend_sheet.dart:601-636 — before extracting anything, compare `lib/widgets/non_widgets/reasons_sheet.dart` and `lib/widgets/non_widgets/recommend_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (35–37 lines × 2) · ×1
  • Duplicated block (35–37 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:151 — lib/widgets/common/navbar/styles/classic_navbar.dart:151-185 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:130-166 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31–35 lines × 3) · ×1
  • Duplicated block (31–35 lines × 3) lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:152 — lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:152-182 | lib/widgets/anime/visuals/visuals_popup.dart:238-271 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:103-137 — before extracting anything, compare `lib/widgets/anime/visuals/visuals_popup.dart` and `lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (33–35 lines × 2) · ×1
  • Duplicated block (33–35 lines × 2) lib/main.dart:496 — lib/main.dart:496-528 | lib/widgets/non_widgets/settings_sheet.dart:362-396 — 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 · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) lib/screens/library/online/anime_list.dart:374 — lib/screens/library/online/anime_list.dart:374-408 | lib/screens/profile/widgets/user_media_list_page.dart:335-369 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/profile/widgets/user_media_list_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 270 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (34 lines × 4) · ×1
  • Duplicated block (34 lines × 4) lib/controllers/services/widgets/widgets_builders.dart:420 — lib/controllers/services/widgets/widgets_builders.dart:420-453 | lib/screens/community/community_recommendations_page.dart:730-763 | lib/screens/community/user_recommendations_page.dart:360-393 | lib/widgets/media_items/media_peek_popup.dart:1135-1168 — before extracting anything, compare `lib/controllers/services/widgets/widgets_builders.dart` and `lib/screens/community/community_recommendations_page.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (32–33 lines × 2) · ×1
  • Duplicated block (32–33 lines × 2) lib/screens/profile/widgets/activity_heatmap.dart:111 — lib/screens/profile/widgets/activity_heatmap.dart:111-143 | lib/screens/stats/user_stats_page.dart:613-644 — before extracting anything, compare `lib/screens/profile/widgets/activity_heatmap.dart` and `lib/screens/stats/user_stats_page.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31–32 lines × 3) · ×1
  • Duplicated block (31–32 lines × 3) lib/widgets/non_widgets/reasons_sheet.dart:204 — lib/widgets/non_widgets/reasons_sheet.dart:204-235 | lib/widgets/non_widgets/recommend_sheet.dart:355-385 | lib/widgets/non_widgets/recommend_sheet.dart:561-591 — before extracting anything, compare `lib/widgets/non_widgets/reasons_sheet.dart` and `lib/widgets/non_widgets/recommend_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) lib/screens/anime/watch/controls/bottom_controls.dart:234 — lib/screens/anime/watch/controls/bottom_controls.dart:234-264 | lib/screens/anime/watch/controls/themes/player_control_themes/ios_legacy_player_control_theme.dart:387-418 — 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 · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) lib/screens/profile/widgets/decoration_closet_sheet.dart:706 — lib/screens/profile/widgets/decoration_closet_sheet.dart:706-737 | lib/screens/profile/widgets/decoration_closet_sheet.dart:1170-1201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (27–31 lines × 2) · ×1
  • Duplicated block (27–31 lines × 2) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:82 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:82-108 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1349-1379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (28–30 lines × 3) · ×1
  • Duplicated block (28–30 lines × 3) lib/controllers/services/backup_restore/backup_restore_service.dart:588 — lib/controllers/services/backup_restore/backup_restore_service.dart:588-617 | lib/controllers/services/backup_restore/backup_restore_service.dart:620-649 | lib/controllers/services/backup_restore/backup_restore_service.dart:652-679 — 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.
D4 · Code Duplication · Duplicated block (28–30 lines × 2) · ×1
  • Duplicated block (28–30 lines × 2) lib/controllers/sync/gist_sync_controller.dart:566 — lib/controllers/sync/gist_sync_controller.dart:566-593 | lib/controllers/sync/gist_sync_controller.dart:659-688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–30 lines × 2) · ×1
  • Duplicated block (25–30 lines × 2) lib/screens/anime/studio_details_page.dart:358 — lib/screens/anime/studio_details_page.dart:358-382 | lib/screens/anime/widgets/character_staff_sheet.dart:937-966 — before extracting anything, compare `lib/screens/anime/studio_details_page.dart` and `lib/screens/anime/widgets/character_staff_sheet.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28 lines × 3) · ×1
  • Duplicated block (28 lines × 3) lib/screens/settings/sub_settings/settings_player.dart:1470 — lib/screens/settings/sub_settings/settings_player.dart:1470-1497 | lib/screens/settings/sub_settings/settings_player.dart:1566-1593 | lib/screens/settings/sub_settings/settings_player.dart:1688-1715 — 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.
D4 · Code Duplication · Duplicated block (26–27 lines × 3) · ×1
  • Duplicated block (26–27 lines × 3) lib/widgets/anime/visuals/visuals_popup.dart:163 — lib/widgets/anime/visuals/visuals_popup.dart:163-189 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:28-54 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:154-179 — before extracting anything, compare `lib/widgets/anime/visuals/visuals_popup.dart` and `lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) lib/screens/novel/reader/widgets/bottom_controls.dart:152 — lib/screens/novel/reader/widgets/bottom_controls.dart:152-178 | lib/screens/novel/reader/widgets/bottom_controls.dart:233-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) lib/controllers/services/anilist/anilist_auth.dart:1219 — lib/controllers/services/anilist/anilist_auth.dart:1219-1244 | lib/controllers/services/anilist/anilist_auth.dart:1279-1304 | lib/controllers/services/anilist/anilist_auth.dart:1642-1675 — 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.
D4 · Code Duplication · Duplicated block (24–26 lines × 2) · ×1
  • Duplicated block (24–26 lines × 2) lib/widgets/anime/visuals/visuals_popup.dart:379 — lib/widgets/anime/visuals/visuals_popup.dart:379-404 | lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart:228-251 — before extracting anything, compare `lib/widgets/anime/visuals/visuals_popup.dart` and `lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 160 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–25 lines × 3) · ×1
  • Duplicated block (21–25 lines × 3) lib/screens/settings/sub_settings/settings_player.dart:1445 — lib/screens/settings/sub_settings/settings_player.dart:1445-1465 | lib/screens/settings/sub_settings/settings_player.dart:1539-1559 | lib/screens/settings/sub_settings/settings_player.dart:1756-1780 — 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.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×1
  • Duplicated block (25 lines × 3) lib/widgets/non_widgets/reasons_sheet.dart:320 — lib/widgets/non_widgets/reasons_sheet.dart:320-344 | lib/widgets/non_widgets/recommend_sheet.dart:465-489 | lib/widgets/non_widgets/recommend_sheet.dart:512-536 — before extracting anything, compare `lib/widgets/non_widgets/reasons_sheet.dart` and `lib/widgets/non_widgets/recommend_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–25 lines × 2) · ×1
  • Duplicated block (20–25 lines × 2) lib/screens/settings/sub_settings/settings_player.dart:1324 — lib/screens/settings/sub_settings/settings_player.dart:1324-1343 | lib/screens/settings/sub_settings/settings_player.dart:1587-1611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21–24 lines × 9) · ×1
  • Duplicated block (21–24 lines × 9) lib/controllers/services/anilist/anilist_auth.dart:1471 — lib/controllers/services/anilist/anilist_auth.dart:1471-1494 | lib/controllers/services/anilist/anilist_auth.dart:1507-1527 | lib/controllers/services/anilist/anilist_auth.dart:1540-1560 | lib/controllers/services/anilist/anilist_auth.dart:1573-1593 | lib/controllers/services/anilist/anilist_auth.dart:1606-1626 | lib/controllers/services/anilist/anilist_auth.dart:1701-1722 | lib/controllers/services/anilist/anilist_auth.dart:1739-1762 | lib/controllers/services/anilist/anilist_auth.dart:1781-1802 | lib/controllers/services/anilist/anilist_auth.dart:1863-1884 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (20–24 lines × 3) · ×1
  • Duplicated block (20–24 lines × 3) lib/screens/library/widgets/library_deps.dart:161 — lib/screens/library/widgets/library_deps.dart:161-184 | lib/widgets/common/custom_tiles.dart:149-168 | lib/widgets/common/custom_tiles.dart:342-365 — before extracting anything, compare `lib/screens/library/widgets/library_deps.dart` and `lib/widgets/common/custom_tiles.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22–24 lines × 3) · ×1
  • Duplicated block (22–24 lines × 3) lib/widgets/common/media_mode_selector.dart:183 — lib/widgets/common/media_mode_selector.dart:183-204 | lib/widgets/common/media_mode_selector.dart:338-361 | lib/widgets/common/media_mode_selector.dart:453-476 — 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.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:850 — lib/screens/anime/widgets/comments/comments_section.dart:850-872 | lib/screens/anime/widgets/comments/comments_section.dart:1776-1799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) lib/screens/profile/widgets/profile_header.dart:260 — lib/screens/profile/widgets/profile_header.dart:260-281 | lib/screens/profile/widgets/user_profile_header.dart:240-263 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_header.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 4) · ×1
  • Duplicated block (23 lines × 4) lib/screens/local_source/local_source_view.dart:499 — lib/screens/local_source/local_source_view.dart:499-521 | lib/screens/local_source/local_source_view.dart:582-604 | lib/screens/local_source/local_source_view.dart:650-672 | lib/screens/local_source/local_source_view.dart:716-738 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (20–23 lines × 4) · ×1
  • Duplicated block (20–23 lines × 4) lib/screens/profile/widgets/profile_header.dart:472 — lib/screens/profile/widgets/profile_header.dart:472-494 | lib/screens/profile/widgets/profile_header.dart:729-748 | lib/screens/profile/widgets/user_profile_app_bar.dart:146-165 | lib/screens/profile/widgets/user_profile_header.dart:445-467 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–23 lines × 3) · ×1
  • Duplicated block (20–23 lines × 3) lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:74 — lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:74-93 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1341-1363 | lib/screens/settings/sub_settings/widgets/backup_and_restore_widgets.dart:1404-1426 — 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.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) lib/widgets/common/media_mode_selector.dart:115 — lib/widgets/common/media_mode_selector.dart:115-136 | lib/widgets/common/media_mode_selector.dart:237-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21–22 lines × 4) · ×1
  • Duplicated block (21–22 lines × 4) lib/screens/anime/widgets/anime_stats.dart:314 — lib/screens/anime/widgets/anime_stats.dart:314-335 | lib/screens/anime/widgets/anime_stats.dart:377-398 | lib/screens/anime/widgets/anime_stats.dart:440-461 | lib/screens/manga/widgets/manga_stats.dart:429-449 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–22 lines × 3) · ×1
  • Duplicated block (20–22 lines × 3) lib/screens/downloads/widgets/downloaded_media_view.dart:483 — lib/screens/downloads/widgets/downloaded_media_view.dart:483-502 | lib/screens/downloads/widgets/downloaded_media_view.dart:1080-1101 | lib/screens/extensions/ExtensionItem.dart:253-272 — before extracting anything, compare `lib/screens/downloads/widgets/downloaded_media_view.dart` and `lib/screens/extensions/ExtensionItem.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:273 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:273-294 | lib/widgets/watchium/watchium_create_dialog.dart:754-773 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) lib/widgets/common/navbar/styles/classic_navbar.dart:321 — lib/widgets/common/navbar/styles/classic_navbar.dart:321-342 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:374-392 — before extracting anything, compare `lib/widgets/common/navbar/styles/classic_navbar.dart` and `lib/widgets/common/navbar/styles/floating_pill_navbar.dart` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 222 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–21 lines × 3) · ×1
  • Duplicated block (19–21 lines × 3) lib/screens/anime/watch/controls/top_controls.dart:173 — lib/screens/anime/watch/controls/top_controls.dart:173-192 | lib/screens/anime/watch/controls/top_controls.dart:330-350 | lib/screens/anime/watch/controls/top_controls.dart:539-557 — 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.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) lib/screens/profile/widgets/decoration_closet_sheet.dart:729 — lib/screens/profile/widgets/decoration_closet_sheet.dart:729-749 | lib/screens/profile/widgets/decoration_closet_sheet.dart:860-880 | lib/screens/profile/widgets/decoration_closet_sheet.dart:1193-1213 — 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.
D4 · Code Duplication · Duplicated block (13–21 lines × 2) · ×1
  • Duplicated block (13–21 lines × 2) lib/screens/anime/widgets/comments/comments_section.dart:3271 — lib/screens/anime/widgets/comments/comments_section.dart:3271-3291 | lib/screens/settings/sub_settings/settings_moderation.dart:1793-1805 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/settings/sub_settings/settings_moderation.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) lib/widgets/header/header.dart:747 — lib/widgets/header/header.dart:747-765 | lib/widgets/header/header.dart:793-813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19–20 lines × 4) · ×1
  • Duplicated block (19–20 lines × 4) lib/screens/library/editor/list_editor.dart:548 — lib/screens/library/editor/list_editor.dart:548-567 | lib/screens/local_source/local_source_view.dart:831-849 | lib/screens/local_source/local_source_view.dart:884-902 | lib/screens/local_source/local_source_view.dart:936-954 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) lib/screens/anime/watch/controls/top_controls.dart:146 — lib/screens/anime/watch/controls/top_controls.dart:146-165 | lib/screens/anime/watch/controls/top_controls.dart:304-323 | lib/screens/anime/watch/controls/top_controls.dart:513-531 — 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.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) lib/screens/library/editor/list_editor.dart:251 — lib/screens/library/editor/list_editor.dart:251-270 | lib/screens/library/editor/list_editor.dart:364-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) lib/screens/anime/widgets/anime_stats.dart:607 — lib/screens/anime/widgets/anime_stats.dart:607-625 | lib/screens/anime/widgets/anime_stats.dart:732-750 | lib/screens/manga/widgets/manga_stats.dart:310-328 | lib/screens/manga/widgets/manga_stats.dart:774-792 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) lib/widgets/dialogs/logo_animation_preview_dialog.dart:131 — lib/widgets/dialogs/logo_animation_preview_dialog.dart:131-147 | lib/widgets/dialogs/logo_animation_preview_dialog.dart:254-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 10) · ×1
  • Duplicated block (18 lines × 10) lib/controllers/services/anilist/anilist_auth.dart:1474 — lib/controllers/services/anilist/anilist_auth.dart:1474-1494 | lib/controllers/services/anilist/anilist_auth.dart:1510-1527 | lib/controllers/services/anilist/anilist_auth.dart:1543-1560 | lib/controllers/services/anilist/anilist_auth.dart:1576-1593 | lib/controllers/services/anilist/anilist_auth.dart:1609-1626 | lib/controllers/services/anilist/anilist_auth.dart:1704-1722 | lib/controllers/services/anilist/anilist_auth.dart:1742-1762 | lib/controllers/services/anilist/anilist_auth.dart:1784-1802 | lib/controllers/services/anilist/anilist_auth.dart:1817-1841 | lib/controllers/services/anilist/anilist_auth.dart:1866-1884 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (18 lines × 8) · ×1
  • Duplicated block (18 lines × 8) lib/controllers/services/anilist/anilist_auth.dart:1474 — lib/controllers/services/anilist/anilist_auth.dart:1474-1494 | lib/controllers/services/anilist/anilist_auth.dart:1543-1560 | lib/controllers/services/anilist/anilist_auth.dart:1576-1593 | lib/controllers/services/anilist/anilist_auth.dart:1742-1763 | lib/controllers/services/anilist/anilist_auth.dart:1784-1802 | lib/controllers/services/anilist/anilist_auth.dart:1817-1841 | lib/controllers/services/anilist/anilist_auth.dart:1866-1884 | lib/controllers/services/anilist/anilist_auth.dart:2500-2522 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17–18 lines × 4) · ×1
  • Duplicated block (17–18 lines × 4) lib/screens/anime/widgets/anime_stats.dart:654 — lib/screens/anime/widgets/anime_stats.dart:654-671 | lib/screens/anime/widgets/anime_stats.dart:694-710 | lib/screens/manga/widgets/manga_stats.dart:357-374 | lib/screens/manga/widgets/manga_stats.dart:736-752 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–18 lines × 3) · ×1
  • Duplicated block (15–18 lines × 3) lib/screens/profile/activity_details_page.dart:632 — lib/screens/profile/activity_details_page.dart:632-646 | lib/screens/profile/widgets/social_tab.dart:298-315 | lib/widgets/non_widgets/activity_card.dart:381-395 — before extracting anything, compare `lib/screens/profile/activity_details_page.dart` and `lib/screens/profile/widgets/social_tab.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) lib/screens/anime/details/media_details_page.dart:583 — lib/screens/anime/details/media_details_page.dart:583-600 | lib/screens/manga/widgets/chapter_list_builder.dart:245-258 — 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 · Duplicated block (15–17 lines × 5) · ×1
  • Duplicated block (15–17 lines × 5) lib/services/commentum_service.dart:683 — lib/services/commentum_service.dart:683-699 | lib/services/commentum_service.dart:731-747 | lib/services/commentum_service.dart:780-794 | lib/services/commentum_service.dart:817-832 | lib/services/commentum_service.dart:939-955 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14–17 lines × 3) · ×1
  • Duplicated block (14–17 lines × 3) lib/screens/anime/widgets/anime_stats.dart:599 — lib/screens/anime/widgets/anime_stats.dart:599-615 | lib/screens/manga/widgets/manga_stats.dart:302-318 | lib/screens/profile/widgets/profile_stats_tab.dart:421-434 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) lib/screens/anime/home_page.dart:231 — lib/screens/anime/home_page.dart:231-246 | lib/screens/extensions/ExtensionScreen.dart:211-226 | lib/screens/home_page.dart:305-320 | lib/screens/library/my_library.dart:151-166 | lib/screens/manga/home_page.dart:122-137 | lib/screens/novel/home_page.dart:91-106 — `lib/screens/anime/home_page.dart` and `lib/screens/manga/home_page.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:549 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:549-564 | lib/screens/watchium/watchium_page.dart:376-391 | lib/widgets/watchium/watchium_create_dialog.dart:475-490 | lib/widgets/watchium/watchium_party_popup.dart:705-720 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) lib/screens/anime/widgets/anime_stats.dart:288 — lib/screens/anime/widgets/anime_stats.dart:288-303 | lib/screens/anime/widgets/anime_stats.dart:352-366 | lib/screens/anime/widgets/anime_stats.dart:414-429 | lib/screens/manga/widgets/manga_stats.dart:403-417 — before extracting anything, compare `lib/screens/anime/widgets/anime_stats.dart` and `lib/screens/manga/widgets/manga_stats.dart` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 448 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) lib/widgets/common/cards/styles/exotic_card.dart:134 — lib/widgets/common/cards/styles/exotic_card.dart:134-147 | lib/widgets/common/cards/styles/minimal_exotic_card.dart:151-166 — before extracting anything, compare `lib/widgets/common/cards/styles/exotic_card.dart` and `lib/widgets/common/cards/styles/minimal_exotic_card.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–15 lines × 6) · ×1
  • Duplicated block (14–15 lines × 6) lib/screens/anime/watch/controls/bottom_controls.dart:413 — lib/screens/anime/watch/controls/bottom_controls.dart:413-427 | lib/screens/anime/watch/controls/bottom_controls.dart:462-476 | lib/screens/anime/watch/controls/bottom_controls.dart:486-500 | lib/screens/anime/watch/controls/bottom_controls.dart:553-567 | lib/screens/anime/watch/controls/bottom_controls.dart:586-600 | lib/screens/anime/watch/controls/top_controls.dart:380-393 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:374 — lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart:374-388 | lib/screens/anime/watch/controls/widgets/progress_slider.dart:291-305 | lib/screens/anime/widgets/video_slider.dart:53-67 | lib/widgets/common/anymex_slider_m3.dart:403-417 | lib/widgets/common/slider_semantics.dart:139-153 | lib/widgets/common/slider_semantics.dart:284-298 — before extracting anything, compare `lib/screens/anime/watch/controls/themes/media_indicator_themes/default_media_indicator_theme.dart` and `lib/widgets/common/anymex_slider_m3.dart` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 5) · ×1
  • Duplicated block (14 lines × 5) lib/screens/local_source/local_source_view.dart:499 — lib/screens/local_source/local_source_view.dart:499-512 | lib/screens/local_source/local_source_view.dart:582-595 | lib/screens/local_source/local_source_view.dart:650-663 | lib/screens/local_source/local_source_view.dart:716-729 | lib/screens/local_source/local_source_view.dart:1169-1182 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) lib/screens/downloads/download_screen.dart:1121 — lib/screens/downloads/download_screen.dart:1121-1134 | lib/screens/downloads/download_screen.dart:1396-1409 | lib/screens/downloads/widgets/download_server_selector.dart:363-375 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) lib/controllers/services/anilist/anilist_data.dart:288 — lib/controllers/services/anilist/anilist_data.dart:288-298 | lib/controllers/services/mal/mal_service.dart:131-144 — before extracting anything, compare `lib/controllers/services/anilist/anilist_data.dart` and `lib/controllers/services/mal/mal_service.dart` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–13 lines × 4) · ×1
  • Duplicated block (11–13 lines × 4) lib/controllers/discord/discord_rpc.dart:502 — lib/controllers/discord/discord_rpc.dart:502-514 | lib/controllers/discord/discord_rpc.dart:631-642 | lib/controllers/discord/discord_rpc.dart:747-757 | lib/controllers/discord/discord_rpc.dart:855-866 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×1
  • Duplicated block (12–13 lines × 4) lib/screens/profile/widgets/profile_header.dart:1023 — lib/screens/profile/widgets/profile_header.dart:1023-1035 | lib/screens/profile/widgets/profile_header.dart:1053-1065 | lib/screens/profile/widgets/user_profile_app_bar.dart:532-543 | lib/screens/profile/widgets/user_profile_app_bar.dart:568-580 — before extracting anything, compare `lib/screens/profile/widgets/profile_header.dart` and `lib/screens/profile/widgets/user_profile_app_bar.dart` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) lib/screens/settings/sub_settings/settings_common.dart:42 — lib/screens/settings/sub_settings/settings_common.dart:42-54 | lib/screens/settings/sub_settings/settings_logs.dart:24-35 | lib/screens/settings/sub_settings/settings_storage_manager.dart:183-194 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) lib/screens/anime/home_page.dart:227 — lib/screens/anime/home_page.dart:227-238 | lib/screens/extensions/ExtensionScreen.dart:207-218 | lib/screens/home_page.dart:301-312 | lib/screens/library/history_page.dart:218-229 | lib/screens/library/my_library.dart:147-158 | lib/screens/manga/home_page.dart:118-129 | lib/screens/novel/home_page.dart:87-98 | lib/screens/stats/user_stats_page.dart:227-238 — `lib/screens/anime/home_page.dart` and `lib/screens/manga/home_page.dart` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 39 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) lib/screens/settings/sub_settings/settings_moderation.dart:544 — lib/screens/settings/sub_settings/settings_moderation.dart:544-555 | lib/widgets/non_widgets/reasons_sheet.dart:257-268 | lib/widgets/non_widgets/recommend_sheet.dart:406-417 | lib/widgets/non_widgets/recommend_sheet.dart:612-623 | lib/widgets/non_widgets/recommend_sheet.dart:1094-1105 | lib/widgets/non_widgets/recommend_sheet.dart:1173-1184 — before extracting anything, compare `lib/widgets/non_widgets/reasons_sheet.dart` and `lib/widgets/non_widgets/recommend_sheet.dart` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) lib/screens/library/editor/history_editor.dart:273 — lib/screens/library/editor/history_editor.dart:273-284 | lib/screens/library/editor/history_editor.dart:373-384 | lib/screens/library/editor/history_editor.dart:798-809 | lib/screens/library/editor/list_editor.dart:174-185 | lib/screens/library/editor/list_editor.dart:324-335 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) lib/screens/anime/widgets/episode_list_builder.dart:997 — lib/screens/anime/widgets/episode_list_builder.dart:997-1008 | lib/screens/anime/widgets/episode_list_builder.dart:1029-1040 | lib/screens/manga/widgets/chapter_list_builder.dart:1128-1139 | lib/screens/manga/widgets/chapter_list_builder.dart:1160-1171 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–11 lines × 6) · ×1
  • Duplicated block (9–11 lines × 6) lib/screens/library/online/anime_list.dart:599 — lib/screens/library/online/anime_list.dart:599-609 | lib/screens/library/online/manga_list.dart:583-593 | lib/widgets/anymex_widgets/anymex_header.dart:82-91 | lib/widgets/common/navbar/styles/classic_navbar.dart:157-165 | lib/widgets/common/navbar/styles/floating_pill_navbar.dart:136-145 | lib/widgets/header/header.dart:996-1004 — before extracting anything, compare `lib/screens/library/online/anime_list.dart` and `lib/screens/library/online/manga_list.dart` as WHOLE FILES: this scan already matched 28 separate duplicated blocks between them, totalling at least 764 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) lib/screens/anime/widgets/episode_list_builder.dart:1001 — lib/screens/anime/widgets/episode_list_builder.dart:1001-1009 | lib/screens/manga/widgets/chapter_list_builder.dart:1132-1140 | lib/screens/search/widgets/search_widgets.dart:2249-2259 — before extracting anything, compare `lib/screens/anime/widgets/episode_list_builder.dart` and `lib/screens/manga/widgets/chapter_list_builder.dart` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 365 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • Duplicated block (10 lines × 6) lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:556 — lib/screens/anime/watch/controls/widgets/watch_together_popup.dart:556-565 | lib/screens/watchium/watchium_page.dart:383-392 | lib/widgets/non_widgets/reasons_sheet.dart:260-269 | lib/widgets/non_widgets/recommend_sheet.dart:409-418 | lib/widgets/non_widgets/recommend_sheet.dart:615-624 | lib/widgets/watchium/watchium_create_dialog.dart:482-491 — before extracting anything, compare `lib/screens/anime/watch/controls/widgets/watch_together_popup.dart` and `lib/widgets/watchium/watchium_create_dialog.dart` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) lib/screens/manga/widgets/reader/top_controls.dart:80 — lib/screens/manga/widgets/reader/top_controls.dart:80-88 | lib/screens/manga/widgets/reader/top_controls.dart:179-188 | lib/screens/novel/reader/widgets/top_controls.dart:57-65 | lib/screens/novel/reader/widgets/top_controls.dart:163-171 — before extracting anything, compare `lib/screens/manga/widgets/reader/top_controls.dart` and `lib/screens/novel/reader/widgets/top_controls.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×1
  • Duplicated block (8–10 lines × 3) lib/screens/anime/widgets/episode/styles/detailed_style.dart:210 — lib/screens/anime/widgets/episode/styles/detailed_style.dart:210-217 | lib/screens/downloads/widgets/download_server_selector.dart:470-479 | lib/widgets/watchium/watchium_server_sheet.dart:241-250 — before extracting anything, compare `lib/screens/downloads/widgets/download_server_selector.dart` and `lib/widgets/watchium/watchium_server_sheet.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5–10 lines × 4) · ×1
  • Duplicated block (5–10 lines × 4) package_manager.dart:111 — package_manager.dart:111-120 | package_manager.dart:123-127 | package_manager.dart:131-138 | package_manager.dart:142-151 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) lib/screens/downloads/widgets/download_server_selector.dart:397 — lib/screens/downloads/widgets/download_server_selector.dart:397-406 | lib/screens/downloads/widgets/downloaded_media_view.dart:618-625 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) lib/screens/search/widgets/extension_filter_sheet.dart:311 — lib/screens/search/widgets/extension_filter_sheet.dart:311-320 | lib/screens/search/widgets/extension_filter_sheet.dart:797-805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) lib/screens/anime/watch/controls/widgets/sync_subs_popup.dart:182 — lib/screens/anime/watch/controls/widgets/sync_subs_popup.dart:182-188 | lib/screens/downloads/widgets/download_server_selector.dart:395-403 | lib/screens/downloads/widgets/downloaded_media_view.dart:616-622 — 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) lib/screens/extensions/ExtensionScreen.dart:416 — lib/screens/extensions/ExtensionScreen.dart:416-423 | lib/screens/extensions/ExtensionScreen.dart:448-456 | lib/screens/extensions/ExtensionScreen.dart:617-625 — 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.
D4 · Code Duplication · Duplicated block (4–9 lines × 3) · ×1
  • Duplicated block (4–9 lines × 3) lib/models/Anilist/anilist_activity.dart:102 — lib/models/Anilist/anilist_activity.dart:102-109 | lib/models/Anilist/anilist_activity.dart:118-121 | lib/models/Anilist/anilist_activity.dart:144-152 — 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.
D4 · Code Duplication · Duplicated block (3–8 lines × 3) · ×1
  • Duplicated block (3–8 lines × 3) lib/models/Anilist/anilist_activity.dart:94 — lib/models/Anilist/anilist_activity.dart:94-101 | lib/models/Anilist/anilist_activity.dart:111-117 | lib/models/Anilist/anilist_activity.dart:141-143 — 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) lib/screens/local_source/controller/local_source_controller.dart:320 — lib/screens/local_source/controller/local_source_controller.dart:320-327 | lib/screens/local_source/controller/local_source_controller.dart:329-336 | lib/screens/local_source/controller/local_source_controller.dart:337-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.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) lib/controllers/services/community_service.dart:1031 — lib/controllers/services/community_service.dart:1031-1037 | lib/controllers/services/community_service.dart:1062-1068 | lib/controllers/services/community_service.dart:1093-1098 | lib/controllers/services/community_service.dart:1117-1122 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) lib/screens/downloads/controller/download_controller.dart:528 — lib/screens/downloads/controller/download_controller.dart:528-533 | lib/screens/downloads/controller/download_controller.dart:542-548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (3–7 lines × 3) · ×1
  • Duplicated block (3–7 lines × 3) lib/screens/manga/widgets/reader/top_controls.dart:453 — lib/screens/manga/widgets/reader/top_controls.dart:453-459 | lib/screens/manga/widgets/reader/top_controls.dart:468-473 | lib/screens/manga/widgets/reader/top_controls.dart:636-638 — 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.
D4 · Code Duplication · Duplicated block (5–7 lines × 2) · ×1
  • Duplicated block (5–7 lines × 2) lib/utils/sub_parser.dart:104 — lib/utils/sub_parser.dart:104-110 | lib/utils/sub_parser.dart:118-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) lib/screens/anime/widgets/comments/comments_section.dart:3271 — lib/screens/anime/widgets/comments/comments_section.dart:3271-3276 | lib/screens/anime/widgets/comments/comments_section.dart:3281-3286 | lib/screens/settings/sub_settings/settings_moderation.dart:1778-1783 | lib/screens/settings/sub_settings/settings_moderation.dart:1795-1800 — before extracting anything, compare `lib/screens/anime/widgets/comments/comments_section.dart` and `lib/screens/settings/sub_settings/settings_moderation.dart` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–6 lines × 3) · ×1
  • Duplicated block (4–6 lines × 3) lib/widgets/non_widgets/recommend_sheet.dart:273 — lib/widgets/non_widgets/recommend_sheet.dart:273-278 | lib/widgets/non_widgets/recommend_sheet.dart:315-320 | lib/widgets/non_widgets/recommend_sheet.dart:758-761 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) lib/controllers/offline/offline_storage_controller.dart:656 — lib/controllers/offline/offline_storage_controller.dart:656-660 | lib/controllers/offline/offline_storage_controller.dart:697-701 | lib/controllers/offline/offline_storage_controller.dart:829-833 | lib/screens/manga/controller/reader_controller.dart:789-793 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) lib/widgets/anymex_widgets/anymex_animated_logo.dart:528 — lib/widgets/anymex_widgets/anymex_animated_logo.dart:528-532 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:823-827 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:1026-1028 — 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.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) lib/widgets/anymex_widgets/anymex_animated_logo.dart:668 — lib/widgets/anymex_widgets/anymex_animated_logo.dart:668-671 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:906-910 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:1122-1126 | lib/widgets/anymex_widgets/anymex_animated_logo.dart:1317-1320 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) lib/widgets/common/cards/styles/exotic_card.dart:29 — lib/widgets/common/cards/styles/exotic_card.dart:29-37 | lib/widgets/common/cards/styles/minimal_exotic_card.dart:29-37 | lib/widgets/common/cards/styles/modern_card.dart:26-34 | lib/widgets/common/cards/styles/saikou_card.dart:25-33 | lib/widgets/common/cards/styles/simple_card.dart:30-38 — before extracting anything, compare `lib/widgets/common/cards/styles/exotic_card.dart` and `lib/widgets/common/cards/styles/minimal_exotic_card.dart` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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.
IC1 · Incompleteness & stubs · Hollow method · ×1
  • Hollow method — returns a constant without doing the work lib/widgets/anymex_widgets/anymex_header.dart:47 — `onScrollNotification` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
S1 · Web-Security Posture · Weak hash algorithm · ×1
  • Weak hash algorithm lib/widgets/subsampling_scale_image_view/subsampling_scale_image_view.dart:580 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha256.convert(…)` from `package:crypto`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) android/app/src/main/kotlin/com/ryan/anymex/MainActivity.kt:375 — The JDK pipes both `stdout` and `stderr` of a child started this way — no `redirectErrorStream`, `redirectError`, `redirectOutput` or `inheritIO` is set — and here `process.inputStream` (stdout) is read while the child's end is awaited, but nothing in this scope ever reads `process.errorStream` (stderr). The JDK's own `Process` documentation warns that failing to read a child's output promptly "may cause the process to block, or even deadlock": once the child writes more than the pipe holds to stderr (measured on OpenJDK 25 / Linux: 60,000 bytes finishes, 70,000 hangs forever), it blocks on the write, never exits, and the `waitFor` or end of stream this code waits on never comes. Nothing fails loudly: the thread hangs and the stuck child holds its resources until something kills it. Read both streams (a coroutine or thread per stream), merge them with `redirectErrorStream(true)` before `start()`, or discard the unwanted one with `redirectError(ProcessBuilder.Redirect.DISCARD)` (or `redirectOutput`).
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap lib/database/comments/model/comment.dart:153 — `Comment.fromMap` is public and takes `Map m` from its caller, and it calls itself at line 153 (`Comment.fromMap`) with a piece of `m` — and nowhere in `Comment.fromMap` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. `jsonDecode` sets no nesting limit: 2 MB of brackets parse to a million levels, while a walk like this one throws `StackOverflowError` from about 20,000 levels — 40,000 bytes (Dart 3.13 VM; on the web the limit is the browser's stack). That is an `Error`, not an `Exception`: an `on Exception catch` around the call does not stop it, so the request, the frame or the isolate fails with it. Thread a depth argument through `Comment.fromMap` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Minor — 93 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate lib/utils/deeplink.dart:310 — `!Get.isRegistered<ServiceHandler>() || Get.context == null` appears character-identically in 2 files — lib/utils/deeplink.dart, lib/utils/notification.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/screens/anime/widgets/comments/comments_section.dart:576 — `!c.deleted && name.isNotEmpty && name.toLowerCase() != '[deleted]' && seen.add(name.toLowerCase())` appears character-identically in 2 files — lib/screens/anime/widgets/comments/comments_section.dart, lib/screens/anime/widgets/comments/widgets/comment_input_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/screens/anime/misc/calendar.dart:227 — `!mounted || index < 0 || index >= _tabKeys.length` appears character-identically in 3 files — lib/screens/anime/misc/calendar.dart, lib/screens/library/online/anime_list.dart, lib/screens/library/online/manga_list.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/manga/controller/reader_controller.dart:286 — `!overscrollToChapter.value || _isNavigating` appears character-identically in 2 files — lib/screens/manga/controller/reader_controller.dart, lib/screens/novel/reader/controller/reader_controller.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/screens/anime/widgets/comments/comments_section.dart:3252 — `!snapshot.hasData || snapshot.data == null` appears character-identically in 2 files — lib/screens/anime/widgets/comments/comments_section.dart, lib/utils/al_about_me.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/screens/anime/details/widgets/media_stats_section.dart:297 — `!snapshot.hasData || snapshot.data!.isEmpty` appears character-identically in 5 files — lib/screens/anime/details/widgets/media_stats_section.dart, lib/screens/anime/widgets/anime_stats.dart, lib/screens/anime/widgets/episode_watch_screen.dart, lib/screens/downloads/nested_screens/active_downloads/active_downloads.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/controllers/offline/offline_storage_controller.dart:828 — `(c.link != null && c.link!.isNotEmpty && c.link == chapter.link) || (c.number != null && c.number == chapter.number)` appears character-identically in 3 files — lib/controllers/offline/offline_storage_controller.dart, lib/screens/anime/details/controller/media_details_controller.dart, lib/screens/manga/widgets/chapter_list_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/screens/extensions/ExtensionScreen.dart:612 — `AnymeXRuntimeBridge.isPluginInstalled || AnymeXRuntimeBridge.controller.isReady.value` appears character-identically in 2 files — lib/screens/extensions/ExtensionScreen.dart, lib/screens/settings/sub_settings/settings_extensions.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/media_items/media_peek_popup.dart:151 — `CommunityService.votingEnabled && widget.voteMediaType != null && widget.voteMediaId != null` appears character-identically in 2 files — lib/widgets/media_items/media_peek_popup.dart, lib/widgets/non_widgets/reasons_sheet.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/screens/manga/controller/reader_controller.dart:460 — `Get.isBottomSheetOpen == true || Get.isDialogOpen == true || Get.isOverlaysOpen == true` appears character-identically in 2 files — lib/screens/manga/controller/reader_controller.dart, lib/screens/novel/reader/controller/reader_controller.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/database/isar_models/offline_media.dart:31 — `Get.isRegistered<Settings>() && Get.find<Settings>().useAlternateTitle.value` appears character-identically in 3 files — lib/database/isar_models/offline_media.dart, lib/models/Anilist/anilist_media_user.dart, lib/models/Media/media.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/screens/anime/widgets/episode_list_builder.dart:1711 — `Get.isRegistered<TrackBindingController>() && Get.find<TrackBindingController>().hasAnyBinding(mediaData.id)` appears character-identically in 2 files — lib/screens/anime/widgets/episode_list_builder.dart, lib/screens/manga/widgets/chapter_list_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/screens/manga/widgets/reader/themes/reader_control_themes/ios_reader_control_theme.dart:49 — `Platform.isWindows || Platform.isLinux || Platform.isMacOS` appears character-identically in 3 files — lib/screens/manga/widgets/reader/themes/reader_control_themes/ios_reader_control_theme.dart, lib/screens/profile/compatibility/compatibility_result_page.dart, lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.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/screens/library/online/anime_list.dart:828 — `_searchQuery.isNotEmpty || _selectedGenres.isNotEmpty` appears character-identically in 3 files — lib/screens/library/online/anime_list.dart, lib/screens/library/online/manga_list.dart, lib/screens/profile/widgets/user_media_list_page.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/library/online/anime_list.dart:778 — `_tabController == null || _tabController!.length != orderedTabs.length` appears character-identically in 2 files — lib/screens/library/online/anime_list.dart, lib/screens/library/online/manga_list.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/community/community_recommendations_page.dart:151 — `anilistId == null && malId == null && simklId == null` appears character-identically in 3 files — lib/screens/community/community_recommendations_page.dart, lib/widgets/media_items/media_peek_popup.dart, lib/widgets/non_widgets/reasons_sheet.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/controllers/services/anilist/anilist_auth.dart:98 — `apiMessage != null && apiMessage.isNotEmpty` appears character-identically in 2 files — lib/controllers/services/anilist/anilist_auth.dart, lib/controllers/services/anilist/anilist_error_handler.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/screens/anime/details/media_details_page.dart:580 — `auth.isLoggedIn.value && auth.serviceType.value != ServicesType.extensions` appears character-identically in 5 files — lib/screens/anime/details/media_details_page.dart, lib/screens/anime/widgets/episode_list_builder.dart, lib/screens/anime/widgets/episode_watch_screen.dart, lib/screens/novel/details/widgets/chapter_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.
  • Duplicated predicate lib/controllers/services/widgets/widgets_builders.dart:422 — `avatarUrl != null && avatarUrl!.isNotEmpty` appears character-identically in 6 files — lib/controllers/services/widgets/widgets_builders.dart, lib/controllers/sync/progress_sync_section.dart, lib/screens/community/community_recommendations_page.dart, lib/screens/community/user_recommendations_page.dart. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/screens/downloads/download_screen.dart:193 — `await Permission.storage.isGranted || await Permission.manageExternalStorage.isGranted || await Permission.videos.isGranted || await Permiss…` appears character-identically in 2 files — lib/screens/downloads/download_screen.dart, lib/screens/downloads/widgets/download_permission_dialog.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/screens/downloads/widgets/downloaded_media_view.dart:251 — `baseChapter.link == null || baseChapter.link!.isEmpty` appears character-identically in 2 files — lib/screens/downloads/widgets/downloaded_media_view.dart, lib/screens/manga/widgets/chapter_list_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/screens/anime/widgets/comments/comments_section.dart:586 — `c.replies != null && c.replies!.isNotEmpty` appears character-identically in 2 files — lib/screens/anime/widgets/comments/comments_section.dart, lib/screens/anime/widgets/comments/widgets/comment_input_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/screens/manga/controller/reader_controller.dart:251 — `chapter.link != null && chapter.link!.isNotEmpty` appears character-identically in 4 files — lib/screens/manga/controller/reader_controller.dart, lib/screens/manga/widgets/chapter_list_builder.dart, lib/screens/manga/widgets/reader/top_controls.dart, lib/screens/novel/reader/controller/reader_controller.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/screens/manga/widgets/chapter_list_builder.dart:118 — `chapter.number == continueChapter?.number && chapter.scanlator == continueChapter?.scanlator` appears character-identically in 2 files — lib/screens/manga/widgets/chapter_list_builder.dart, lib/screens/novel/details/widgets/chapter_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.
  • Duplicated predicate lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart:164 — `cleanDownload == null || cleanDownload == cleanHome` appears character-identically in 3 files — lib/screens/manga/widgets/reader/reader_page_actions_dialog.dart, lib/widgets/anime/visuals/visuals_popup.dart, lib/widgets/anymex_widgets/anymex_fullscreen_image_viewer.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.
X4 · Structured logging · Interpolated log message defeats structured logging · ×19
  • Interpolated log message defeats structured logging repo/update_source.py:120 — `exception` at line 120 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:123 — `exception` at line 123 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:162 — `exception` at line 162 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:175 — `info` at line 175 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:196 — `info` at line 196 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:239 — `warning` at line 239 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:289 — `info` at line 289 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:315 — `info` at line 315 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:328 — `info` at line 328 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:353 — `exception` at line 353 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:356 — `exception` at line 356 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:372 — `warning` at line 372 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:390 — `warning` at line 390 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:445 — `exception` at line 445 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:460 — `info` at line 460 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:468 — `info` at line 468 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:470 — `exception` at line 470 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:493 — `info` at line 493 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging repo/update_source.py:496 — `exception` at line 496 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.exception("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.exception("order moved", order_id=order_id, status=status)` with structlog.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×15
  • Hand-rolled JSON/XML parsing via regex package_manager.dart:134 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex package_manager.dart:148 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex package_manager.dart:154 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex package_manager.dart:163 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/screens/novel/reader/controller/reader_controller.dart:482 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/screens/novel/reader/controller/reader_controller.dart:916 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/screens/novel/reader/controller/reader_controller.dart:919 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/anime_adaptation_util.dart:139 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/anime_adaptation_util.dart:141 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/al_about_me.dart:44 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/al_about_me.dart:53 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/al_about_me.dart:79 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/al_about_me.dart:156 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/utils/al_about_me.dart:293 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/widgets/non_widgets/activity_card.dart:938 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
X7 · Silent fallback defaults · Silent fallback default in catch · ×10
  • Silent fallback default in catch lib/controllers/custom_logo/custom_logo_service.dart:40 — `getSelectedCustomLogoId` turns every thrown error into `''` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/controllers/services/backup_restore/backup_restore_service.dart:442 — `getExtensionsDataCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/controllers/services/backup_restore/parsers/kotatsu_backup_parser.dart:254 — `_readJsonSection` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/screens/anime/widgets/comments/controller/comments_controller.dart:471 — `formatCommentTimestamp` turns every thrown error into `''` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/screens/anime/widgets/comments/widgets/user_comments_sheet.dart:979 — `_until` turns every thrown error into `'active'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/screens/extensions/widgets/plugin_manager.dart:198 — `fetchReleases` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/screens/local_source/controller/local_source_controller.dart:465 — `getFileSize` turns every thrown error into `'Unknown'` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/utils/anime_adaptation_util.dart:58 — `getAnimeNews` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/utils/external_font_loader.dart:273 — `getCustomFontNames` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
  • Silent fallback default in catch lib/utils/watch_order_util.dart:183 — `fetchWatchOrder` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch` or in the `///` doc, and the row stops firing.
IC1 · Incompleteness & stubs · Member throws UnsupportedError · ×3
  • Member throws UnsupportedError lib/utils/color_extractor.dart:171 — `_base64ToBytes`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/rhttp/lib/src/client/io/io_response.dart:38 — `detachSocket`'s body only throws an UnsupportedError or an UnimplementedError that gives its reason — sometimes a deliberate refusal, often an unfinished stub. Confirm it's intentional.
  • Member throws UnsupportedError packages/rhttp/lib/src/client/io/io_response.dart:77 — `redirect`'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.
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file lib/utils/anime_themes_api.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/models/animethemes/anime_theme.dart:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — 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/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 8 project(s) overshoot their size bounds, lowering Project Cohesion to 7.5/10. The most over is `(repository root)` (214970 LoC, 893 module-visible types across 141 directories). 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.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 444 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 444 of the 580 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: lib/utils/anime_themes_api.dart, lib/models/animethemes/anime_theme.dart. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift README.md:1 — README claims AnymeX is a tracking tool but the evidence shows it hosts and distributes streaming content — searched for: `streaming content`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 162/167 types (97%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 4/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `ios`, `macos`, `packages/rhttp/example`, `packages/rhttp/example/ios`, `packages/rhttp/example/macos`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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 69335 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.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected firebase.json:1 — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `firebase.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×1
  • No app-layer HTTPS enforcement detected — This repository runs an HTTP server that is not bound to the loopback interface alone — or binds it at an address its source does not spell out — and nothing in its Dart source secures the transport: no `HttpServer.bindSecure` or `securityContext:`, no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: lib/services/cast/cast_proxy_server.dart:29 — `HttpServer.bind(`.
X2 · Cancellation propagation · Not all functions that make a request accept a CancelToken · ×1
  • Not all functions that make a request accept a CancelToken — Only 0/5 functions that make a cancellable request (Dio, AbortableRequest) accept a CancelToken or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. Take a `CancelToken? cancelToken` and hand it to the request as `cancelToken:` (or hold one and cancel it in `dispose`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×1
  • Diagnostic log message is built whether or not it is wanted packages/rhttp/cargokit/build_tool/lib/src/util.dart:109 — `finer` at line 109 is called with an argument built by `arguments.join('…')` (line 109), whose cost grows with the collection it walks. Dart evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because finer is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLoggable` test, no `kDebugMode` or debug flag, no `assert`, no closure the logger calls only when the level is on.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-ae459e400bf240c294b4c509c92c8a40/history.json --exit-code 0 --source .14artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-ae459e400bf240c294b4c509c92c8a40/tree.json --exit-code 0 --source .6artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .52artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-1ec6ec1b47ad45ef9f4fb6c8e84b4b330artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) — `packages/rhttp/android/settings.gradle.kts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-1ec6ec1b47ad45ef9f4fb6c8e84b4b330artifacts/raw/osv-scanner.json

Run 01a15c2d-6a9f-7dec-bb10-7fd453c3a167 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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