{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX1","name":"Captive dependencies","shortDescription":{"text":"Captive dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/AX1"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX5","name":"Architecture \u0026 structure","shortDescription":{"text":"Architecture \u0026 structure"},"helpUri":"https://codehealth.canine.dev/dimensions/AX5"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AX7","name":"Slice cohesion","shortDescription":{"text":"Slice cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/AX7"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"GD1","name":"Unfinished \u0026 placeholder code","shortDescription":{"text":"Unfinished \u0026 placeholder code"},"helpUri":"https://codehealth.canine.dev/dimensions/GD1"},{"id":"IC1","name":"Incompleteness \u0026 stubs","shortDescription":{"text":"Incompleteness \u0026 stubs"},"helpUri":"https://codehealth.canine.dev/dimensions/IC1"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P8","name":"Schema migrations","shortDescription":{"text":"Schema migrations"},"helpUri":"https://codehealth.canine.dev/dimensions/P8"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"S1","name":"Web-Security Posture","shortDescription":{"text":"Web-Security Posture"},"helpUri":"https://codehealth.canine.dev/dimensions/S1"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X2","name":"Cancellation propagation","shortDescription":{"text":"Cancellation propagation"},"helpUri":"https://codehealth.canine.dev/dimensions/X2"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"BaseGameCard.build (cyclomatic 44): BaseGameCard.build has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"4630dc3c04f46ad2b6fa5a1995f546ec529e6d00ba523cd8153abdabef455560"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._downloadHttp (cyclomatic 43): DownloadService._downloadHttp 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"3837852904a49688814a7fc6b052200c06919bc9a8bd2a5830465b8daa0b0e58"}},{"ruleId":"D1","level":"warning","message":{"text":"_PrimaryActionButton.build (cyclomatic 37): _PrimaryActionButton.build has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c49d297eb4c84e12fdade5f82ddae070ef15c6f559eeeb15b2f3f3033c93a5c"}},{"ruleId":"D1","level":"warning","message":{"text":"RaHashService._prepareBytes (cyclomatic 31): RaHashService._prepareBytes has cyclomatic complexity 31 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_hash_service.dart"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b1287d97c2f610b65fafa0ec86470f1e3594df7ac915aa7599adcadbcf7ea3"}},{"ruleId":"D1","level":"warning","message":{"text":"RaNameMatcher.findBestMatch (cyclomatic 30): RaNameMatcher.findBestMatch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/ra_name_matcher.dart"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ee556942fd8b6bd409bd7679f29f38d1e2875b7aeda4181375a02306951339"}},{"ruleId":"D1","level":"warning","message":{"text":"_ConsoleTileState.build (cyclomatic 29): _ConsoleTileState.build has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_grid.dart"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"7838bbac4863baa4bc5a331df6485f7d71f2b12b3b9edc214aa55c6e62555998"}},{"ruleId":"D1","level":"warning","message":{"text":"_AchievementTile.build (cyclomatic 28): _AchievementTile.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"b96a071abb3556aa0bdb0e33a053c9566445efcfb7c8fbf62acd88cd11b2f47e"}},{"ruleId":"D1","level":"warning","message":{"text":"_LibraryScreenState._buildContent (cyclomatic 28): _LibraryScreenState._buildContent 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":1218}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39aa1e2c2522fff1f2bebb719435e54ee19572a625d922400f573bf014ecb44"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsoleSetupStep.build (cyclomatic 28): ConsoleSetupStep.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_setup_step.dart"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd8fa37c4d3ba7a454fdce59395186cf1ef98cd0c6baf00564a82deda75c7652"}},{"ruleId":"D1","level":"warning","message":{"text":"ScanConsoleTile.build (cyclomatic 28): ScanConsoleTile.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/widgets/scan_console_tile.dart"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"6781c0a8bc06efa0cb6ecde72cec5a78302811a7b0f7ac1b79ce809cbbe2ce52"}},{"ruleId":"D1","level":"warning","message":{"text":"WebProvider._scanDirectory (cyclomatic 28): WebProvider._scanDirectory 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/web_provider.dart"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be516fbb00392114b08214147477fea0341d5b09ce58d0c8e95abbde74e0e52"}},{"ruleId":"D1","level":"warning","message":{"text":"ControlButton.build (cyclomatic 28): ControlButton.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/control_button.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eecf5b08ad609b5d60accec75a72367091920427f5f4d6edffc83eeeb57583e"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._handlePostDownload (cyclomatic 27): DownloadService._handlePostDownload 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1015}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e56cc74e1e2174b33244db00bc4932c1217105a704112210a07859ab5b9c2eb"}},{"ruleId":"D1","level":"warning","message":{"text":"_AgeRatingBadge._parseRating (cyclomatic 25): _AgeRatingBadge._parseRating 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18908a1f6da0849db2a8b49634532192985ba7af5247e9a198844dd191a9ea3"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderConfig.validate (cyclomatic 25): ProviderConfig.validate 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"3902376abfa9b349350baf98d7747a6acd1ae010e77c283285a31c3e9fe08f1e"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeGridView._buildLibraryItem (cyclomatic 24): HomeGridView._buildLibraryItem 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2b90209643fe86c816e10bb58f041692f7deaa7f09e8542546e5c99c1220db0"}},{"ruleId":"D1","level":"warning","message":{"text":"RommRom._extractCompanies (cyclomatic 24): RommRom._extractCompanies 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_api_service.dart"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3e2386ee32c2e3ba5a8ad9632b5803bbf79ee27f5ad4f143332b4640d5a344"}},{"ruleId":"D1","level":"warning","message":{"text":"GameDetailController.updateAvailableSections (cyclomatic 23): GameDetailController.updateAvailableSections 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9007d811204f6a29654dd13657dee64adfd684014bb4b30905495276cce130"}},{"ruleId":"D1","level":"warning","message":{"text":"GameListHeader.build (cyclomatic 23): GameListHeader.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_list_header.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f352595ca6e89fa973bf54270a234d0ae840da3f9a946cf86ce146b62637b03"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._downloadNativeSmbFolder (cyclomatic 23): DownloadService._downloadNativeSmbFolder 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb48e133ff2e11626aa01d934f8f207b10919f34fdce4f515a83e21b533da82"}},{"ruleId":"D1","level":"warning","message":{"text":"RemoteFolderScanner._scanWeb (cyclomatic 23): RemoteFolderScanner._scanWeb 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/remote_folder_scanner.dart"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d6b848ee079a26bf8d43c2c75a0a7c3b9f583990600a1b52bce0a6927b5fc6"}},{"ruleId":"D1","level":"warning","message":{"text":"_SmartCoverImageState._buildNetworkFallback (cyclomatic 23): _SmartCoverImageState._buildNetworkFallback 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/smart_cover_image.dart"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d391f704595374c45b060652e3a185df613c5db6d9e3f8a565f5c1d9cf0241"}},{"ruleId":"D1","level":"warning","message":{"text":"_OtherVersionsSectionState._buildItem (cyclomatic 22): _OtherVersionsSectionState._buildItem 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/other_versions_section.dart"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"51d8623c57f93d3f3f1908ef0969968fd3b97b27762362ca0514af0bbc0cf3bf"}},{"ruleId":"D1","level":"warning","message":{"text":"_HomeViewState.build (cyclomatic 22): _HomeViewState.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"a789af6301125162703010c819cf0a28c4c563a0980eb4f2b63f476be21edd83"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeGridView._buildGridItem (cyclomatic 22): HomeGridView._buildGridItem 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"0460c33aa680de062873852924086e658e59297378619007454b5aea553fa23c"}},{"ruleId":"D1","level":"warning","message":{"text":"_GameListOverlayState.build (cyclomatic 22): _GameListOverlayState.build 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d048eb413b39ef9cc5a3e97544627a1291610081c29d66d27cb01f3396adf5f"}},{"ruleId":"D1","level":"warning","message":{"text":"RaSyncService._hashVerifyInstalled (cyclomatic 22): RaSyncService._hashVerifyInstalled 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_sync_service.dart"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9b36b89f3edd80d64b3a14da91334900d7e87c74845c68aadfa7c47559a1f68"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadActionButton.build (cyclomatic 21): DownloadActionButton.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/download_action_button.dart"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"5270bb4a345c6e56fac86420d8affd5c8ae8511c521da3069b12b960884a1cb9"}},{"ruleId":"D1","level":"warning","message":{"text":"HttpEndpointFailover.fetch (cyclomatic 21): HttpEndpointFailover.fetch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/http_endpoint_failover.dart"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"736364ef0d6e164534d588b15c81a62437acc745d74ff2d11ab50dc9fa4e82df"}},{"ruleId":"D1","level":"warning","message":{"text":"RaHashService._computeNdsHash (cyclomatic 21): RaHashService._computeNdsHash 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_hash_service.dart"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c45e58db31721f397869ec7d5353659d0fb894c35c5d8edcc9d39c19126c2488"}},{"ruleId":"D1","level":"warning","message":{"text":"RaSyncService.syncAll (cyclomatic 21): RaSyncService.syncAll 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_sync_service.dart"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b604c406c768256eb31bb7eb2633dd436c4e61d63076179445689a97a3a1fc4"}},{"ruleId":"D1","level":"warning","message":{"text":"MainActivity.configureFlutterEngine (cyclomatic 21): MainActivity.configureFlutterEngine has cyclomatic complexity 21 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"11bfa1ae8b58e03012a2843feb8605a6af13e9f0f0a3cf2ce595d01de1e908c8"}},{"ruleId":"D1","level":"warning","message":{"text":"GameDetailController.navigateInSection (cyclomatic 20): GameDetailController.navigateInSection has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"1618f627be94ab6bb0750fdecb03d0808832f0bec0b2c4d72d8b1fd5fc274344"}},{"ruleId":"D1","level":"warning","message":{"text":"_GameDetailScreenState._buildControls (cyclomatic 20): _GameDetailScreenState._buildControls has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bfb7f16ab756d9bc7994846edcfad484cb1e6be5776a7c7656a7fd62c0d100e"}},{"ruleId":"D1","level":"warning","message":{"text":"_ShelfEditScreenState.build (cyclomatic 20): _ShelfEditScreenState.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/shelf_edit_screen.dart"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"217eecce9d1616bb730907bfba06fc54007fddd8e32a09be78cd6fb31039a42f"}},{"ruleId":"D1","level":"warning","message":{"text":"ConsoleHud.build (cyclomatic 20): ConsoleHud.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/console_hud.dart"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff4098fe9c68e0f69a04f0fac779bb78eb9e1ba2b5974d4fc924b50f4241ec8"}},{"ruleId":"D1","level":"warning","message":{"text":"_FilterOverlayState._buildOption (cyclomatic 19): _FilterOverlayState._buildOption 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/filter_overlay.dart"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7309ad6461843a45e746b1025c3af7689b0ffe89ff6c524a8a37bd97a94ff04"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigParser._validateProvider (cyclomatic 19): ConfigParser._validateProvider 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/config_parser.dart"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd01f9eef40ec19ec44d90b2c2e7cc267ca0db43354decfd062fb316c26a9bd1"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._extractZipWithMultiFileSupport (cyclomatic 19): DownloadService._extractZipWithMultiFileSupport 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1162}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a238cbac8bf4c04a5cdcad5a9cfc2e9803073a4a0d34bec29d373eb27abcaf"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalFolderMatcher.matchFolder (cyclomatic 19): LocalFolderMatcher.matchFolder 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/local_folder_matcher.dart"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dfb1ddcc857d187e74d70a7e37b16a156702c60f4114af68bb17b2ab794ff08"}},{"ruleId":"D1","level":"warning","message":{"text":"_QuickMenuOverlayState._buildItem (cyclomatic 19): _QuickMenuOverlayState._buildItem 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/quick_menu.dart"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ced28636f3a16d918bd7fe6a6f413a08324e283d1faa83759badf8871384ce"}},{"ruleId":"D1","level":"warning","message":{"text":"_GameDetailScreenState._handleConfirm (cyclomatic 18): _GameDetailScreenState._handleConfirm 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d70ccee453a04cdc70b74eb30b32f2bc1ac369d5b1b5ce68abae390818eb862"}},{"ruleId":"D1","level":"warning","message":{"text":"_LibraryScreenState._buildQuickMenuItems (cyclomatic 18): _LibraryScreenState._buildQuickMenuItems 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6c0237104b8910ee1c445047bf886e250b089929c3a99cb168a29adb5caec0"}},{"ruleId":"D1","level":"warning","message":{"text":"_SourceCard.build (cyclomatic 18): _SourceCard.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54f52d290f1c60080059c26f9ffcfa8de8f7439a3e016118bf0a3a163ee16a9"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._startDownload (cyclomatic 18): DownloadService._startDownload 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"abccd73d60cb31b10cb3cdc989e775cbabd9213348b64be1c87a6163d171b515"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._downloadNativeSmb (cyclomatic 18): DownloadService._downloadNativeSmb 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f0812effbd4a5ff9d83a9255243fd923f65b1ffb9dd67dbbf4a447ddbf4a138"}},{"ruleId":"D1","level":"warning","message":{"text":"LibrarySyncService.syncSmart (cyclomatic 18): LibrarySyncService.syncSmart 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/library_sync_service.dart"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c84d378f172af3d5784630018f35e7a993d5e7681d473e71197e6de7985f9f"}},{"ruleId":"D1","level":"warning","message":{"text":"GameMetadata._categorizeTag (cyclomatic 18): GameMetadata._categorizeTag 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"05fefa4ef670c2c432456851789f288ab8eda7f45032104bf124636a989d3a3d"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadItemCard.build (cyclomatic 18): DownloadItemCard.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download/download_item_card.dart"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"6407fe77f3047a359844a7ab7d1b2187a2e78d4ebd46415f1b3a8e535be8cf8f"}},{"ruleId":"D1","level":"warning","message":{"text":"_DownloadBadgeState.build (cyclomatic 18): _DownloadBadgeState.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download_overlay.dart"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9634dcec6dbe7d9ed14488e46717d8deda0f71785de8ea6bdaf74a513e0d4e1"}},{"ruleId":"D1","level":"warning","message":{"text":"_DownloadModalState._handleKeyEvent (cyclomatic 18): _DownloadModalState._handleKeyEvent 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download_overlay.dart"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"a413d32d2bbfc701edda1e3b28964011b523eac2e6bbf5146c60ee0b2dcace5d"}},{"ruleId":"D1","level":"warning","message":{"text":"_GameDetailScreenState._buildQuickMenuItems (cyclomatic 17): _GameDetailScreenState._buildQuickMenuItems 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a6fb3767ad6f0e6160f30773d37b3edc867afada06b3818f8570484bae164db"}},{"ruleId":"D1","level":"warning","message":{"text":"_GameDetailScreenState._buildPrimaryActionSection (cyclomatic 17): _GameDetailScreenState._buildPrimaryActionSection 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":1274}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e15b2bb9b9a69df5a21c1dbf734386196d1c23ddc4926308b27dd6a6e259c4c"}},{"ruleId":"D1","level":"warning","message":{"text":"_GameListScreenState.build (cyclomatic 17): _GameListScreenState.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5a36d64632b114ab15dc798aafd8e5c1d35906ef35c68d104490233fcc607e"}},{"ruleId":"D1","level":"warning","message":{"text":"OnboardingController._buildProviderFromForm (cyclomatic 17): OnboardingController._buildProviderFromForm 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddede0b00192f1231fff1db831f68f37958adf5db86bf5c8f03a630e4b3410b"}},{"ruleId":"D1","level":"warning","message":{"text":"_ProviderFormState.build (cyclomatic 17): _ProviderFormState.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c2a27760398d2c9472bfe879f57c66c1b6ee21f0723bd8321167c93edad889b"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadService._downloadFtpFolder (cyclomatic 17): DownloadService._downloadFtpFolder 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a0baa2b37602cb6a05571f2a9e081c79c476337fa1c3010924ccf4db81096a"}},{"ruleId":"D1","level":"warning","message":{"text":"ImageHelper.getCoverUrls (cyclomatic 17): ImageHelper.getCoverUrls 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/image_helper.dart"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"f72d21b13a9bda4d43c8c1dbc576b4809d85171d651be5bcd338de6bb3852fe4"}},{"ruleId":"D1","level":"warning","message":{"text":"_RShopAppState.initState (cyclomatic 16): _RShopAppState.initState 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/main.dart"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f037eb4aef5f458724471675f02ee459913e881d05b77c5d515114825798ec"}},{"ruleId":"D1","level":"warning","message":{"text":"GameDetailOverlay._buildContent (cyclomatic 16): GameDetailOverlay._buildContent 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b43d0e3a5313362ae570f4b018ef5fe0e17ed6c996d38911cd0f9cd353187eb"}},{"ruleId":"D1","level":"warning","message":{"text":"_SystemSelectorOverlayState._handleKeyEvent (cyclomatic 16): _SystemSelectorOverlayState._handleKeyEvent 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/system_selector_overlay.dart"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"4931f40946efc5656d76f9cda2fd35573be42ee4acb653acb4d751ca48e26495"}},{"ruleId":"D1","level":"warning","message":{"text":"_RaOnboardingScreenState._handleScreenKey (cyclomatic 16): _RaOnboardingScreenState._handleScreenKey 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"cab45166bf610b77b4f7461c8d61753ac437f27fe705d2dce3f30283e5afbcc5"}},{"ruleId":"D1","level":"warning","message":{"text":"_RommLegacyLoginScreenState._handleScreenKey (cyclomatic 16): _RommLegacyLoginScreenState._handleScreenKey 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"33eab780c2a170c098ca8364e1bfb43e0f0b7b735ec85b8dc9954bac787c9f92"}},{"ruleId":"D1","level":"warning","message":{"text":"_ManualSourceAddScreenState._handleScreenKey (cyclomatic 16): _ManualSourceAddScreenState._handleScreenKey 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/manual_source_add_screen.dart"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"5430e38f587328a3c51b62a8f3372eb7dfb2e02c929689af08da0975d21892c8"}},{"ruleId":"D1","level":"warning","message":{"text":"_SourceMappingsScreenState._handleScreenKey (cyclomatic 16): _SourceMappingsScreenState._handleScreenKey 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/source_mappings_screen.dart"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffcc1b0803144d33b00e53df94453c19e70a3289ba78024fad119eb238660f9e"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderConfig.insecureWarning (cyclomatic 16): ProviderConfig.insecureWarning has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ab7a04444f9223303eb4de9b77da0d0babbcf3e0d720b523c1336e35fa62e2"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseGameCard.build (cognitive 67): BaseGameCard.build has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 23 (39 pts), if/else 15 (23 pts), boolean chains 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e0d4e6d6fcabcb50fb56cfd9491761036a4b8cb45badcf6eb190ad814fe6d5"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._downloadHttp (cognitive 66): DownloadService._downloadHttp has cognitive complexity 66 (threshold 15). Drivers by points: if/else 30 (44 pts), error handling 5 (9 pts), ternaries 6 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c79ef2a4b6a16b3e036e787bbb37f3f1ccee6343153813b676240d86cca6bff"}},{"ruleId":"D2","level":"warning","message":{"text":"RaNameMatcher.findBestMatch (cognitive 66): RaNameMatcher.findBestMatch has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (47 pts), loops 5 (10 pts), ternaries 2 (6 pts), boolean chains 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/ra_name_matcher.dart"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"d842b5c352c8e36895b2851b0f3d39587220876f94da4ad2d46851e84036df39"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._extractZipWithMultiFileSupport (cognitive 65): DownloadService._extractZipWithMultiFileSupport has cognitive complexity 65 (threshold 15). Drivers by points: if/else 10 (34 pts), error handling 6 (23 pts), loops 3 (8 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1162}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a125956c0364c8d1ed0061f36051122780dca08aa181bdd692a8a80a75fc668"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._downloadNativeSmbFolder (cognitive 58): DownloadService._downloadNativeSmbFolder has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (35 pts), ternaries 3 (14 pts), loops 2 (4 pts), match/switch 1 (3 pts), error handling 1 (2 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5f216a8e7d50aea275489359a2f251b86d6ec63d0cd6cd1c6f30abea5c32a1"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._downloadFtpFolder (cognitive 56): DownloadService._downloadFtpFolder has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (36 pts), ternaries 2 (10 pts), loops 2 (6 pts), error handling 2 (4 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e8ffe9d2a69ce0a4466430c83978eef463c673278efc942b02c8ec986cdc5a"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._handlePostDownload (cognitive 52): DownloadService._handlePostDownload has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (38 pts), error handling 5 (11 pts), boolean chains 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1015}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d2d4b079d083c1302544e05bc650804f2c1eba07bffc51fc60dcfd5d7d05a23"}},{"ruleId":"D2","level":"warning","message":{"text":"WebProvider._scanDirectory (cognitive 43): WebProvider._scanDirectory has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 10, error handling 2 (3 pts), loops 2, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/web_provider.dart"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"561b15edae8340497c5648cc8f9d33684e57fa858790ac26c6f3d78080bd9243"}},{"ruleId":"D2","level":"warning","message":{"text":"RaSyncService._hashVerifyInstalled (cognitive 42): RaSyncService._hashVerifyInstalled has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 4, loops 3 (4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_sync_service.dart"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7dbb845ac1f23f81eff2b46715a6f790a124f974fd8f797d6c3713f83bee94"}},{"ruleId":"D2","level":"warning","message":{"text":"_PrimaryActionButton.build (cognitive 41): _PrimaryActionButton.build has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 19 (30 pts), boolean chains 6, if/else 4, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"41b9c89d3cf88a287058baa887327f7fc4d548646685459089fe5db00d98c4ba"}},{"ruleId":"D2","level":"warning","message":{"text":"RommRom._extractCompanies (cognitive 41): RommRom._extractCompanies has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 8, loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_api_service.dart"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f6d887a47fa36382d2673c4903086c00c4872401e93a34e7585ac05fc46954"}},{"ruleId":"D2","level":"warning","message":{"text":"_GameListOverlayState.build (cognitive 40): _GameListOverlayState.build has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 18 (34 pts), if/else 4 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"f18a69e6295a38af12388b4afa1de99a893ce13b48d21c1005d1943c171862a9"}},{"ruleId":"D2","level":"warning","message":{"text":"_SmartCoverImageState._buildNetworkFallback (cognitive 39): _SmartCoverImageState._buildNetworkFallback has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/smart_cover_image.dart"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"100c2dea2d2cbc59307d8c5826d9bb5a7c68c6db76bbe22ee6b569dfaabb9f80"}},{"ruleId":"D2","level":"warning","message":{"text":"LibrarySyncService.syncSmart (cognitive 38): LibrarySyncService.syncSmart has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (29 pts), error handling 2 (6 pts), boolean chains 2, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/library_sync_service.dart"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c4155402d286a5cf88eb97649aba5bb3e7eb24a535c40a88abd4599976cf02a"}},{"ruleId":"D2","level":"warning","message":{"text":"RaSyncService.syncAll (cognitive 38): RaSyncService.syncAll has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 5, loops 2 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_sync_service.dart"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2bf4e1197a3adccd97b6a71ce37a402323a0e5212f46fc5a2a2c5eaaa36f4bc"}},{"ruleId":"D2","level":"warning","message":{"text":"_LibraryScreenState._buildContent (cognitive 37): _LibraryScreenState._buildContent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 9 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":1218}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3cad491fea1d6ba64628e47071c83981a45959969cc57172851c2d1498dce44"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsoleSetupStep.build (cognitive 35): ConsoleSetupStep.build has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 12, ternaries 3 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_setup_step.dart"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc8e88fb71a51dd3f63f43a32d15f27ac2ee00940aa6d701fc607cb146006430"}},{"ruleId":"D2","level":"warning","message":{"text":"_AgeRatingBadge._parseRating (cognitive 34): _AgeRatingBadge._parseRating has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23 (33 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"9911b7f3e43ea656c3e789b3ff03bf552217004db18f9c8c94007e0046925436"}},{"ruleId":"D2","level":"warning","message":{"text":"_ConsoleTileState.build (cognitive 33): _ConsoleTileState.build has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 14 (18 pts), if/else 7 (8 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_grid.dart"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"549ba729103553c104bca6c831d74ce7edfd408a328ae341c51a75b1cdcd19af"}},{"ruleId":"D2","level":"warning","message":{"text":"LibrarySyncService.syncAll (cognitive 33): LibrarySyncService.syncAll has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (25 pts), error handling 2 (6 pts), boolean chains 1, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/library_sync_service.dart"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"9670000276b96e0dc9bda0498c25468e4554be6c051ef8587579b285249f950f"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteFolderScanner._scanWeb (cognitive 33): RemoteFolderScanner._scanWeb has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 8, ternaries 3 (6 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/remote_folder_scanner.dart"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"165e1c824098e17896ddfb28604f4ec0c440e13749124f1c6a8f353f79de25c4"}},{"ruleId":"D2","level":"warning","message":{"text":"HttpEndpointFailover.fetch (cognitive 32): HttpEndpointFailover.fetch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 11, error handling 1 (2 pts), ternaries 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/http_endpoint_failover.dart"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d0362b1df6f9f7b1c0e7aa2ef7fce54d10cb3c59a965454f4b9abad36a87e5"}},{"ruleId":"D2","level":"warning","message":{"text":"ControlButton.build (cognitive 32): ControlButton.build has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 21 (23 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/control_button.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"58cea22367be86541ec430a66a9b6dc04ee0adb7d01dace12202b45fbf878aa1"}},{"ruleId":"D2","level":"warning","message":{"text":"_AchievementTile.build (cognitive 31): _AchievementTile.build has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 23 (27 pts), if/else 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a2f05ad891e95bdac889b5afbc5086a4b0e68c994a192cafd17cd48b419e48"}},{"ruleId":"D2","level":"warning","message":{"text":"GameDetailOverlay._buildContent (cognitive 31): GameDetailOverlay._buildContent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"35314f8742d103f2e67d28264e3591f1bce5e5c4d9d8c5f75658c2ef794a7505"}},{"ruleId":"D2","level":"warning","message":{"text":"_OtherVersionsSectionState._buildItem (cognitive 31): _OtherVersionsSectionState._buildItem has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 17 (29 pts), if/else 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/other_versions_section.dart"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"211b1ff41323cb9e59c7c4851a7ddf63eceeec02cadbe8c91b0aaf66adcd8e00"}},{"ruleId":"D2","level":"warning","message":{"text":"_SourceCard.build (cognitive 31): _SourceCard.build has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 7 (10 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f1a355d2312fbcdd3711d1aaccf1a51fa165ac03268874d71bf02cbc428aed"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkDiscoveryService.discover (cognitive 31): NetworkDiscoveryService.discover has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (17 pts), if/else 2 (8 pts), error handling 3 (6 pts) (nesting depth added 21). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/network_discovery_service.dart"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"72373b33673e843aa5e5066e60f5a555d20941b24280ac925e7ce79677164cfd"}},{"ruleId":"D2","level":"warning","message":{"text":"RaHashService._computeNdsHash (cognitive 31): RaHashService._computeNdsHash has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 9, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_hash_service.dart"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e7619b0fe1e7b2949e83c5148638d065f16f236be9d57f44d9ee8e8554b8ed7"}},{"ruleId":"D2","level":"warning","message":{"text":"MainActivity.configureFlutterEngine (cognitive 31): MainActivity.configureFlutterEngine has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 6 (12 pts), match/switch 3, boolean chains 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"3794f28262781150f5ef3268f7aba3ee5804b55cb040310ca26ab7b744fb120c"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderConfig.validate (cognitive 30): ProviderConfig.validate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 11, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac7fc5fad9fcf40e10f76dbcca9826bb3e182a214ec2d0255d46afd4768482a"}},{"ruleId":"D2","level":"warning","message":{"text":"RaHashService._prepareBytes (cognitive 29): RaHashService._prepareBytes has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 20, if/else 4 (8 pts), match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_hash_service.dart"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"0760605c93e6c7ac14ebc79339f031cdd56c7e1c5c77b0c03e2dd81bab564337"}},{"ruleId":"D2","level":"warning","message":{"text":"GameDetailController.navigateInSection (cognitive 28): GameDetailController.navigateInSection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 10, loops 1 (3 pts), match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"1337a5a258e24b600eac5a35a156cb1841ef669c708f0738a42921f5aa8b43bb"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeGridView._buildLibraryItem (cognitive 28): HomeGridView._buildLibraryItem has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 15 (16 pts), if/else 7 (10 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"309de1d3da4390b0c5f5434e661dc8aea99bd875033a6b451d6bef3e5ae4f605"}},{"ruleId":"D2","level":"warning","message":{"text":"_ShelfEditScreenState.build (cognitive 28): _ShelfEditScreenState.build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/shelf_edit_screen.dart"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"529ca0339a223a6c20d0ee782eac1fcebdb216f2ba6ae457d5a824f3a54a4e66"}},{"ruleId":"D2","level":"warning","message":{"text":"RomManager.resolveInstalledPath (cognitive 28): RomManager.resolveInstalledPath has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 1 (4 pts), error handling 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 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\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (RomManager.exists) has the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cb5884327fbaa56a131d3340eb0973b99fa0eb6fbeca3bcdfc46e63e5424fa8"}},{"ruleId":"D2","level":"warning","message":{"text":"RomManager.exists (cognitive 28): RomManager.exists has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 1 (4 pts), error handling 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 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\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (RomManager.resolveInstalledPath) has the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf3212dd614f17a9377838e24150db1883198c65959d2797088c025d46e96c7"}},{"ruleId":"D2","level":"warning","message":{"text":"_HomeViewState.build (cognitive 27): _HomeViewState.build has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 4, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"4746cfef2fa3493813de4738f14c36c1c99e31b62b3cec941b06c9cf26307efa"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanConsoleTile.build (cognitive 27): ScanConsoleTile.build has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 19, if/else 6, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/widgets/scan_console_tile.dart"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e27eb10b347c6d8d6ab57c5c972ab84cc46cfde19f37eb22efa80ba0bd41ace"}},{"ruleId":"D2","level":"warning","message":{"text":"CoverPreloadService.processWithoutCoverUrl (cognitive 27): CoverPreloadService.processWithoutCoverUrl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), error handling 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/cover_preload_service.dart"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5eecc140373db0f2eb4392b0656baeadbd929b82dc0bbb3040420e22f1d7010"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._downloadNativeSmb (cognitive 27): DownloadService._downloadNativeSmb has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"84eb9992a4f822d49b4c9abd28e08d3896fa4e00aade294d9aeb901b4ea19eea"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeGridView._buildGridItem (cognitive 26): HomeGridView._buildGridItem has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 12 (13 pts), if/else 7 (10 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a56fbc009a282b8f2a40a21e302d75c7e1c2adc5c5c803d812b4b286b482816"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFolderMatcher.matchFolder (cognitive 26): LocalFolderMatcher.matchFolder has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (7 pts), boolean chains 6 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/local_folder_matcher.dart"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"9786a661524058059e46ac1136016ab12f58559ef2249e9f858631a5b42d157c"}},{"ruleId":"D2","level":"warning","message":{"text":"_GameListScreenState.build (cognitive 25): _GameListScreenState.build has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 5 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6dd8f923b43146c308d92e381aff807e9c31563c0c9dedfb1595c3fe3eb9c4"}},{"ruleId":"D2","level":"warning","message":{"text":"GameListHeader.build (cognitive 25): GameListHeader.build has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 17 (20 pts), if/else 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_list_header.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"792ff92271a89c5fefc688199e2a0ef69b8b4a6bdb7410a29974f50df6b6b483"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsListView.build (cognitive 25): SettingsListView.build has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 2 (6 pts), loops 2 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/widgets/settings_list_view.dart"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb7326dd937fe8c3f1f09f6386f53d5811cdd5a1e01eb9661453b672fff62dc"}},{"ruleId":"D2","level":"warning","message":{"text":"LibrarySyncService.discoverAll (cognitive 25): LibrarySyncService.discoverAll has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 2 (6 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/library_sync_service.dart"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"034819a9974de53faf4ba25f3791f6e44cce16b21f56e332df25c04c94179588"}},{"ruleId":"D2","level":"warning","message":{"text":"MainActivity.extractZip (cognitive 25): MainActivity.extractZip has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 pts), boolean chains 1, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"043357ef4a04c609147ff2e7c3c4b670c59830a408404b3150bbd7a44e532059"}},{"ruleId":"D2","level":"warning","message":{"text":"GameDetailController.clampHorizontalIndices (cognitive 24): GameDetailController.clampHorizontalIndices has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (5 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"3735b521c1ce27b19ab5900a7df3ffe2d5c4d23697446491db0074fdff01a329"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageHelper.getCoverUrls (cognitive 24): ImageHelper.getCoverUrls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/image_helper.dart"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"2670d186d3b70a7a393a296a8cb43628806ecaa351580ccb949348613b18b096"}},{"ruleId":"D2","level":"warning","message":{"text":"GameDetailController.updateAvailableSections (cognitive 23): GameDetailController.updateAvailableSections has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 10 (11 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"855e4c516f5c6e1129d4c849c4a3c0fc5d44f34e7b1317904e25cc8462545a85"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseService.saveGames (cognitive 23): DatabaseService.saveGames has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (7 pts), loops 2 (5 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"42da2dcd50c95bd6b27d6514cfb28d238307965ca458d5c7fff003b71513fd5c"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._startDownload (cognitive 23): DownloadService._startDownload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, match/switch 1 (2 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac9cb0d8c8d5ace2f924c944b69f803cd49a8c07dd401d22c94e959490b55ea4"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._downloadFtp (cognitive 23): DownloadService._downloadFtp has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 3 (6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"f05f715d84412d645f7d2edae33ceb171c288a921994d601fa735042250e5858"}},{"ruleId":"D2","level":"warning","message":{"text":"FtpProvider._scanDirectory (cognitive 23): FtpProvider._scanDirectory has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"03fa6daab1fcfde94ca88ecca91bf3ef8dfd9c883a5ccfc6a908b421b6e21fd5"}},{"ruleId":"D2","level":"warning","message":{"text":"SourcesNotifier._writeAndPublish (cognitive 23): SourcesNotifier._writeAndPublish has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2, loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/sources_notifier.dart"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a52a784a4d5636b6a4aa532faa9302f930a6d276a294f3cf1271905d4a1e1e"}},{"ruleId":"D2","level":"warning","message":{"text":"_DownloadModalState._handleKeyEvent (cognitive 23): _DownloadModalState._handleKeyEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download_overlay.dart"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8993dbba5f44283a9ee4e2cb81cfbfb9a624948de405b3c5777189ca9008ab"}},{"ruleId":"D2","level":"warning","message":{"text":"_GameDetailScreenState._buildQuickMenuItems (cognitive 22): _GameDetailScreenState._buildQuickMenuItems has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 3, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"f76781bf09a38c3daf26d16c78dc3e557bd4cd198faf650d403324fd52bf96d2"}},{"ruleId":"D2","level":"warning","message":{"text":"_GameDetailScreenState._buildPrimaryActionSection (cognitive 22): _GameDetailScreenState._buildPrimaryActionSection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (3 pts), ternaries 2 (3 pts), boolean chains 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":1274}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab003a920f4dafb5c376b8b437a27d8fb435684939666476f43480f05ad20a8a"}},{"ruleId":"D2","level":"warning","message":{"text":"_ProviderFormState.build (cognitive 22): _ProviderFormState.build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"3769363849583f5d2067b51c3535aab1f98fbd33e72d91450f36e02946ce19a4"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigParser._validateProvider (cognitive 22): ConfigParser._validateProvider has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/config_parser.dart"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"515d537df06c472952aa8f65bae770f4ab6242042702c4d0be368ee99b0a12fa"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadQueueManager.restoreQueue (cognitive 22): DownloadQueueManager.restoreQueue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), ternaries 2 (6 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_queue_manager.dart"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"6889c9fad1c39f7da26dbad981e8146ac7bc20fb57a4c95c1821244d41500614"}},{"ruleId":"D2","level":"warning","message":{"text":"LibrarySyncService._syncOneSystem (cognitive 22): LibrarySyncService._syncOneSystem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/library_sync_service.dart"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c0b7a2326cd99aa4a4b2826941225b719f33c4eed52e6dd1a5e53edeea9146"}},{"ruleId":"D2","level":"warning","message":{"text":"RommProvider.fetchGames (cognitive 22): RommProvider.fetchGames has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 2 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/romm_provider.dart"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef68dd02aece1b3707b72e8df31dd8ed8715ba8e0322da91f9df92f82582d224"}},{"ruleId":"D2","level":"warning","message":{"text":"GameMetadata.extractLanguages (cognitive 22): GameMetadata.extractLanguages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e079e8c1f1fdbcd1ebafa41ddadd82b40838a5ec563ae6e96f2e9e366cc2b03"}},{"ruleId":"D2","level":"warning","message":{"text":"GameListController._isAnyVariantInSet (cognitive 21): GameListController._isAnyVariantInSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/logic/game_list_controller.dart"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1b2bfcea43d8fa6feb81fb2c23c5c3d7cf5f671656624c3b165fa96350ff81"}},{"ruleId":"D2","level":"warning","message":{"text":"_FilterOverlayState._buildOption (cognitive 21): _FilterOverlayState._buildOption has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/filter_overlay.dart"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2927e5fe05461bf730499566c4d4b83c0cbf6aa87cfa9cddb08c3dc227e96c4"}},{"ruleId":"D2","level":"warning","message":{"text":"_RaOnboardingScreenState._handleScreenKey (cognitive 21): _RaOnboardingScreenState._handleScreenKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b44100a66f1e47d3a22bff5580cd7c5adba9722f924baaa64fb6d28cc4a0598"}},{"ruleId":"D2","level":"warning","message":{"text":"_RommLegacyLoginScreenState._handleScreenKey (cognitive 21): _RommLegacyLoginScreenState._handleScreenKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"530b4f4a8d438bb28c82de256d57f1981cebbb3407564a13909f2f8bc6c6ab2d"}},{"ruleId":"D2","level":"warning","message":{"text":"_ManualSourceAddScreenState._handleScreenKey (cognitive 21): _ManualSourceAddScreenState._handleScreenKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/manual_source_add_screen.dart"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"f988234e922d71102934d92bffedb6c6945778f8fdeae301508b66549a89732c"}},{"ruleId":"D2","level":"warning","message":{"text":"_SourceMappingsScreenState._handleScreenKey (cognitive 21): _SourceMappingsScreenState._handleScreenKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/source_mappings_screen.dart"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eba582649be5012757468a9f93956424ba5c362e9b67b3b60b790efb1a187b4"}},{"ruleId":"D2","level":"warning","message":{"text":"OnboardingController._buildProviderFromForm (cognitive 20): OnboardingController._buildProviderFromForm has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 8, if/else 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4206668b05eb52c84781a9ff24a5cd9c8558938387bde6521e1d0be78560bfa"}},{"ruleId":"D2","level":"warning","message":{"text":"OnboardingController._testRommConnection (cognitive 20): OnboardingController._testRommConnection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af146925196a7fcf0b11a5f6692e0257caea1b676f5c43aaf94a824fa318bd3"}},{"ruleId":"D2","level":"warning","message":{"text":"_WelcomeChooserStepState._handleManualServer (cognitive 20): _WelcomeChooserStepState._handleManualServer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/welcome_chooser_step.dart"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c3595dd25c1940147b7bfc85adb1af78ad447b9af604bd94e1dcce7f482552"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsoleHud.build (cognitive 20): ConsoleHud.build has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/console_hud.dart"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"0060beab3b44f18fbb2edcf00d3558e741b1290ccbf4f2e12d86dd23d2e70df8"}},{"ruleId":"D2","level":"warning","message":{"text":"_QuickMenuOverlayState._buildItem (cognitive 20): _QuickMenuOverlayState._buildItem has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/quick_menu.dart"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"299e5dd30efa4c47e74c576d3603f6ca8b2b2d48f80ab7990d889aa9c86530e8"}},{"ruleId":"D2","level":"warning","message":{"text":"_RShopAppState.initState (cognitive 19): _RShopAppState.initState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/main.dart"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb88e0bf5b3fd0e38a0a1fb84f1865d87c6cb9fe542d77551d2324cb4565ebf"}},{"ruleId":"D2","level":"warning","message":{"text":"_LibraryScreenState._refreshInstalledFiles (cognitive 19): _LibraryScreenState._refreshInstalledFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), error handling 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"34ad7907158499a0e36c93517f1c42405ae43e9167df91cd35c0e0d64176ff95"}},{"ruleId":"D2","level":"warning","message":{"text":"_LibraryScreenState._isGameInstalled (cognitive 19): _LibraryScreenState._isGameInstalled has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":1000}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0c5d18d060d9d9bafab0ef42b4646ce2706c02fb0eaad7c6173d9e76ee4edab"}},{"ruleId":"D2","level":"warning","message":{"text":"_SystemSelectorOverlayState._handleKeyEvent (cognitive 19): _SystemSelectorOverlayState._handleKeyEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/system_selector_overlay.dart"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a6810644903000932e0e9ae1e671be34764374702f0933d703734d8aa269489"}},{"ruleId":"D2","level":"warning","message":{"text":"OnboardingState.missingFieldsMessage (cognitive 19): OnboardingState.missingFieldsMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_state.dart"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"0914a827394e4f18ee0e84b4d03bdf3f05f1c55ae221cbdd5df25c308effb67a"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigParser._validate (cognitive 19): ConfigParser._validate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/config_parser.dart"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c76ff901421fb410175ae2731dad6eef942444ffe3723a31efc725d805ec94"}},{"ruleId":"D2","level":"warning","message":{"text":"CoverPreloadService.preloadAll (cognitive 19): CoverPreloadService.preloadAll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/cover_preload_service.dart"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ca3fe3d74a7ed81f5a53869ec88a0bd5359ad41f2a3044ce5138ef611791dad"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadQueueManager._startDownload (cognitive 19): DownloadQueueManager._startDownload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_queue_manager.dart"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"797bcea322ddea76d012f12f2d640c5c459c3f68577567e3f3aa6a3f38a68208"}},{"ruleId":"D2","level":"warning","message":{"text":"SmbService.scanDirectory (cognitive 19): SmbService.scanDirectory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/SmbService.kt"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae3a3b029945883fb8379e0db2d5f95f63ce6934cf3bd78ebaa02f91653d156c"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadActionButton.build (cognitive 18): DownloadActionButton.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 3, if/else 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/download_action_button.dart"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"50962be3029c531e4fd7da7adc149aa36133fb1916fc0591166a3d20a1cc1011"}},{"ruleId":"D2","level":"warning","message":{"text":"_LibraryScreenState._applyFilters (cognitive 18): _LibraryScreenState._applyFilters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), match/switch 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"9affdaa079defdfe2f365ef93d4ddfe218cee97958f9d6d4ffb02f8534af74ac"}},{"ruleId":"D2","level":"warning","message":{"text":"_GameListOverlayState._handleKeyEvent (cognitive 18): _GameListOverlayState._handleKeyEvent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f7ec8fb0a7fb9da29f9debd9b9ff736a16e5317947d537f799671a349c51717"}},{"ruleId":"D2","level":"warning","message":{"text":"_ManualPairingScreenState._handleScreenKey (cognitive 18): _ManualPairingScreenState._handleScreenKey has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/pairing/manual_pairing_screen.dart"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"eee656b7b06d960d80ac97dd9e6d035cc789657da0c0256e8634cb2de47b6e75"}},{"ruleId":"D2","level":"warning","message":{"text":"_ManualSourceAddScreenState._save (cognitive 18): _ManualSourceAddScreenState._save has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 4 (6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/manual_source_add_screen.dart"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"16df9f0052e52cd342cee387bd717924b6d6c53c96f060d6b315497f3cd34223"}},{"ruleId":"D2","level":"warning","message":{"text":"RomManager.resolveSharePath (cognitive 18): RomManager.resolveSharePath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0afc5fb7c3458ac2459fddeaeb0c02271a25b33d23f9af3b03b1a3587283407"}},{"ruleId":"D2","level":"warning","message":{"text":"ThumbnailService.cleanOrphans (cognitive 18): ThumbnailService.cleanOrphans has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e9e832418c92460d9ef7f92a026ab1143146fa05332bec53b9affbcbdf302c"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadItemCard.build (cognitive 18): DownloadItemCard.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 3, if/else 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download/download_item_card.dart"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a90a00704d09f1fbb0d706a73c90f0fa11fc7552f6358c35eb15d7a2d174ab"}},{"ruleId":"D2","level":"warning","message":{"text":"_GlobalDownloadProgressBarState.build (cognitive 18): _GlobalDownloadProgressBarState.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download/global_progress_bar.dart"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d12eb40f7e5438264c09852368a1dc855666a447d249852ee14e2209bba3ae"}},{"ruleId":"D2","level":"warning","message":{"text":"_DownloadBadgeState.build (cognitive 18): _DownloadBadgeState.build has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, if/else 5 (6 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download_overlay.dart"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d1c780af432c2fc9fdbc6590a96e645c3115425f70c9f35155b62f9e1d9bbc"}},{"ruleId":"D2","level":"warning","message":{"text":"GameInfoCard.build (cognitive 17): GameInfoCard.build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_info_card.dart"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7af5cde24afee87808235aaabd44236cb9e39afdadab3e26343130d0d74979a"}},{"ruleId":"D2","level":"warning","message":{"text":"_GameGridState._buildItem (cognitive 17): _GameGridState._buildItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_grid.dart"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1aa1b66891d74d093d1ad84ae16cd5de831685309f1d14524b9071026a35c2"}},{"ruleId":"D2","level":"warning","message":{"text":"_LibraryScreenState._buildQuickMenuItems (cognitive 17): _LibraryScreenState._buildQuickMenuItems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 4 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd94c72346f8d801e34da3c4dff77325375fb7a5250bae06578de2be0cb3cef"}},{"ruleId":"D2","level":"warning","message":{"text":"_ProviderFormState._autoFillRommFromGlobal (cognitive 17): _ProviderFormState._autoFillRommFromGlobal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"355bb165a62abbe7c7aa20baa719675c972e2019a1f3b311fc1c736297d47eb6"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService.cancelDownload (cognitive 17): DownloadService.cancelDownload has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 5 (7 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"e92aa98a009d2f24f53e34e4973821c14e9ce9a45f4ff7ac8ca6140b87b937d6"}},{"ruleId":"D2","level":"warning","message":{"text":"ThumbnailService.generateThumbnail (cognitive 17): ThumbnailService.generateThumbnail has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ce921be9dbd1c933ac85242010c5c21400b1da7ca657783d6d6f4d63b2502d"}},{"ruleId":"D2","level":"warning","message":{"text":"UnifiedGameService._fetchMerged (cognitive 17): UnifiedGameService._fetchMerged has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/unified_game_service.dart"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b108ef2e6310552c2b7b3e5e8ba1bfe9de4a7e072f4fb080eb1d826415079e"}},{"ruleId":"D2","level":"warning","message":{"text":"GameMetadata._categorizeTag (cognitive 17): GameMetadata._categorizeTag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1e4c696e0cefe608b0a1f5a1dd7cad84806c237e816798b868c9b1d0bdf974"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageHelper.getCoverUrlsForSingle (cognitive 17): ImageHelper.getCoverUrlsForSingle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/image_helper.dart"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3acf1a23b6fbcdca1edf64ec40d6fcac2521a5a4f877e1b1e4cc4750c70a48b"}},{"ruleId":"D2","level":"warning","message":{"text":"_AchievementsScreenState._buildProgressSummary (cognitive 16): _AchievementsScreenState._buildProgressSummary has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"c559be080090b786824bf27ddcc306e98d1f6ed3c38c8f3d40fb4d98ba4bba23"}},{"ruleId":"D2","level":"warning","message":{"text":"SingleVersionDisplay.build (cognitive 16): SingleVersionDisplay.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 7, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/version_card.dart"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b28512690070f3b96541dc18e4a0b0de06c1c770a4215ec091e6c2ef6504062"}},{"ruleId":"D2","level":"warning","message":{"text":"_HomeViewState.initState (cognitive 16): _HomeViewState.initState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0690c2194f60602ad9c459a5c293b055c5adaa357c1ca29ac02af44214904ec"}},{"ruleId":"D2","level":"warning","message":{"text":"_LibraryScreenState._loadData (cognitive 16): _LibraryScreenState._loadData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ed7ba32e96d1929fc9a687137db8d3d62712c5fee295af160e67da9ed3b0404"}},{"ruleId":"D2","level":"warning","message":{"text":"_ShelfEditScreenState._buildField (cognitive 16): _ShelfEditScreenState._buildField has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/shelf_edit_screen.dart"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45605b58d5e1bc239943d5d2aac47e88626982dfe5c79362933e2f3b783a9fd"}},{"ruleId":"D2","level":"warning","message":{"text":"_RaOnboardingScreenState._connect (cognitive 16): _RaOnboardingScreenState._connect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 1 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61e2f1675eeeb0116766d80675e63eb8f863d401c267c652e85b169397099a9"}},{"ruleId":"D2","level":"warning","message":{"text":"_SourceEndpointsScreenState._handleKey (cognitive 16): _SourceEndpointsScreenState._handleKey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/source_endpoints_screen.dart"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"60354b0458431a4275bac5e627094d3c0dea0686edbc12c40c85f63b79da7bd8"}},{"ruleId":"D2","level":"warning","message":{"text":"DatabaseService._isFilenameOnDisk (cognitive 16): DatabaseService._isFilenameOnDisk 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"93eb0dabf87f9c819f2bca7a4d61327c561bfcf6397ff2c8790bce20453b1baa"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._downloadHttpWithFailover (cognitive 16): DownloadService._downloadHttpWithFailover has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 2 (5 pts), ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec5cfb3f121f8a6cddc023ac18d872c928c21ab6a863dbd19e33d306e8a4597"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadService._renameExtractedRom (cognitive 16): DownloadService._renameExtractedRom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61a09aac123189c14a49922dd82b54524874a3d45446bf6abb7ff51b8d4ad93"}},{"ruleId":"D2","level":"warning","message":{"text":"RomFolderService._countGamesRecursive (cognitive 16): RomFolderService._countGamesRecursive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_folder_service.dart"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d59987f901d2ce17d12e95dade2f23f342e93a18405f34a0e209a954c7f2c9"}},{"ruleId":"D2","level":"warning","message":{"text":"RommPlatformMatcher.findMatch (cognitive 16): RommPlatformMatcher.findMatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_platform_matcher.dart"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d506e10dc03a2127bf84094ca013b61a4ac9206a4ea9c99697c9a98bea8efe"}},{"ruleId":"D2","level":"warning","message":{"text":"GameMergeHelper.merge (cognitive 16): GameMergeHelper.merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_merge_helper.dart"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"34373b4553578df207333a5b3284dea8aac544f65eff21b6b4dca3da67378848"}},{"ruleId":"D2","level":"warning","message":{"text":"_DownloadRevealOverlay.build (cognitive 16): _DownloadRevealOverlay.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e90e0bc86c936425b2e77262c379b6cd70e26babb9187efb5db7a4fa968298"}},{"ruleId":"D2","level":"warning","message":{"text":"_CardProgressRingState.build (cognitive 16): _CardProgressRingState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download/card_progress_ring.dart"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16ab3507ddea266502d880676d466ce346e1f5a7a460051c9cb55b804d95f6f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _LibraryScreenState: ClassTooLong \u2014 991 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 591 over it, 2.48\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"26aa618f489a2a863b00db2cfa6d1671f9e1166569b50a2ea3612bc481572f44"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _GameDetailScreenState: ClassTooLong \u2014 922 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 522 over it, 2.31\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e575427adc76aeaea43c5e0fd08aab29c6126338e32baab357b4ad4172eced1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: StorageService: TooManyMethods \u2014 66 methods. The bar is 30 methods; this is 36 over it, 2.20\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/storage_service.dart"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca729a18f47c84ef0a70fc9d8a01e4ff5e2a9abc6f76397dceb6a18f2b0ba802"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DownloadService: ClassTooLong \u2014 844 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 444 over it, 2.11\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b5ddec8f8888d03d672f3602d3bbb2c57871b8b3c47fff77ac4d27ed7ba6e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: settings/sources_screen.dart: FileTooLong \u2014 1051 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 551 over it, 2.10\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ce9c0ea59fd6ba1cd4c5466a0ebc900acb7ec946a3ecfee34d3f39bb4cc591"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: library/library_screen.dart: FileTooLong \u2014 1042 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: _LibraryScreenState (60-1465). The bar is 500 significant lines; this is 542 over it, 2.08\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc25fab611d22f6fac7852fbb823495308a0d7348c5f6aa6991eb6b86c30b1f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: game_detail/game_detail_screen.dart: FileTooLong \u2014 1041 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: _GameDetailScreenState (74-1388). The bar is 500 significant lines; this is 541 over it, 2.08\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c8de7ce6117ec2e74502e1028173793f2c1c6a1ce060015b735e834174cc261"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BaseGameCard.build: MethodTooLong \u2014 build runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ed1cd45a3d7ea77358deab6fe852710796a9d3a21bd4fc6c04e98c98b2950c4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: _LibraryScreenState: TooManyMethods \u2014 60 methods. The bar is 30 methods; this is 30 over it, 2.00\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c86f1af07323280daf4587af1fce97bbedcdbcf259b5cfbf2d28d45136056f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SystemModel: ClassTooLong \u2014 768 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 368 over it, 1.92\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/system_model.dart"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"936c9a36156b90d8505d610a36e1d5d8ae981fb5123f0ba97fd7efb191ab20e8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DatabaseService: ClassTooLong \u2014 756 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 356 over it, 1.89\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"831b14e5580901da20af64f60e62ea1795be46d079ccce182d376d6654034ba4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/download_service.dart: FileTooLong \u2014 902 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: DownloadService (74-1277). The bar is 500 significant lines; this is 402 over it, 1.80\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"998c2ca6eb1f14b9256a47a5bae204b336cc3146ad97c2b6ea02ac0b4ad364be"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _GameListOverlayState.build: MethodTooLong \u2014 build runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"54bfa8fb9fb279514f694eafe1fab094f6f963c6a179bc39919cda3f06e6ca19"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _HomeViewState: ClassTooLong \u2014 680 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 280 over it, 1.70\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ac482f025b651fd90cd46661889d0c8dda65f33c767b1ad32051556eb12ef7c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _PrimaryActionButton.build: MethodTooLong \u2014 build runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"0347081be07a0039c9472573d0939912624f528f42079874b4124d803f9276bd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _SourceCard.build: MethodTooLong \u2014 build runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30222e3587e4343d324be48e2df6573f797d245b44e44db403beb91d1b55d84"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: models/system_model.dart: FileTooLong \u2014 769 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: SystemModel (3-896). The bar is 500 significant lines; this is 269 over it, 1.54\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/system_model.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a556da1d5a5d85520d145cdc55b293d847a49b2910036030aa2164a719553ac"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: services/database_service.dart: FileTooLong \u2014 766 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DatabaseService (14-1066). The bar is 500 significant lines; this is 266 over it, 1.53\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"653d077312816c45b863faea269c3c44665e4b7b539acbf7be648bb9d109fb98"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: home/home_view.dart: FileTooLong \u2014 743 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: _HomeViewState (34-1001). The bar is 500 significant lines; this is 243 over it, 1.49\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"09babba5cf8e9c1658fcea4b78826776f4401fa518afc815ee515eb0be3d9492"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DatabaseService: TooManyMethods \u2014 43 methods. The bar is 30 methods; this is 13 over it, 1.43\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"353d8ca16606aa9adbe827ea1a253000dceb8cbc5be9be1531c22eca5f3feca7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ShelfEditScreenState.build: MethodTooLong \u2014 build runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/shelf_edit_screen.dart"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"6876d9b55b84adf568e84507e8e4496c65840ed85a6389ae73486aa240fb7c39"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _GameListScreenState: ClassTooLong \u2014 563 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 163 over it, 1.41\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"f44863edd8c2d7c6be6885dd2290c75bbfaef551ab67f69c1d8582779d969c0d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _GameDetailScreenState.build: MethodTooLong \u2014 build runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ea4266769a5af6d85098cea411432532e203ba7d3a1896cfe49f32f1d4031f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeGridView._buildLibraryItem: MethodTooLong \u2014 _buildLibraryItem runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ea94471c954231b609befbd65fc9acf2db702aee91c3a279c524612d5ac692"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: _HomeViewState: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 over it, 1.37\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2334c3784733531966eeadb4f327cbc7e173f2de9f77b63116a2c41e250ead5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _LibraryScreenState._buildContent: MethodTooLong \u2014 _buildContent runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":1218}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca6d1e50d570cadbbc6c83b73c29a99629fcb4009862449428459a5e38d90304"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GameMetadata: ClassTooLong \u2014 542 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 142 over it, 1.36\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4978754362045a65e7a297cd3fee4ad74919261fc349f031cf9c7ddeafb5d08"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DownloadService._downloadHttp: MethodTooLong \u2014 _downloadHttp runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf1854630b3decdb1cbe4972d48b7c50f9ed6f205a172152380dbdbafbfb9d4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: utils/game_metadata.dart: FileTooLong \u2014 635 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: GameMetadata (57-799). The bar is 500 significant lines; this is 135 over it, 1.27\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1989ab744ec7bd8bae80e97278e634d7950d3d6909a602b44f15d4ec85b122b5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GameDetailController: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fcdf054272639c2d29f970e432fc1a2ae9ec5a542f737f6eafef2712f885d9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: _GameListScreenState: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"5680e1c2afbfee59673e53741c85d84e26e123a12734288f5ca35d0d66a8f0d0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ConsoleTileState.build: MethodTooLong \u2014 build runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_grid.dart"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb28d5a64ef04563f103d136e40b75de99905b43240516f2d633c2686b92c23"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ControlButton.build: MethodTooLong \u2014 build runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/control_button.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"7654ad31f1206d93b918e28c867ac50bd318093224e724eb425c5a78a768417c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: game_list/game_list_screen.dart: FileTooLong \u2014 605 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _GameListScreenState (51-838). The bar is 500 significant lines; this is 105 over it, 1.21\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"790f0356059560a36a598de7cd63cf7503b7fb9c761fb75a3b541391c055025a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: _GameDetailScreenState: TooManyMethods \u2014 36 methods. The bar is 30 methods; this is 6 over it, 1.20\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ad54cbe22d9c2c0f0108ca30f1caba53f80476d92d32e087865b8b9a4f8a02"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ExitConfirmationOverlayState.build: MethodTooLong \u2014 build runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/exit_confirmation_overlay.dart"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"3679965dea11c9afdc8fc697e32a9655daa6daeefa754a3277a700d60f411b42"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HomeGridView._buildGridItem: MethodTooLong \u2014 _buildGridItem runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"17f3c071fb318472452b910243eb00de804b81da994199c83f295ee51e9788a7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: widgets/download_overlay.dart: FileTooLong \u2014 587 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: _DownloadModalState (326-872). The bar is 500 significant lines; this is 87 over it, 1.17\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download_overlay.dart"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b376dcfa7aa09b40a231ac354ef4d2c5600a7ea53649bb2b728f0ed51dcbc1a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GameListHeader.build: MethodTooLong \u2014 build runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_list_header.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1a6b5111b2f5c16a6972204aabcbf506c81be4a35850bb58036dd14ffa0e406"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ScanConsoleTile.build: MethodTooLong \u2014 build runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/widgets/scan_console_tile.dart"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"e081d2f08b6115f763b7556b25f471d291160e380c304b6f239fb23c4329694d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _ConsoleConfigPanelState._buildConfigBody: MethodTooLong \u2014 _buildConfigBody runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_config_panel.dart"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"488d2031cd417fce64adcd6ca624d3bd6029a7aad670c41b48900937b3af790f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _ManualSourceAddScreenState: ClassTooLong \u2014 448 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 48 over it, 1.12\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/manual_source_add_screen.dart"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc80c50804ad256ac2e0aa8fd05eb878fcb98c2f6ba2c9cf1fd247bb62062ec"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _ProviderFormState: ClassTooLong \u2014 445 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 45 over it, 1.11\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60dcc90d8eecebcd35b93d702f5bbf3f6a90cbdbe3ee4ebe264d957f27971e4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: _ShelfEditScreenState: ClassTooLong \u2014 444 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 44 over it, 1.11\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/shelf_edit_screen.dart"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"4deaaf71aa77b34d67a12d47339c1fed8e96c3d70420ab0df8501c8c99df0242"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DatabaseService._onUpgrade: MethodTooLong \u2014 _onUpgrade runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"9820dafc7cc022491b212ba3fdd05ede56a177fdc64dbf598d2ea19020f43a3c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _AchievementTile.build: MethodTooLong \u2014 build runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"29558661fbf4a5e2de2855f72185bbff94240bab2af904f801f5309ca7f4667c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _QrPairingScreenState.build: MethodTooLong \u2014 build runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/pairing/qr_pairing_screen.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c470019be7f9c7978760b1bdae07da56eb0e62319e07251976134684adb12a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: _RommLegacyLoginScreenState.build: MethodTooLong \u2014 build runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"69cd9d4f2bf24eee38dd661bf5e605ba2ab424611be1eaf78eb836141ed6d7c3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DownloadActionButton.build: MethodTooLong \u2014 build runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/download_action_button.dart"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7349254adce30777b3c0363627ce57320d15ef02d5767d6a988d5f9877fe9c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DownloadQueueManager: ClassTooLong \u2014 426 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 26 over it, 1.07\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_queue_manager.dart"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e0337a10bb0245068f74698a17fdcac00097b8acf9744409ae5e4076d8f647"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OnboardingController: ClassTooLong \u2014 422 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 22 over it, 1.06\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"8adcb148d3c54961475dde4f4aac318e176464083332512414bad039b64e18f7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DownloadItemCard.build: MethodTooLong \u2014 build runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download/download_item_card.dart"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"141a529065966d368cf8627c857b33f0298be1040896e9720afe616a366645e7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ConsoleHud.build: MethodTooLong \u2014 build runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/console_hud.dart"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c3c7e95c2d301e8a8a843e7420d5055bcfd68553b8cc6189848a6871c2e022e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: OnboardingController: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8a67f2660dce8318e3442fd5156ccde630bbf3170ff456042e905c3582614d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DownloadService._downloadNativeSmbFolder: MethodTooLong \u2014 _downloadNativeSmbFolder runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cf9df7ec3d2beac17af083a48f064b0e7af152793c16eb1e1e36ca22d6d66a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 33 shared lines): lib/features/onboarding/widgets/ra_onboarding_screen.dart:92-131 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:123-162 | lib/features/pairing/manual_pairing_screen.dart:91-133 | lib/features/sources/manual_source_add_screen.dart:193-232 | lib/features/sources/source_mappings_screen.dart:99-138 \u2014 These 5 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ea45f7861c8860aacb22bb2dc264c9cf2d497e37eff180a1454a5e2a7745d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): lib/features/onboarding/widgets/ra_onboarding_screen.dart:140-151 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:167-178 | lib/features/onboarding/widgets/welcome_chooser_step.dart:86-97 | lib/features/pairing/manual_pairing_screen.dart:135-146 | lib/features/sources/manual_source_add_screen.dart:237-248 | lib/features/sources/source_mappings_screen.dart:140-151 \u2014 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 \u2014 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\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c1d2cb9d009e55f7891a2e11fa075936c7915a6402832ef8c96fa720425faf"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): lib/features/game_detail/widgets/variant_picker_overlay.dart:118-161 | lib/features/library/widgets/game_list_overlay.dart:90-133 | lib/features/library/widgets/shelf_picker_dialog.dart:70-105 | lib/features/library/widgets/system_selector_overlay.dart:97-150 | lib/widgets/quick_menu.dart:108-157 \u2014 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 \u2014 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\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac3242ddd7f29759b009b3ef83ec4de9cb85233f3a9a706b381f2b675bbbba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): lib/features/onboarding/widgets/ra_onboarding_screen.dart:257-355 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:253-396 | lib/features/sources/manual_source_add_screen.dart:345-454 | lib/features/sources/source_mappings_screen.dart:188-298 \u2014 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 \u2014 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\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d0c0c65f920f6a18a4dac1d7f7cbf45612a4b4823d6e600e98af5b32983bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): lib/features/onboarding/widgets/ra_onboarding_screen.dart:474-525 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:405-457 | lib/features/pairing/manual_pairing_screen.dart:356-413 | lib/features/sources/manual_source_add_screen.dart:605-658 \u2014 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 \u2014 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\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a2973e6d362b6f578333b854c18ac2798e0dbc469c2380c5cb6121f6448167"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:253-396 | lib/features/pairing/manual_pairing_screen.dart:225-342 | lib/features/sources/manual_source_add_screen.dart:345-454 | lib/features/sources/source_mappings_screen.dart:188-298 \u2014 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 \u2014 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\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef938a60433e14025d456b701324838d93fec40f822c75851ba14e83dd2200ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): lib/features/onboarding/widgets/welcome_chooser_step.dart:112-164 | lib/features/onboarding/widgets/welcome_chooser_step.dart:166-204 | lib/features/onboarding/widgets/welcome_chooser_step.dart:206-256 | lib/features/onboarding/widgets/welcome_chooser_step.dart:293-311 \u2014 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 \u2014 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\u0027 grain \u2014 factor the shared implementation out once and have all of 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/welcome_chooser_step.dart"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d84f1c6736ec68989f28116df51042d1d24f4050cef9d3069c141b749eca36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (159 corresponding lines): lib/features/home/widgets/home_grid_view.dart:89-272 | lib/features/home/widgets/home_grid_view.dart:274-432 \u2014 These two members are one piece of code written twice and then edited apart: 159 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4bddfb00a7ff818b6aaf7c8db7ddc08fe63fcceb4125833a05e9a8e5fed89f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (77 corresponding lines): lib/features/settings/sources_screen.dart:1086-1167 | lib/features/settings/sources_screen.dart:1347-1423 \u2014 These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9bf308451cb34d8f0c12125f7402739ac509d2bae9ab50ebe200dce726fb79d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (62 corresponding lines): lib/utils/image_helper.dart:16-86 | lib/utils/image_helper.dart:88-149 \u2014 These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/image_helper.dart"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c3af00e4a4c870c8ac326119a9cc7752e393c404a19ba14d60249adc33c611"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (59 corresponding lines): lib/features/home/widgets/hero_carousel_item.dart:22-82 | lib/features/home/widgets/hero_carousel_item.dart:101-159 \u2014 These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/hero_carousel_item.dart"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"3456e233a3cba276a381135a0be8d7122126b096f8e259b8842a7ee831c765ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): lib/widgets/confirm_dialog.dart:186-233 | lib/widgets/exit_confirmation_overlay.dart:303-350 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/confirm_dialog.dart"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"53a9dc7d35f94e2f51f4ed05bf0a3b3f9f2cee809a59a519ed41afc7b369de22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 56\u002B corresponding lines): lib/features/onboarding/onboarding_screen.dart:361-419 | lib/features/onboarding/widgets/welcome_chooser_step.dart:415-470 | lib/features/settings/widgets/settings_list_view.dart:171-226 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 56 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"86057cd1245b2a92420edd4eb32106c5f41178f59ca649f5fb47041d059ed7ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:60-93 | android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:95-132 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/SmbService.kt"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c005d7da156e88c619c51bcf5ce206b3499330769d644ee87bcfb451bbf49b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): lib/widgets/state_views.dart:27-74 | lib/widgets/state_views.dart:98-150 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/state_views.dart"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"5edf6bb5616d99f82db39164a7f7505edc46dfe79bd9f678918d26d24cef2378"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): lib/services/providers/ftp_provider.dart:57-102 | lib/services/providers/web_provider.dart:42-81 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e97beded697d0b5895826e62e4424bdded9f79cac8a55192446f46e2a3976a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): lib/widgets/base_game_card.dart:375-419 | lib/widgets/installed_indicator.dart:39-83 \u2014 These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b0749fb7e32f49a496dc60f5a8844375c3143381eebceac2c4bd21c5ce9450"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (43 corresponding lines): lib/features/settings/sources_screen.dart:1202-1244 | lib/features/settings/sources_screen.dart:1446-1494 \u2014 These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d3789b00053bf44879c299b6909f443252e12b12d06b32c56d45073dd03ae1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): lib/features/settings/sources_screen.dart:1037-1074 | lib/features/settings/sources_screen.dart:1313-1345 \u2014 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 \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1037}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4bf8c62fe8d230839492e81b97e40da24ff09d17561fa0c13430218c2f8896"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): lib/features/game_list/game_list_screen.dart:119-154 | lib/features/library/library_screen.dart:139-171 \u2014 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 \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d3b5492016b277e01cadddc194fbe481f787bdc450edd17479b8885311ef72"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): lib/features/settings/config_mode_screen.dart:233-277 | lib/features/settings/settings_screen.dart:310-362 \u2014 These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/config_mode_screen.dart"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a0de938fd90b8b47d0a20b76792331c6d80d2d4ca85f64652b869811dc98536"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): lib/features/home/home_view.dart:1014-1047 | lib/features/home/widgets/home_grid_view.dart:448-486 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd56e91623800fa2c4022539cb7551f8ff7b08038fee7fd77b743d19c07f58c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): lib/core/widgets/console_focusable.dart:293-344 | lib/core/widgets/console_focusable.dart:418-459 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da3ab9ba3e89ffc376e30cff55fe4d79bc305c9ceaacea7fdeefe34c6609753"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (43 corresponding lines): lib/features/game_list/widgets/game_grid.dart:407-454 | lib/features/game_list/widgets/game_grid.dart:488-530 \u2014 These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_grid.dart"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f59dd666890d10a16f3dec21d808b9e641dcaa6b519831fd8a184c072200d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): lib/features/home/home_view.dart:716-746 | lib/features/home/home_view.dart:748-783 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"2140c48dd1ff095202289bf59043b61c5a0cec5001625acf59171e63e0322089"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): lib/features/game_detail/widgets/description_overlay.dart:129-162 | lib/features/game_detail/widgets/game_detail_overlay.dart:83-118 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/description_overlay.dart"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"03c1fd48259998287a01aa0b4764babd6d9946b30466b2c54d9fe972fbeac3a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): lib/models/config/provider_config.dart:315-345 | lib/models/config/source.dart:286-322 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a50dfc53fe04cb9e50fac416d19fb5fc436960246f64800ebc5806834d90f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 37\u002B corresponding lines): lib/features/game_detail/widgets/ra_info_section.dart:320-358 | lib/features/game_detail/widgets/ra_info_section.dart:360-396 | lib/features/game_list/widgets/game_list_header.dart:204-241 | lib/features/game_list/widgets/game_list_header.dart:249-286 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/ra_info_section.dart"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"db53b3c014c6a39ce28f0ce8d82ff003c2f5190626f58556526f164f055c220c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): lib/features/game_detail/game_detail_controller.dart:450-471 | lib/features/game_detail/game_detail_controller.dart:552-575 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec0a0f7776bd225fe5d8e6b0e531fbb6d3149f670909f9322125f347b99dee7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): lib/features/game_detail/widgets/badges_row.dart:115-145 | lib/features/game_detail/widgets/game_detail_overlay.dart:269-296 | lib/features/game_detail/widgets/game_info_card.dart:127-155 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a304594a96e5c6cd9d377ecf6a492fbb9c46cd38d58fdf9da50d3fa7b1e37ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): lib/features/game_detail/widgets/section_header.dart:10-41 | lib/widgets/download_overlay.dart:792-820 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/section_header.dart"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb5153d8e4418e84d709a33b148251e073b8c1f71e4a292921bec7061f2e56d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): lib/features/game_detail/widgets/game_detail_overlay.dart:248-267 | lib/features/game_detail/widgets/game_info_card.dart:108-125 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"976fe9a1d7902eadf37f02a093cfc07c506b9b33b3f31012d1be8795af82a5a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): lib/services/database_service.dart:442-459 | lib/services/database_service.dart:461-475 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"c016ce2e421f98de82b424f219eaca96c9db682114ba9fe9a70f7d20ababa62b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): lib/features/onboarding/widgets/console_config_panel.dart:451-473 | lib/features/settings/widgets/settings_switch.dart:9-41 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_config_panel.dart"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a31f4210886dbe28450bde4459d46d630a6a48b75b3b714986fb91a1b839b18"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): lib/features/game_detail/widgets/game_detail_overlay.dart:343-370 | lib/features/game_detail/widgets/game_detail_overlay.dart:372-401 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"c39b579095f5a37ff454db247d0273273e6c23f6675cee67825d72bb2c85bcd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): lib/services/providers/romm_provider.dart:36-54 | lib/services/romm_api_service.dart:292-310 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/romm_provider.dart"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f0e4b59f4e2fd4b5d209b786e1e540492d746a2def4ede988dca3227f8669c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): lib/models/config/provider_config.dart:146-162 | lib/models/config/source.dart:199-219 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea89087b1b52f2f2f3d6794e26700ffce6a48726274d29391a06d4a0cad7f0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): lib/features/game_detail/widgets/variant_picker_overlay.dart:47-71 | lib/widgets/quick_menu.dart:51-74 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"054996aa55fb630cf0273ecc1e070ecddbbbea868fc6979574cac275dfcb2b43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): lib/features/game_detail/widgets/game_detail_overlay.dart:438-458 | lib/features/game_detail/widgets/metadata_badges.dart:157-182 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"702fc29b087ba19e8057cc93065b0731ed1f1a0d82f72c7d6c638d0a317b6692"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): lib/features/game_list/logic/game_list_controller.dart:449-465 | lib/features/library/library_screen.dart:1000-1022 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/logic/game_list_controller.dart"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"787edc021144235fbf1335014aee48393ecb1cf6227524ea34576f90cea42045"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): lib/features/game_detail/widgets/game_detail_overlay.dart:298-329 | lib/features/pairing/pairing_result_screen.dart:213-243 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c3bf022ea4ea3eba6ab512ed72ebac631e0d32dfc3b6fea06c3c23d6f791df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): lib/models/download_item.dart:61-84 | lib/services/download_service.dart:42-63 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/download_item.dart"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"5774924625964bb9e96c90087b0b9cb4e5636431c315a477d6cdf853e21d6eda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): lib/features/library/library_screen.dart:671-686 | lib/features/library/library_screen.dart:688-710 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee09be8a221ae0e8fa0cb178422441d9ace05aceeecd629d0d29a5ded89f1a30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): lib/features/onboarding/onboarding_controller.dart:584-600 | lib/features/onboarding/onboarding_controller.dart:602-621 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c25e67d46b895916f6a82def35395faa47cb21aa044cb532e0d00fe41be687"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): lib/services/database_service.dart:859-876 | lib/services/database_service.dart:878-896 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":859}}}],"partialFingerprints":{"codehealthFindingId/v1":"c26f64dd2964b8a6945c793124214a0d28059050adcd5d308847875dbd877cec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): lib/features/game_list/widgets/filter_overlay.dart:216-236 | lib/features/library/widgets/game_list_overlay.dart:72-88 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/filter_overlay.dart"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f37daa03404922f8b9c736c7894b6d32bcb9c23e6621e37ac43c7e81a7fdcd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): lib/services/source_resolver.dart:103-115 | lib/services/sources_notifier.dart:485-498 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/source_resolver.dart"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"193d7ad7d7f24ef533d6290d2460038bbf2a187cd92349a68f1591deba598f38"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 20\u002B corresponding lines): lib/features/game_detail/widgets/game_detail_overlay.dart:410-430 | lib/features/game_detail/widgets/metadata_badges.dart:193-214 | lib/features/game_detail/widgets/version_card.dart:163-184 | lib/features/pairing/pairing_result_screen.dart:245-264 | lib/features/settings/widgets/settings_list_view.dart:295-315 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce51b7d600f480aa04a371483fdcea359e12c438cc1ebafaa71262eeff848003"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): lib/services/rom_manager.dart:43-57 | lib/utils/game_metadata.dart:58-76 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"469afde91c481d7ace8730a3d6dd76ecaa577ef2d3305065acb0e2e401fd0b6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): lib/features/pairing/pairing_result_screen.dart:60-69 | lib/features/settings/sources_screen.dart:723-731 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/pairing/pairing_result_screen.dart"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cffe64bfade600ee0fb48d8d235f8430a665f013f9328837268366ab256cba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): lib/core/input/overlay_scope.dart:44-57 | lib/core/input/overlay_scope.dart:140-155 | lib/core/input/overlay_scope.dart:243-258 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/input/overlay_scope.dart"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"f18754043fe6e2862e57cda0b412da820e54a013afc267404339e7f281c09b56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): lib/features/onboarding/onboarding_screen.dart:259-280 | lib/features/onboarding/widgets/welcome_chooser_step.dart:518-532 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"09b8bd510ce28376d92ee5252c3cf3917bec26163e6a5b8a257b032251bc5149"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:82-97 | lib/features/sources/manual_source_add_screen.dart:169-189 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"840c01e7a8246f27286adee437164dbaf7232d2e4521ff19f3b6458d69d45ce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): lib/services/database_service.dart:535-547 | lib/services/storage_service.dart:434-447 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4699053b0657b4dbd61bcfa078a93d6ae9a7feefa23e8940faffd260853e15e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): lib/services/database_service.dart:767-779 | lib/services/database_service.dart:898-917 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"d32223860d6620f7f08af571be542e29080bf7e8b2ff26c7803db53fec00717f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): lib/features/game_detail/game_detail_screen.dart:1455-1471 | lib/features/game_list/widgets/dynamic_background.dart:8-25 | lib/features/game_list/widgets/tinted_overlay.dart:11-28 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":1455}}}],"partialFingerprints":{"codehealthFindingId/v1":"c949514de6691cc08da99afa3cb3e51d4f19647a905ed403360ce883e84711f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): lib/features/game_list/game_list_screen.dart:243-262 | lib/features/library/library_screen.dart:209-224 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"20594ba57e8589afbc4addb8f67b54f6bfbb69561d6fb9dbe2bf57b8dcad0775"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): lib/features/game_list/game_list_screen.dart:373-384 | lib/features/game_list/game_list_screen.dart:420-427 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e35041bbf181cc9e41c1ab7ccf7b214af683ddd4f9e96feb104840558190032"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): lib/core/widgets/console_focusable.dart:55-71 | lib/features/settings/widgets/settings_list_view.dart:122-144 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b0067e31f0217bfdadd2d4911529465162282057d2390ff9547d36bfac6be2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): lib/core/input/overlay_scope.dart:59-74 | lib/core/input/overlay_scope.dart:157-172 | lib/core/input/overlay_scope.dart:260-274 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/input/overlay_scope.dart"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf57749eeb68141f59377b9c155fdaa00ff1a09deab795861f96eaeab1851e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): lib/features/game_detail/game_detail_screen.dart:171-187 | lib/features/game_detail/widgets/variant_picker_overlay.dart:86-99 | lib/features/game_detail/widgets/version_carousel.dart:63-76 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"82eba0195688e81999e4280cf30616617fb8b9abc1cea82d6e7987927d962d03"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): lib/features/home/home_view.dart:342-352 | lib/features/home/home_view.dart:354-364 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2a17390f48b8522fa7a26b57e1815a0a4144139af8b86c0b507dcec5c2d2a66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): lib/features/game_list/logic/filter_state.dart:36-49 | lib/features/game_list/logic/filter_state.dart:51-64 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/logic/filter_state.dart"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b10f1a5a973f17451f6bdd17b5d594d926c978d9711895c2813139f3ecbc9ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): lib/features/settings/sources_screen.dart:371-378 | lib/features/settings/sources_screen.dart:461-471 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d4524bf3d69dc082d373cd788e47f8b634fb034a88499bbb0405867df9ce49"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): lib/providers/shelf_providers.dart:30-44 | lib/providers/shelf_providers.dart:46-60 | lib/providers/shelf_providers.dart:62-74 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/providers/shelf_providers.dart"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"21d9b091015fb309bad58997f54d1f0e3d8402eb10871c589ffccc72808abd56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): lib/core/input/app_actions.dart:61-72 | lib/core/input/app_actions.dart:84-95 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/input/app_actions.dart"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e45c58833d58b095daf482617efa55d9cbd22c63023bb11131cbc6fc9b42a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): lib/features/onboarding/onboarding_screen.dart:68-76 | lib/features/settings/config_mode_screen.dart:113-122 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"282a6a0b323675ea69060b0c00314e152fee800b8102f3d18e4cd0d1100b8561"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): lib/features/game_list/logic/game_list_controller.dart:484-489 | lib/features/game_list/logic/game_list_controller.dart:491-500 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/logic/game_list_controller.dart"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"1307072c62755da1e3637003a6d0ea573bc513c0cb3cff4882d311622fdcfa0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): lib/features/library/library_screen.dart:456-466 | lib/features/library/library_screen.dart:468-478 | lib/features/library/library_screen.dart:480-491 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b791eb6e4205e4f858754d36695799b3de33ad09afcca66b7ebc6d7babcda6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): lib/services/storage_service.dart:310-319 | lib/services/storage_service.dart:476-485 | lib/services/storage_service.dart:492-501 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/storage_service.dart"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb03deb733249c2c0c68de015fd719366a5df654475d491548ad9e8bef0cd1b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): lib/features/onboarding/onboarding_screen.dart:252-257 | lib/features/onboarding/widgets/welcome_chooser_step.dart:512-516 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2b94eddec123f27f782384b86c8c00c40ff11e97b1fb168b3dd52e1bff57d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): lib/features/library/widgets/reorderable_card_wrapper.dart:36-47 | lib/widgets/download/pulsing_dot.dart:28-37 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/reorderable_card_wrapper.dart"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a845387e71b660fc4b758517127d506b5f7f795bde2f15c4321f6724161d9cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): lib/features/game_list/game_list_screen.dart:275-283 | lib/features/game_detail/achievements_screen.dart:104-111 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd02017b2f00e4562dc3f5633b35d2db9ead81ebc109646042b6af03ea3e791d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): lib/services/network_discovery_service.dart:126-135 | lib/utils/image_helper.dart:241-252 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/network_discovery_service.dart"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ab7dc0a7feb2f5aac2538b8279b1a48b92d0c9acd2c1416c4762b6a2e18382"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): lib/features/library/widgets/reorderable_card_wrapper.dart:24-34 | lib/widgets/download/pulsing_dot.dart:16-26 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/reorderable_card_wrapper.dart"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdd5d5fe6f20fe040b192a5c9cac844708183165840badef47643f32d0a368c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): lib/features/game_detail/widgets/variant_picker_overlay.dart:80-84 | lib/features/game_detail/widgets/version_carousel.dart:56-61 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"758ef2ec23039beceafab580e04ffa4c7c2879569079b161d08b25cc5c5e3c25"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): lib/features/onboarding/onboarding_screen.dart:234-241 | lib/features/onboarding/widgets/welcome_chooser_step.dart:49-55 | lib/features/pairing/pairing_result_screen.dart:25-31 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"0188db7e7496e9d6465655751eea0a7549d78d6ea05727a9133126c779fb14f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): lib/core/input/console_screen_mixin.dart:67-72 | lib/core/input/searchable_screen_mixin.dart:130-136 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/input/console_screen_mixin.dart"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb4c23876b2dfdd5b04fa0d4813cc488ad7f30db7c7d96bcaed7a2ec6a032a3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): lib/services/providers/romm_provider.dart:26-32 | lib/services/providers/web_provider.dart:34-40 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/romm_provider.dart"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8780e856e550422de6a98c621f74e60a2550bcddc02e88a4e7c0233a2446b70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): lib/features/game_detail/widgets/other_versions_section.dart:60-66 | lib/features/game_detail/widgets/screenshots_carousel.dart:33-39 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/other_versions_section.dart"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"77e74c1119eccaf3fdaab75d4f563c9ffc8f78d2c2ea61124830845607d284b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (56 lines \u00D7 2): lib/features/home/widgets/home_grid_view.dart:98-153 | lib/features/home/widgets/home_grid_view.dart:279-334 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/widgets/home_grid_view.dart:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"899e7b7cff11c5a72dacb99016dc5e4d139fcaa99ef183e8c9f1d8c8a86c9598"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201344 lines \u00D7 2): lib/services/database_service.dart:172-215 | lib/services/database_service.dart:256-276 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/database_service.dart:172\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"2433d01c4bff677579aeefd6e7c741775c8c6ec51b7936752999e80019a69ccc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): lib/features/onboarding/onboarding_screen.dart:376-416 | lib/features/onboarding/widgets/welcome_chooser_step.dart:428-468 \u2014 before extracting anything, compare \u0060lib/features/onboarding/onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart\u0060 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/onboarding_screen.dart:376\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc96d91233e2033f0d36b60139d9cce0128c041fdcfedb3d19a1ef7b9b3dd731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): lib/widgets/control_button.dart:70-108 | lib/widgets/control_button.dart:158-196 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/control_button.dart:70\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/control_button.dart"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0a4a24b7e713bcd49547f68882a8cd619d031141a54b7a33dabbe5dc816ac3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201337 lines \u00D7 2): lib/features/library/widgets/game_list_overlay.dart:151-187 | lib/features/library/widgets/system_selector_overlay.dart:157-190 \u2014 before extracting anything, compare \u0060lib/features/library/widgets/game_list_overlay.dart\u0060 and \u0060lib/features/library/widgets/system_selector_overlay.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/widgets/game_list_overlay.dart:151\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"0382a3be83ff651d3e8863f1f6243a980e0d1884064a59233d01a5533d282470"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34\u201335 lines \u00D7 2): lib/features/home/widgets/hero_carousel_item.dart:29-62 | lib/features/home/widgets/hero_carousel_item.dart:107-141 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/widgets/hero_carousel_item.dart:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/hero_carousel_item.dart"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ec8cc33cf36898f4066933a650d5f200c9a5eddc62e6ef9cfbad4876ce6f8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): lib/utils/image_helper.dart:17-47 | lib/utils/image_helper.dart:90-120 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/image_helper.dart"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"f55b862d0452bd63f78c80b1cd888e988f03f2529286f3e26f0f3a46a1690ba9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): lib/features/game_detail/widgets/description_overlay.dart:135-162 | lib/features/game_detail/widgets/game_detail_overlay.dart:90-118 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/description_overlay.dart:135\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/description_overlay.dart"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7d19b50517c6868142811f257203930a1fd8f5edcde749e942e5e6ba2d243e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): lib/utils/game_metadata.dart:474-502 | lib/utils/game_metadata.dart:606-634 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/utils/game_metadata.dart:474\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1565a4ebf50b7d0011878297cd538e39d4eda4ab61552d266b8d9967ebfa25c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 3): lib/features/onboarding/widgets/ra_onboarding_screen.dart:474-501 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:405-432 | lib/features/sources/manual_source_add_screen.dart:605-632 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:474\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"9509e03f52480a7f553bc48352cd3059a132f044295c0cf68a919c3851285976"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): lib/features/home/widgets/home_grid_view.dart:169-196 | lib/features/home/widgets/home_grid_view.dart:344-371 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/widgets/home_grid_view.dart:169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"503204b9fb9356d06461906f863873efd927a92eb6e131b764224d68bde7939c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): lib/features/settings/sources_screen.dart:1090-1117 | lib/features/settings/sources_screen.dart:1351-1378 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/settings/sources_screen.dart:1090\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea019d715de9e0b9d3b8d20a105deb6a06d02b1376f9b50036b413d05c60dc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): lib/features/game_detail/widgets/description_overlay.dart:25-51 | lib/features/game_detail/widgets/game_detail_overlay.dart:43-69 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/description_overlay.dart:25\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/description_overlay.dart"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10595a5d460bdea2fdd633b8e9d8cf90a02b4e2ad959947ce140975820e0a6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): lib/widgets/confirm_dialog.dart:75-100 | lib/widgets/exit_confirmation_overlay.dart:160-186 \u2014 before extracting anything, compare \u0060lib/widgets/confirm_dialog.dart\u0060 and \u0060lib/widgets/exit_confirmation_overlay.dart\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/confirm_dialog.dart:75\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/confirm_dialog.dart"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"85759085b23e7e9d264a2f2f5b9bb4ae4ad20d2689c4db4be4960166cda40802"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201325 lines \u00D7 5): lib/features/onboarding/widgets/ra_onboarding_screen.dart:109-131 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:140-162 | lib/features/pairing/manual_pairing_screen.dart:109-133 | lib/features/sources/manual_source_add_screen.dart:210-232 | lib/features/sources/source_mappings_screen.dart:116-138 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:109\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fde5396317dd5b55e56588ab450b76d8a96b78940af1c91fba25676153ae692"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 3): lib/features/library/library_screen.dart:1118-1142 | lib/features/settings/config_mode_screen.dart:238-262 | lib/features/settings/settings_screen.dart:311-335 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/library_screen.dart:1118\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83d96bbd7a66f3ae48d1a9c54751a39dcc77655f865fcfa9d80f82a9ae30654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 3): lib/features/onboarding/widgets/ra_onboarding_screen.dart:502-525 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:434-457 | lib/features/sources/manual_source_add_screen.dart:635-658 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:502\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"959b0d7ed570c0dbd800247778585b59fe27642c4e468544eb4f9c4b457d8be9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): lib/features/game_detail/widgets/action_buttons_row.dart:331-354 | lib/features/game_detail/widgets/download_action_button.dart:111-134 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/action_buttons_row.dart:331\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"06682add562f57dabb099cd8643f5acd115e12357e9775fbf70f85651fc1f2b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): lib/features/library/widgets/game_list_overlay.dart:240-263 | lib/features/library/widgets/game_list_overlay.dart:296-319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/widgets/game_list_overlay.dart:240\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/features/library/widgets/game_list_overlay.dart:321\u0060 calls \u0060Expanded\u0060, \u0060Column\u0060 and \u0060lib/features/library/widgets/game_list_overlay.dart:264\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"166678fe6a1bc6f1743e1d25c527a7bab18e16e9a5e05fa68e2d7f4e6cf401e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): lib/features/settings/sources_screen.dart:1144-1167 | lib/features/settings/sources_screen.dart:1400-1423 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/settings/sources_screen.dart:1144\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ac19a558056c08d6b4ccc0e4cc7d2e7c5c61c5fd34bd7a61fb0ab8589fa87b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 3): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:349-369 | lib/features/sources/manual_source_add_screen.dart:401-423 | lib/features/sources/source_mappings_screen.dart:259-279 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 and \u0060lib/features/sources/manual_source_add_screen.dart\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart:349\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f2a8d86153cd9310d3403f73dd9f5df0aa64c39818f6103bdb8479720f16b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): lib/features/game_detail/widgets/badges_row.dart:269-289 | lib/features/game_detail/widgets/badges_row.dart:292-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dbb9fe3249ae9e26edd5323f6aff1c974df70fa2145cb9838194c66d79af83e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): lib/services/providers/ftp_provider.dart:75-95 | lib/services/providers/smb_provider.dart:89-109 \u2014 before extracting anything, compare \u0060lib/services/providers/ftp_provider.dart\u0060 and \u0060lib/services/providers/smb_provider.dart\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"418bd5f477a433c139c8ae7820c25d8b91536c3ec4d88ff311ca87e7642d0ea0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): lib/services/providers/ftp_provider.dart:192-212 | lib/services/providers/ftp_provider.dart:222-242 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/providers/ftp_provider.dart:192\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa9bd6ebdc30eeb12314a8c661636e37d340dab06f9e9247c9df719bb577d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): lib/features/game_detail/game_detail_screen.dart:392-411 | lib/features/game_detail/game_detail_screen.dart:575-593 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/game_detail_screen.dart:392\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e512ec2151e70d6970938e8d0cb13fba69052409046efe29d5279664f0d6b07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:274-290 | lib/features/sources/manual_source_add_screen.dart:366-384 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 and \u0060lib/features/sources/manual_source_add_screen.dart\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 199 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart:274\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/features/sources/manual_source_add_screen.dart:386\u0060 calls \u0060_buildDiscoverySection\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart:291\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"111018ef9fdc6c790d318ede40457ceba9a1c685776a2bea9d68a85cdcc13a67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): lib/widgets/confirm_dialog.dart:215-233 | lib/widgets/exit_confirmation_overlay.dart:332-350 \u2014 before extracting anything, compare \u0060lib/widgets/confirm_dialog.dart\u0060 and \u0060lib/widgets/exit_confirmation_overlay.dart\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/confirm_dialog.dart:215\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/confirm_dialog.dart"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec47fe8bc03f600abe78358d791bebb1d49e6f9d9859f8fc0ed8cbbc90b2afbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): lib/features/game_detail/widgets/section_header.dart:24-41 | lib/widgets/download_overlay.dart:803-820 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/section_header.dart:24\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/section_header.dart"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd3ff78ab0402faed6d32dc685d610a12fe911e5ebfaa88a39b334376335df8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): lib/features/home/widgets/home_grid_view.dart:180-196 | lib/features/home/widgets/home_grid_view.dart:355-371 | lib/widgets/base_game_card.dart:234-250 \u2014 there are 3 copies across 2 file(s) \u2014 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/widgets/home_grid_view.dart:180\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db71d02f50f7ba81995ff65c0edd5413da958673359d13271b194aabb374b00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): lib/services/providers/ftp_provider.dart:83-98 | lib/services/providers/smb_provider.dart:97-113 | lib/services/providers/web_provider.dart:66-81 \u2014 before extracting anything, compare \u0060lib/services/providers/ftp_provider.dart\u0060 and \u0060lib/services/providers/smb_provider.dart\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/providers/ftp_provider.dart:83\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"bee083f7c3b5e155e16e58e5ecbc066175ef7677061d0258ae3b01dd9714ee81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:364-380 | lib/features/pairing/manual_pairing_screen.dart:318-334 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 and \u0060lib/features/pairing/manual_pairing_screen.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart:364\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"852e76f425beb97d00b857a319c2823dbce0d73e0ec69f5fcb1fcb9d7ee7ce05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): lib/services/download_service.dart:618-634 | lib/services/download_service.dart:784-800 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ad1b548fc33dd5843ea0b47ce8ce7ac4ad6bf35094ef4de73ffb75629d1314"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201334 lines \u00D7 2): lib/services/download_service.dart:822-855 | lib/services/download_service.dart:927-959 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":822}}}],"partialFingerprints":{"codehealthFindingId/v1":"246f875608332b033ae57dbdb282c7bf2672852e968190819eba519648dda6d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): lib/features/onboarding/onboarding_screen.dart:371-385 | lib/features/onboarding/widgets/welcome_chooser_step.dart:423-437 | lib/features/settings/widgets/settings_list_view.dart:178-193 \u2014 before extracting anything, compare \u0060lib/features/onboarding/onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart\u0060 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/onboarding_screen.dart:371\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060lib/features/onboarding/onboarding_screen.dart:369\u0060 calls \u0060GestureDetector\u0060 and \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart:422\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab9e65976749e00d16eda306987ad476851e9444a750b5f8cfbfb0ef4abcd057"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): lib/widgets/gamepad_icons.dart:19-34 | lib/widgets/gamepad_icons.dart:37-52 | lib/widgets/gamepad_icons.dart:55-70 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/gamepad_icons.dart"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f9d98658bab67bbfed66d2af9e6e928ef801ced74b319f06f96a66b947bbfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): lib/features/home/home_view.dart:792-807 | lib/features/home/home_view.dart:841-856 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/home_view.dart:792\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8bce842efc64ae997a101b33e96db55f28744b3f4fe00ec3bfb6e541003dede"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): lib/widgets/base_game_card.dart:386-401 | lib/widgets/installed_indicator.dart:50-65 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/base_game_card.dart:386\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"766227f6a50acc61852914bcff241a42e1862d7ab7e127dc4fe9d49b6d358b4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): lib/features/onboarding/widgets/ra_onboarding_screen.dart:260-274 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:255-269 | lib/features/sources/manual_source_add_screen.dart:347-361 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:260\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:259\u0060 calls \u0060of\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart:254\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4eb82095da59a547aa0d79af1c07c1c981799aa267dc6a8ad20bec5c6ed75fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): lib/features/game_detail/game_detail_screen.dart:1457-1471 | lib/features/game_list/widgets/dynamic_background.dart:11-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/game_detail_screen.dart:1457\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_screen.dart"},"region":{"startLine":1457}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4f5ecc617988398f429130dccb79edc5eeda2e9e4e850f0a628ed388890186"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): lib/features/game_detail/widgets/variant_picker_overlay.dart:208-222 | lib/features/library/widgets/shelf_picker_dialog.dart:127-141 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart\u0060 and \u0060lib/features/library/widgets/shelf_picker_dialog.dart\u0060 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart:208\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"bee19d5e34a5442ec2fceaf3baa758d6f6c796b75cf06641c41813def95b5161"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): lib/features/home/widgets/home_grid_view.dart:222-236 | lib/widgets/base_game_card.dart:253-267 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/widgets/home_grid_view.dart:222\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/widgets/home_grid_view.dart"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c923a9183465b672778f46b163d992ded6d505106cdf366a30c0866e4043a85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): lib/features/settings/sources_screen.dart:1209-1223 | lib/features/settings/sources_screen.dart:1449-1460 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/settings/sources_screen.dart:1209\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1209}}}],"partialFingerprints":{"codehealthFindingId/v1":"22e491887833ced891708bb48d078ff7365e92517ba03976ce9e17257789a84c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 4): lib/features/onboarding/widgets/ra_onboarding_screen.dart:264-277 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:259-272 | lib/features/sources/manual_source_add_screen.dart:351-364 | lib/features/sources/source_mappings_screen.dart:193-205 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:264\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14f9a03445bd1f1c651077fe5ca335bcab3103315c4bf3152f95794f2220020"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): lib/core/input/overlay_scope.dart:142-155 | lib/core/input/overlay_scope.dart:245-258 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060oldWidget\u0060 to \u0060DialogFocusScope\u0060 in one and \u0060SearchFocusScope\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/input/overlay_scope.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"79248b0bcf19e9e96c7775bc9eb4a5d5ce1e1eef519fef6803a90c632efea807"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): lib/core/widgets/console_focusable.dart:326-339 | lib/core/widgets/console_focusable.dart:442-455 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/core/widgets/console_focusable.dart:326\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b96c76373e9805e410a0d98834d71900d8285c946ce17da3856346b4c11cbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): lib/features/game_detail/widgets/action_buttons_row.dart:357-370 | lib/features/game_detail/widgets/download_action_button.dart:135-146 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/action_buttons_row.dart:357\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"06f0977819424613aa56beb57d208b7d8a8114edf40c17a396de23263efd8e52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): lib/features/home/home_view.dart:1018-1032 | lib/features/home/widgets/home_grid_view.dart:457-471 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/home_view.dart:1018\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb523d522a66faac2aae68d6e56bdb1319fad67afdbd6e941ad80da14211f443"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): lib/features/library/widgets/game_list_overlay.dart:91-104 | lib/features/library/widgets/system_selector_overlay.dart:98-111 \u2014 before extracting anything, compare \u0060lib/features/library/widgets/game_list_overlay.dart\u0060 and \u0060lib/features/library/widgets/system_selector_overlay.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/widgets/game_list_overlay.dart:91\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"c920588e77b1ad06fe23b9c8f01f347d3952c314ddf50428de159eff691efdca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): lib/features/onboarding/widgets/ra_onboarding_screen.dart:288-301 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:282-294 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:288\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0473e9cff2cde4299e37aae49f963257c209bf0ff2c217c249f486272b4e87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): lib/services/download_service.dart:604-617 | lib/services/download_service.dart:769-782 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"51ef1e1968868d0fbdb21b06639cab89e98f24d156978997f6e100857379c5b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/game_detail/game_detail_controller.dart:459-471 | lib/features/game_detail/game_detail_controller.dart:563-575 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/game_detail_controller.dart:459\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/game_detail_controller.dart"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ed7be44084fffb6dcfb90965fa2f07e2b450de3172bb7cf1562e8992f8946d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): lib/features/game_detail/widgets/badges_row.dart:75-86 | lib/features/game_detail/widgets/game_detail_overlay.dart:248-260 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/badges_row.dart:75\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"68261dd9d927c86dac2bddac4f026fe4260a7a8a102634db463b2738a04a32c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/game_detail/widgets/badges_row.dart:124-136 | lib/features/game_detail/widgets/game_info_card.dart:134-146 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/badges_row.dart\u0060 and \u0060lib/features/game_detail/widgets/game_info_card.dart\u0060 as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/badges_row.dart:124\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"feb631fff1ae56f38f847a5af5a2cb7490686b084caeb742cc6f3f19e4a2e1b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/game_detail/widgets/game_detail_overlay.dart:270-282 | lib/features/game_detail/widgets/game_info_card.dart:129-141 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/game_detail_overlay.dart:270\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/game_detail_overlay.dart"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"b94995fadfc9beffd63bd5552fa3f0b113db769018929c2cf618bafd288585d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/game_list/widgets/game_list_header.dart:204-216 | lib/features/game_list/widgets/game_list_header.dart:249-261 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_list/widgets/game_list_header.dart:204\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_list_header.dart"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc599136c7143bd7d898c84c59c30303849b8459bcfe3483f3dc86d201db957"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/home/home_view.dart:700-712 | lib/features/home/home_view.dart:963-975 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1f8c0cedef79e8b80db5c3548af4acda6c0d572cacb512c319c491555f84c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/library/widgets/game_list_overlay.dart:76-88 | lib/features/library/widgets/system_selector_overlay.dart:71-83 \u2014 before extracting anything, compare \u0060lib/features/library/widgets/game_list_overlay.dart\u0060 and \u0060lib/features/library/widgets/system_selector_overlay.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/widgets/game_list_overlay.dart:76\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3c8c40565ad9432fe3caffe15945e1285bee6e8871dca09f632516a08f73b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): lib/features/onboarding/onboarding_screen.dart:259-271 | lib/features/onboarding/widgets/welcome_chooser_step.dart:518-530 \u2014 before extracting anything, compare \u0060lib/features/onboarding/onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart\u0060 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/onboarding_screen.dart:259\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"685db3d024a895f3fb4feb23c7f941e89f2d73f88307188b5d7149ae5630471b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): lib/services/cover_preload_service.dart:239-251 | lib/services/cover_preload_service.dart:299-310 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/cover_preload_service.dart:239\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/cover_preload_service.dart"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"f82b5a07d6076ad8e1d15286920466ada62c3cf8b22a435febfd035fe7cd1d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): lib/services/providers/ftp_provider.dart:69-81 | lib/services/providers/web_provider.dart:53-64 \u2014 before extracting anything, compare \u0060lib/services/providers/ftp_provider.dart\u0060 and \u0060lib/services/providers/web_provider.dart\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/providers/ftp_provider.dart:69\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cd4616c4a41ef1886c19f2c4e4653c23550d4ea1b76329978fa397db9376fa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): lib/features/onboarding/widgets/ra_onboarding_screen.dart:488-499 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:419-430 | lib/features/pairing/manual_pairing_screen.dart:375-386 | lib/features/sources/manual_source_add_screen.dart:619-630 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:488\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"063392d13510ce7e5f9873cb2e225ccb0e6ce33d35557351ec28e409a8b862a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): lib/features/onboarding/widgets/welcome_chooser_step.dart:113-124 | lib/features/onboarding/widgets/welcome_chooser_step.dart:167-178 | lib/features/onboarding/widgets/welcome_chooser_step.dart:207-218 | lib/features/onboarding/widgets/welcome_chooser_step.dart:294-305 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart:306\u0060 calls \u0060completeFromLocalOnly\u0060 and \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart:125\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/welcome_chooser_step.dart"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b102eb9876fee7ab0910533c189313682358d5cc26e5347f4fa10a1049474f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): lib/features/game_detail/achievements_screen.dart:533-543 | lib/features/game_detail/widgets/ra_info_section.dart:135-146 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/achievements_screen.dart:533\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"9abd9ecba9b7908664d0aeb26c8e1cf320951a60e3fb7c358328e31c4594df0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/features/game_detail/widgets/badges_row.dart:90-101 | lib/features/game_detail/widgets/game_info_card.dart:112-123 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/badges_row.dart\u0060 and \u0060lib/features/game_detail/widgets/game_info_card.dart\u0060 as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/badges_row.dart:90\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"b948698a5f06d55940fd1fd2f951b45acf3d4b051526eef45c263d414b62c516"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): lib/features/game_detail/widgets/metadata_badges.dart:71-82 | lib/features/game_detail/widgets/metadata_badges.dart:127-137 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/metadata_badges.dart:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/metadata_badges.dart"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9fab5890b24119116351854d882861c917b187f0d9a3e6be69bc737b744dbce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/features/game_detail/widgets/other_versions_section.dart:68-79 | lib/features/game_detail/widgets/screenshots_carousel.dart:41-52 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/other_versions_section.dart"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"f717fae0ff5e6c942195ae86e1748c2faaf94b909b95334ebec1da94f4df8e80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/features/game_detail/widgets/variant_picker_overlay.dart:88-99 | lib/features/game_detail/widgets/version_carousel.dart:65-76 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7423afe6ccae3f5f13cb1b565ae1953e16e56bfadeb5756015f11bc44e5d220"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): lib/features/game_detail/widgets/variant_picker_overlay.dart:119-128 | lib/widgets/quick_menu.dart:109-120 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart\u0060 and \u0060lib/widgets/quick_menu.dart\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c097ec9a54f2e825c0048372b3abe48af433f52c6d17c541bf31b56d26d72930"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/features/pairing/pairing_result_screen.dart:246-257 | lib/features/settings/widgets/settings_list_view.dart:296-307 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/pairing/pairing_result_screen.dart:246\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/pairing/pairing_result_screen.dart"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c1492e6f673281ee429db6c5003ca5cd2289ef7a1a5c042109bb7293d3455e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/services/thumbnail_service.dart:200-211 | lib/services/thumbnail_service.dart:369-380 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/services/thumbnail_service.dart:215\u0060 calls \u0060of\u0060, \u0060clear\u0060 and \u0060lib/services/thumbnail_service.dart:381\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5653ef6ca4427aad58a0050bf184ddb38f03ba4af57d1d69b2cb9e486dda2fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/utils/game_metadata.dart:401-412 | lib/utils/game_metadata.dart:414-425 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/utils/game_metadata.dart:401\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/utils/game_metadata.dart"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3a60896eeeb8168b7d2dff4d9a38af5d77080e04736f693ece0159055dd5a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/widgets/confirm_dialog.dart:127-138 | lib/widgets/exit_confirmation_overlay.dart:214-225 \u2014 before extracting anything, compare \u0060lib/widgets/confirm_dialog.dart\u0060 and \u0060lib/widgets/exit_confirmation_overlay.dart\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/confirm_dialog.dart:127\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/confirm_dialog.dart"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"29bd372cadb345cacee4370b426a4bcdd8dd745981076cad4792f12335fabd81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 5): lib/features/game_detail/widgets/variant_picker_overlay.dart:205-215 | lib/features/library/widgets/shelf_picker_dialog.dart:125-134 | lib/widgets/confirm_dialog.dart:78-87 | lib/widgets/exit_confirmation_overlay.dart:164-173 | lib/widgets/quick_menu.dart:226-235 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart\u0060 and \u0060lib/features/library/widgets/shelf_picker_dialog.dart\u0060 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart:205\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/widgets/confirm_dialog.dart:88\u0060 calls \u0060Offset\u0060 and \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart:216\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"60f497f892311de6685864d25ed3a0be11231457a73a93f891123f3c2104e871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 5): lib/features/onboarding/widgets/ra_onboarding_screen.dart:92-101 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:123-132 | lib/features/pairing/manual_pairing_screen.dart:91-101 | lib/features/sources/manual_source_add_screen.dart:193-202 | lib/features/sources/source_mappings_screen.dart:99-108 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart:92\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64c0cc763d402ba301c5f3983c4e998e736cd87c6e9e6de09da061485a677a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/features/game_detail/widgets/metadata_badges.dart:16-26 | lib/features/game_detail/widgets/metadata_badges.dart:193-203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/metadata_badges.dart:16\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/metadata_badges.dart"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8e8aa2ff704df67cbcefc840cf0fcc075ab2ab94f9674d58a254a7aaf15d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/features/game_list/widgets/game_grid.dart:407-417 | lib/features/game_list/widgets/game_grid.dart:488-498 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_list/widgets/game_grid.dart:407\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_grid.dart"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc9e87bf0df15b21b0e821c2893dd55f231a2a6fad137f832819c7d67201c58c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/features/home/home_view.dart:827-837 | lib/features/home/home_view.dart:953-963 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/home/home_view.dart:827\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"0028e1b9c5b36b406dc7fc593e6fc70f0fa2cf6de0b9ef5db86d36752002f645"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/features/sources/manual_source_add_screen.dart:503-513 | lib/features/sources/manual_source_add_screen.dart:521-531 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/sources/manual_source_add_screen.dart:503\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060lib/features/sources/manual_source_add_screen.dart:498\u0060 calls \u0060_buildDiscoverySection\u0060, \u0060shrink\u0060 and \u0060lib/features/sources/manual_source_add_screen.dart:517\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/sources/manual_source_add_screen.dart"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e14a3c61f2fc11b61a1c5f4f6c486feb787d57209dddb3fbd526c80bd0fd704"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/services/database_service.dart:149-159 | lib/services/database_service.dart:162-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/database_service.dart:149\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"8de08cdfa79565c3a68e1c577842ccafa128abe153714c15ee5c11d0f11f1672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/widgets/download/download_item_card.dart:186-196 | lib/widgets/download/download_item_card.dart:199-209 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download/download_item_card.dart"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ab3a575e796066c4829963f03b28bab392adeb160d54278d3b150539b077e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): lib/widgets/download_overlay.dart:693-702 | lib/widgets/exit_confirmation_overlay.dart:182-192 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/download_overlay.dart:693\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/download_overlay.dart"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"61408c70e2bbae8900b0644e724329d025145c686615ff660dfcd09784ca7a2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/widgets/state_views.dart:30-40 | lib/widgets/state_views.dart:102-112 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/state_views.dart:30\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060lib/widgets/state_views.dart:101\u0060 calls \u0060of\u0060 and \u0060lib/widgets/state_views.dart:29\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/state_views.dart"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f7d35a135418acffb08e2a2e35d19ff364bd95447c8764aa24e1bfafc39151"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 5): lib/features/game_detail/widgets/variant_picker_overlay.dart:118-125 | lib/features/library/widgets/game_list_overlay.dart:90-97 | lib/features/library/widgets/shelf_picker_dialog.dart:70-77 | lib/features/library/widgets/system_selector_overlay.dart:97-104 | lib/widgets/quick_menu.dart:108-117 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart\u0060 and \u0060lib/features/library/widgets/shelf_picker_dialog.dart\u0060 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart:118\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"c66d7e1e9390add19392ca2396442280ce32091409d24849f532afab5e2fb992"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 4): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:350-357 | lib/features/pairing/manual_pairing_screen.dart:302-310 | lib/features/sources/manual_source_add_screen.dart:402-411 | lib/features/sources/source_mappings_screen.dart:260-267 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 and \u0060lib/features/pairing/manual_pairing_screen.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart:350\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e190e1a1c6ed36b6ac24a8078253ab66ff6f65beb013f90c4f2ce7f28572cbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): lib/features/game_list/widgets/game_grid.dart:131-140 | lib/features/library/widgets/game_list_overlay.dart:172-181 | lib/features/library/widgets/system_selector_overlay.dart:176-185 \u2014 before extracting anything, compare \u0060lib/features/library/widgets/game_list_overlay.dart\u0060 and \u0060lib/features/library/widgets/system_selector_overlay.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_list/widgets/game_grid.dart:131\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_grid.dart"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec2c9d50a3f0a2771a03eab0db52ad16443b73967813a2a4d1f4d616a4b6c1a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): lib/core/widgets/console_focusable.dart:142-153 | lib/core/widgets/console_focusable.dart:268-279 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eed55125f2ba518b5c5357304ba687241df800f0c2ee529274945defd37b712"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): lib/features/game_detail/widgets/details_section.dart:29-38 | lib/features/game_detail/widgets/game_info_card.dart:27-35 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/details_section.dart:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/details_section.dart"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ca9f6bb0d5a7b485efc4a7d0d100ed9f15b1a5eeac7f33df7da2f44e45abbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): lib/models/config/provider_config.dart:129-138 | lib/models/config/source.dart:178-187 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"932c574962f3bcc030befc3f46204f5a9d05c46ed7a8466b90a4f964129940c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): lib/services/download_service.dart:1070-1079 | lib/services/download_service.dart:1258-1267 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a4be4d1cb9343bfc7277aa8e1c8a0ec5c6b4fad37e1787c32f2ad9daae4245"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): lib/services/providers/romm_provider.dart:149-158 | lib/services/providers/web_provider.dart:190-199 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/romm_provider.dart"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a1a3b587b4d05b0f66b12869fc2cdefc74f97927c3db2a75d6f9862cf7d1b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): lib/services/providers/web_provider.dart:246-255 | lib/services/remote_folder_scanner.dart:165-174 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/web_provider.dart"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"332e2ad9fd83dce9e857a17519cd7466364466c3da8c2741ef220da32568d674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): lib/widgets/smart_cover_image.dart:375-384 | lib/widgets/smart_cover_image.dart:445-454 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/smart_cover_image.dart:375\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/smart_cover_image.dart"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4b3441172ae9e49ef06ce1646e2c7f93b910cd3d26246e7b39da28eaf72028"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/features/game_detail/widgets/screenshot_fullscreen.dart:136-144 | lib/features/game_list/game_list_screen.dart:814-822 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/screenshot_fullscreen.dart:136\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060lib/features/game_list/game_list_screen.dart:811\u0060 calls \u0060AnimatedOpacity\u0060, \u0060Duration\u0060 and \u0060lib/features/game_detail/widgets/screenshot_fullscreen.dart:135\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/screenshot_fullscreen.dart"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd26994c11ed008d04f7bcdd3e78baf41b63712e1781c5eb65ad2a6f0c8b9a09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/features/onboarding/widgets/console_config_panel.dart:357-365 | lib/features/onboarding/widgets/console_config_panel.dart:412-420 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/console_config_panel.dart:357\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/features/onboarding/widgets/console_config_panel.dart:366\u0060 calls \u0060all\u0060, \u0060withValues\u0060 and \u0060lib/features/onboarding/widgets/console_config_panel.dart:421\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/console_config_panel.dart"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4e8f5a2fe6209f4881ef02034797255bc11863f630e7fcdc0e40db1b3982e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/features/onboarding/widgets/welcome_chooser_step.dart:141-149 | lib/features/settings/sources_screen.dart:248-256 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/welcome_chooser_step.dart:141\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/welcome_chooser_step.dart"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"4581e7878056b53a374568f3c6b7721699cfb01398bb067ab85e6620dc51edc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/models/download_item.dart:76-84 | lib/services/download_service.dart:55-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/models/download_item.dart:76\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/download_item.dart"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"62137ec0d0b4c8570d5f57611ef3cb03ba4bc93e5fd13ba494f5115ab4a49215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/models/ra_models.dart:191-199 | lib/services/database_service.dart:1012-1020 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/ra_models.dart"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbfd488861fa13dce4526747661a79e03c4e383d496a59e4e845f82bc1ab8bc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): lib/services/database_service.dart:449-459 | lib/services/database_service.dart:465-475 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/database_service.dart:449\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/database_service.dart"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae8d5593a8620d8255f1820c646669f4849b3db33aea18f5d20d6b791b459a50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): lib/features/onboarding/widgets/ra_onboarding_screen.dart:140-151 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:167-178 | lib/features/onboarding/widgets/welcome_chooser_step.dart:86-97 | lib/features/pairing/manual_pairing_screen.dart:135-146 | lib/features/sources/manual_source_add_screen.dart:237-248 | lib/features/sources/source_mappings_screen.dart:140-151 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"d66b8ab24b395ee3609bebd77cdd1aaae0dfb064511994c3fecf6fd27ce1af8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): lib/features/game_detail/widgets/badges_row.dart:76-83 | lib/features/game_detail/widgets/game_detail_overlay.dart:250-257 | lib/features/game_detail/widgets/game_info_card.dart:110-117 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/badges_row.dart\u0060 and \u0060lib/features/game_detail/widgets/game_info_card.dart\u0060 as WHOLE FILES: this scan already matched 3 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/badges_row.dart:76\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/badges_row.dart"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e0cdd2b7b98470c4650ab5b8d41c40e0dde8623ba2c79d21fcab70a5b6a20fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/features/game_detail/achievements_screen.dart:364-371 | lib/features/game_detail/widgets/ra_info_section.dart:303-310 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/achievements_screen.dart:364\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ee49bf3a858317815139e36250bff689dae980add1ce0b26139087399fdf1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/features/library/widgets/shelf_picker_dialog.dart:165-173 | lib/widgets/quick_menu.dart:301-308 \u2014 before extracting anything, compare \u0060lib/features/library/widgets/shelf_picker_dialog.dart\u0060 and \u0060lib/widgets/quick_menu.dart\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/widgets/shelf_picker_dialog.dart:165\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/shelf_picker_dialog.dart"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"d865181e7b64c4921cbf2ac4a0316b7fe3b9a1f208ec96e23150078bab4aa75e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/services/download_service.dart:741-748 | lib/services/download_service.dart:875-882 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":741}}}],"partialFingerprints":{"codehealthFindingId/v1":"733e8e85830cf2c9341c1bbf915d399e5f71f2a2b54192b04bbe89c68e46ae2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/services/source_resolver.dart:108-115 | lib/services/sources_notifier.dart:491-498 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/source_resolver.dart:108\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/source_resolver.dart"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aab9aa16c1d55734723da55d0bfae2b56401a4b7a693d20165f6677f3411282"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/widgets/base_game_card.dart:377-384 | lib/widgets/base_game_card.dart:455-462 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/widgets/base_game_card.dart:377\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/base_game_card.dart"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1bc4d52fe5c8bba29ab8393ce82e97ec8d037243511afd5c59626b6b1f6c15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): lib/features/library/widgets/game_list_overlay.dart:171-177 | lib/features/library/widgets/shelf_picker_dialog.dart:124-130 | lib/features/library/widgets/system_selector_overlay.dart:175-181 \u2014 before extracting anything, compare \u0060lib/features/library/widgets/game_list_overlay.dart\u0060 and \u0060lib/features/library/widgets/system_selector_overlay.dart\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/widgets/game_list_overlay.dart:171\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe08cb2e974d3de8c9fd55422aaa3d138661d1538cb529b4bd213094b87b0bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): lib/services/providers/ftp_provider.dart:74-81 | lib/services/providers/smb_provider.dart:88-95 | lib/services/providers/web_provider.dart:58-64 \u2014 before extracting anything, compare \u0060lib/services/providers/ftp_provider.dart\u0060 and \u0060lib/services/providers/smb_provider.dart\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/providers/ftp_provider.dart:74\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/ftp_provider.dart"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"123d1e7e5581cecaade32a6f8aad22e52f1fb846e34af64900ea8e0c9338479c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/features/game_detail/widgets/variant_picker_overlay.dart:268-274 | lib/features/game_detail/widgets/version_carousel.dart:106-113 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart:268\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b25908e1537ab5179faff904822b16823e4855c6c94fdab056b2d4007a6c70a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/features/game_list/game_list_screen.dart:374-380 | lib/features/game_list/game_list_screen.dart:387-393 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e17d563eec1a6dcbc759d204c5962459280ea47a6c8c8a2bf8fe38e5067fa7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/features/library/library_screen.dart:673-679 | lib/features/library/library_screen.dart:695-702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/library_screen.dart:673\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ffffcd81ebacbc169feaef3f508e3328d54bb9b6b7270fda8d8cbf70bb34088"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/features/library/library_screen.dart:793-799 | lib/features/library/library_screen.dart:817-823 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/library/library_screen.dart:793\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c207633c557370d72ccece42b603248ed7a338ca1ecfc70538ccb71b7a90cc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/models/config/provider_config.dart:150-156 | lib/models/config/source.dart:204-210 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"18da2a6c4f5b48726fd14a4657d88d7038d6147a11016d54b93b09f31bf27730"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/models/config/provider_config.dart:333-339 | lib/models/config/source.dart:308-314 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/config/provider_config.dart"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"440030b200837163b125b44442a05c5f270ca0f1222b82c211e95d84fff1a44a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/services/rom_manager.dart:47-53 | lib/utils/game_metadata.dart:63-69 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/services/rom_manager.dart:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18bfbf1d719ea4b12701998bbdcfe043590e7f745581afd672aaeac077f801a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): lib/features/onboarding/widgets/provider_form.dart:369-373 | lib/features/onboarding/widgets/provider_form.dart:382-386 | lib/features/onboarding/widgets/provider_form.dart:397-401 | lib/features/onboarding/widgets/provider_form.dart:410-414 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/features/onboarding/widgets/provider_form.dart:402\u0060 calls \u0060SizedBox\u0060, \u0060_buildTextField\u0060 and \u0060lib/features/onboarding/widgets/provider_form.dart:387\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d6c9bd07270ae3616b5c11b79262dade8fafb1f1f064ee38c50db65af4cc82c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): lib/features/onboarding/onboarding_controller.dart:358-362 | lib/features/onboarding/onboarding_controller.dart:453-457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/onboarding_controller.dart:358\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fcfdac1707fe24c20f83bf8f762ca3fda63285524afe3049644ed10eb90a3de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): lib/features/onboarding/widgets/provider_form.dart:376-380 | lib/features/onboarding/widgets/provider_form.dart:389-393 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/onboarding/widgets/provider_form.dart:376\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060lib/features/onboarding/widgets/provider_form.dart:381\u0060 calls \u0060_buildTextField\u0060, \u0060SizedBox\u0060 and \u0060lib/features/onboarding/widgets/provider_form.dart:394\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ffe347ba7fe5c98bcdbf9d6d6476fc9dd8396e08fbe92b06632c8e69f09925"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): lib/features/settings/sources_screen.dart:290-294 | lib/features/settings/sources_screen.dart:332-336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060lib/features/settings/sources_screen.dart:290\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"052aeb27191dcd7afd03ca1650f699f8b8f55fb308bd580fa76bf3598d4bba30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/features/game_detail/achievements_screen.dart:133-139 | lib/features/game_detail/game_detail_screen.dart:624-631 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"96413654b9657f1b6b723583b4404e3d061cb707ed5f3a715dcbd0b1f974253b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): lib/features/game_detail/widgets/variant_picker_overlay.dart:112-116 | lib/widgets/quick_menu.dart:83-87 \u2014 before extracting anything, compare \u0060lib/features/game_detail/widgets/variant_picker_overlay.dart\u0060 and \u0060lib/widgets/quick_menu.dart\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8dc8055639a5172f0d02d215c436a89dfa178a4663517b3e33d9ce16c0bf737"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/features/game_list/game_list_screen.dart:337-345 | lib/features/library/library_screen.dart:545-553 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"675390b5401f4c1ad9daef2620c5af93475cfebdbe880a3c2855e2f44f9e5686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/features/game_list/game_list_screen.dart:537-547 | lib/features/library/library_screen.dart:988-996 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"4396016d4c1676b4f16650f59634c637408976d00fb3b53b07aa1ae9ce1a847b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/features/game_list/widgets/game_grid.dart:473-480 | lib/widgets/sync_badge.dart:349-356 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/widgets/game_grid.dart"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d438437733a2c61df3b192b4a62ecdd9b5c27f7ad8a0024b2cb807f61820d9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): lib/features/library/widgets/game_list_overlay.dart:48-54 | lib/features/library/widgets/shelf_picker_dialog.dart:49-55 | lib/features/onboarding/onboarding_screen.dart:32-38 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/widgets/game_list_overlay.dart"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e34c1eebcc62cd647668d27987c99f3fc29284307f5ff70e720f35093dc23d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): lib/features/onboarding/widgets/ra_onboarding_screen.dart:467-472 | lib/features/onboarding/widgets/romm_legacy_login_screen.dart:398-403 | lib/features/sources/manual_source_add_screen.dart:598-603 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/ra_onboarding_screen.dart\u0060 and \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 161 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d24eee95e2ce4a3586d5dbdb0cd39fa7ac1dd0f7b23adcf48162408771a28d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): lib/features/settings/widgets/scan_console_tile.dart:189-196 | lib/widgets/sync_badge.dart:127-134 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/widgets/scan_console_tile.dart"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"749e895f4bc5c212c7b92ae3d6649a27cf3ca7962cf08f7f9a070761b1f2d277"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): lib/models/download_item.dart:86-92 | lib/services/download_service.dart:65-71 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/download_item.dart"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"f23ecd87ed815f346b1265ca47d988b5918cb0ee8ab8e1fe0cfae027d4934cdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): lib/features/onboarding/widgets/romm_legacy_login_screen.dart:180-188 | lib/features/sources/source_mappings_screen.dart:153-161 \u2014 before extracting anything, compare \u0060lib/features/onboarding/widgets/romm_legacy_login_screen.dart\u0060 and \u0060lib/features/sources/source_mappings_screen.dart\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/romm_legacy_login_screen.dart"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f832677b1d5dc0911877f5b1a9bf5819e58e9d4985c5496592cf32fdaf8f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:69-78 | android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:107-115 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:69\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:104\u0060 calls \u0060toInt\u0060 and \u0060android/app/src/main/kotlin/com/retro/rshop/SmbService.kt:67\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/SmbService.kt"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"56cf8b27bf10fb0f2f339c5a3b63886ba9c44d6446ba79b5d1919b0a22bef98d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt:135-144 | android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt:150-159 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt:135\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/src/main/kotlin/com/retro/rshop/MainActivity.kt"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4cfb236f3f303256d17d23cfafc1bb99e1acea379e1c9e281aca6699e20f04"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: OnboardingController (LCOM4 21): OnboardingController\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_controller.dart"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae0329939c410e02d13942722994b7cfc1e25c665f9219ec382320e8b17d8407"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _LibraryScreenState (LCOM4 5): _LibraryScreenState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/library_screen.dart"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2d74c77c3a230a4c89e982ba50e868c80efaa7c5df71a3cfaabefb917f63ca"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _ShelfEditScreenState (LCOM4 5): _ShelfEditScreenState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/library/shelf_edit_screen.dart"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db1456225a281d5b2036b0803507431b5c4b8e3a7c960252c9325601cc96c32"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _OnboardingScreenState (LCOM4 5): _OnboardingScreenState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e6a19f8be1c8e66dc2fd9fa5bcf1294f9c3e12cb7f073df41e18048862bdf75"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _SourcesScreenState (LCOM4 5): _SourcesScreenState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39aebcc762fc013d3ee0cf3efdaa3b1b9f201262602c1f792f50b50206bd84a"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _ConsoleFocusableState (LCOM4 4): _ConsoleFocusableState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"535ed0550d53bc8eea36e2da742d90a151a7c0fe712826b8c732d846b83aabf5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _ConsoleFocusableCardState (LCOM4 4): _ConsoleFocusableCardState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"8029b47344b16872bb429e4465d0027025ab9c62b9e315a7beb611fec41e4f2c"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _ConsoleFocusableListItemState (LCOM4 4): _ConsoleFocusableListItemState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/widgets/console_focusable.dart"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2254f9c6e93396c303e76bfd2985e709bbd2256128c19bd877528e76fb034fc"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _GameListScreenState (LCOM4 4): _GameListScreenState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"37aed84a9a9371de0cc20eeb3090f50c7c9e41044409f38d6023703b301a7bf3"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _HomeViewState (LCOM4 4): _HomeViewState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/home/home_view.dart"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e23d4eaf390e6814843a35d1c7a7587b0cec09558c7b8823c7e7c1e3a4de256"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: _ConfigModeScreenState (LCOM4 4): _ConfigModeScreenState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/config_mode_screen.dart"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"f366a9b79edda55cedcb9ba6b4442057567742097defd8c1005be2eec9a5c1a2"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 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 (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 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 \u0060docs/adr/\u0060. ADRs are expected here because \u0060macos/Runner.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"macos/Runner.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f0bd4325cb484fa699f9766497db05ed665b24b57923e0afe7629a5ed95be7"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060(repository root)\u0060 (48873 LoC, 340 module-visible types across 31 directories) overshoots its size bounds. 1 of 4 build unit(s) (Gradle, Xcode, pub) overshoot their size bounds, lowering Project Cohesion to 5.0/10. Review these for cohesion \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"pubspec.yaml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9fee3010c053c10733ebad6b156234032ce361c46f8c03bb63f2bdc3c8adbd"}},{"ruleId":"D29","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b33f7ec544504c9593ac8ecf4e393177df67aa2a435e0c7963de8e547905afa9"},"taxa":[{"id":"CWE-290","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: L (498 abstract methods): \u0060L\u0060 declares 498 abstract methods: \u0060appTitle\u0060, \u0060settings_language\u0060, \u0060settings_languageSystem\u0060, \u0060common_back\u0060, \u0060common_close\u0060, \u0060common_cancel\u0060, \u0060common_cancelUpper\u0060, \u0060common_select\u0060, \u0060common_search\u0060, \u0060common_searchEllipsis\u0060, \u0060common_menu\u0060, \u0060common_navigate\u0060, \u0060common_toggle\u0060, \u0060common_clear\u0060, \u0060common_done\u0060, \u0060common_save\u0060, \u0060common_connect\u0060, \u0060common_retry\u0060, \u0060common_remove\u0060, \u0060common_favorite\u0060, \u0060common_share\u0060, \u0060common_unfavorite\u0060, \u0060common_downloads\u0060, \u0060common_installed\u0060, \u0060common_move\u0060, \u0060common_drop\u0060, \u0060common_grab\u0060, \u0060confirm_deleteTitle\u0060, \u0060confirm_deleteMessage\u0060, \u0060confirm_exitTitle\u0060, \u0060confirm_exitMessage\u0060, \u0060confirm_resetTitle\u0060, \u0060confirm_resetMessage\u0060, \u0060confirm_deleteButton\u0060, \u0060confirm_exitButton\u0060, \u0060confirm_resetButton\u0060, \u0060confirm_gamepadHint\u0060, \u0060exit_title\u0060, \u0060exit_message\u0060, \u0060exit_confirmButton\u0060, and 458 more. Counted over its public methods with no body, once per name; concrete methods and \u0060_\u0060-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don\u0027t use (the Interface-Segregation \u0027I\u0027 in SOLID). Split it into focused role-interfaces."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/l10n/app_localizations.dart"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8a21e9e8ff34e9de9faaa3058b7a2239dac8d64d17ceb9ad57d5932cc8d71f"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P2","level":"warning","message":{"text":"No structured logging: No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page \u2014 but when a run fails on a user\u0027s machine, neither they nor you have anything to read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9f10d71351c6778ebe84e761f82a90d4f9ed6c64f5e01975ede8fda7e4e2ebc5"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add the Dart analyzer\u0027s security lints plus \u0060semgrep --config=auto\u0060 \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060android/app/build.gradle.kts\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"android/app/build.gradle.kts"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc97f07cd7964b9bf62027a14dacef9476a9fd3261d3eb8f9817a5ace18ba64"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060_downloadNativeSmbFolder\u0060 is async and calls listSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"127668d5da4899041526824ec3eb2245e1ab613e8cecf0759785382adb7aa250"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060_downloadFtpFolder\u0060 is async and calls listSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7da521c0ca0b9a622cfb3185195bda1c3a8607def47c648828d347e0f7a9ea7"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060resolveInstalledPath\u0060 is async and calls listSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"258d6fc36bc564422fbab956dbf22ada031c0163f5e9b2a5315e5ddb87516c73"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060resolveSharePath\u0060 is async and calls listSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"c55267543ad8b98a8cc5dbb9ba47a12ce22cce79d759eb4c88b2c1e1503e02ba"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060exists\u0060 is async and calls listSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/rom_manager.dart"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b5a8f078f6f0975aead6b02d514485f436e1968f0144c1d137615227003feda"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060_getCacheFile\u0060 is async and calls createSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_index_service.dart"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe590fe5454c157beba26fc265b9f74a1ef2d1e511e8424328bfdbe21aff6e9"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060getDiskUsage\u0060 is async and calls listSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1a19ef44dacc2256bf2994248dc819b432fcfbe73ddcc2ac0f4d2188cd4e5a"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060cleanOrphans\u0060 is async and calls listSync, deleteSync \u2014 a blocking call inside async code stalls the isolate\u0027s event loop \u2014 every other event, on Flutter the next frame, waits for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5aeca990ac225bc3c4f3ec414bf749925eba553efa433f41c61991df96a29f"}},{"ruleId":"S1","level":"warning","message":{"text":"Weak hash algorithm: MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything \u2014 a signature, an integrity or tamper check, a credential, or any value an attacker can influence \u2014 that is a real weakness: use SHA-256\u002B (\u0060sha256.convert(\u2026)\u0060 from \u0060package:crypto\u0060) 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 \u2014 a non-cryptographic hash such as xxhash or murmurhash says it in code \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_hash_service.dart"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"58664c68230327bfceb750b743b662aa12f88590b5c3849b44657ff13a8367c7"}},{"ruleId":"S1","level":"warning","message":{"text":"Weak hash algorithm: MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything \u2014 a signature, an integrity or tamper check, a credential, or any value an attacker can influence \u2014 that is a real weakness: use SHA-256\u002B (\u0060sha256.convert(\u2026)\u0060 from \u0060package:crypto\u0060) 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 \u2014 a non-cryptographic hash such as xxhash or murmurhash says it in code \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_hash_service.dart"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6e8ef08b2119ab4f3a04cfad6f7b730d14e83459e9c2d9739a327b8fb4fed7"}},{"ruleId":"S1","level":"warning","message":{"text":"Weak hash algorithm: MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything \u2014 a signature, an integrity or tamper check, a credential, or any value an attacker can influence \u2014 that is a real weakness: use SHA-256\u002B (\u0060sha256.convert(\u2026)\u0060 from \u0060package:crypto\u0060) 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 \u2014 a non-cryptographic hash such as xxhash or murmurhash says it in code \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"abecd65733899a9ae3af7e1c96fcf4fd57c906646152aa2c9c250d6441085080"}},{"ruleId":"S1","level":"warning","message":{"text":"Weak hash algorithm: MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything \u2014 a signature, an integrity or tamper check, a credential, or any value an attacker can influence \u2014 that is a real weakness: use SHA-256\u002B (\u0060sha256.convert(\u2026)\u0060 from \u0060package:crypto\u0060) 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 \u2014 a non-cryptographic hash such as xxhash or murmurhash says it in code \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/thumbnail_service.dart"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6cc24d5e95fd22a6ddefeecc76d3471ff829444e81264f62b462ada5cdf99ff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!mounted || !_scrollController.hasClients\u0060 appears character-identically in 2 files \u2014 lib/features/game_list/game_list_screen.dart, lib/features/game_list/widgets/filter_overlay.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5952015ea233518f3d132a6607ca5dc504ddd03193b76261e533097b84aad43"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060auth.apiKey != null \u0026\u0026 auth.apiKey!.isNotEmpty\u0060 appears character-identically in 3 files \u2014 lib/features/onboarding/widgets/provider_form.dart, lib/services/providers/romm_provider.dart, lib/services/romm_api_service.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"f774e153198a9c15713a8cc3521e95e6717d10a57339e5e222bba579bc9aebfa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060auth.clientToken != null \u0026\u0026 auth.clientToken!.isNotEmpty\u0060 appears character-identically in 2 files \u2014 lib/services/providers/romm_provider.dart, lib/services/romm_api_service.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/romm_provider.dart"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a1aefcadb8ca6f648788760d5eb0e274dcf3a85dd82937cede47b2a37c7c49"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060auth.user != null \u0026\u0026 auth.user!.isNotEmpty\u0060 appears character-identically in 3 files \u2014 lib/features/onboarding/widgets/provider_form.dart, lib/services/providers/romm_provider.dart, lib/services/romm_api_service.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44eb8a42c8a79575dbe4f30b357c0366406d15f58ade3d737a292499a07ca0f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060direction == GridDirection.left || direction == GridDirection.right\u0060 appears character-identically in 2 files \u2014 lib/features/game_detail/achievements_screen.dart, lib/features/game_detail/game_detail_controller.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/achievements_screen.dart"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"97377fd13cb00d760a3b9bbbbf6de3203c8947d8375d0d7a877df45330096316"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060downloadSpeed == null || downloadSpeed! \u003C= 0\u0060 appears character-identically in 2 files \u2014 lib/models/download_item.dart, lib/services/download_service.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/download_item.dart"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c5127bfb25c6bc569267463da5cf1e9ce2f24dff19dcd5a2eb5d53c3109745f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060event is! KeyDownEvent \u0026\u0026 event is! KeyRepeatEvent\u0060 appears character-identically in 11 files \u2014 lib/features/onboarding/onboarding_screen.dart, lib/features/onboarding/widgets/ra_onboarding_screen.dart, lib/features/onboarding/widgets/romm_legacy_login_screen.dart, lib/features/onboarding/widgets/welcome_chooser_step.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/onboarding_screen.dart"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b278b9a1f2f972e61e8b3f5da13a8a24a5b66506957bf19977219a47d6ecaf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060host == \u0027localhost\u0027 || host == \u0027127.0.0.1\u0027\u0060 appears character-identically in 2 files \u2014 lib/features/onboarding/widgets/provider_form.dart, lib/models/config/provider_config.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/provider_form.dart"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"b96a92d5baaf512c65a9448ce1b746da1e047a05d0489654d930a1429315f5a6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060intent.direction == GridDirection.left || intent.direction == GridDirection.right\u0060 appears character-identically in 2 files \u2014 lib/features/settings/sources_screen.dart, lib/features/settings/widgets/settings_list_view.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f16b624f318399b97b7921de1c3b08709e1a5365663fce96a29ecfa563cfa93"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isMulti \u0026\u0026 state == DownloadButtonState.download\u0060 appears character-identically in 2 files \u2014 lib/features/game_detail/widgets/action_buttons_row.dart, lib/features/game_detail/widgets/download_action_button.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f25760764b77b19dee00d51002a48328e7c90bd5458bd9a70da36d88748f2f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key == LogicalKeyboardKey.gameButtonA || key == LogicalKeyboardKey.enter || key == LogicalKeyboardKey.numpadEnter || key == LogicalKeyboardK\u2026\u0060 appears character-identically in 6 files \u2014 lib/features/onboarding/widgets/ra_onboarding_screen.dart, lib/features/onboarding/widgets/romm_legacy_login_screen.dart, lib/features/pairing/manual_pairing_screen.dart, lib/features/pairing/qr_pairing_screen.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/onboarding/widgets/ra_onboarding_screen.dart"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"65e1a1613cfce866475e9f0775513c50b665b0a6f4779dcbd99b19d9bf626af8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key == LogicalKeyboardKey.gameButtonA || key == LogicalKeyboardKey.enter || key == LogicalKeyboardKey.select\u0060 appears character-identically in 2 files \u2014 lib/features/settings/sources_screen.dart, lib/features/sources/source_endpoints_screen.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/settings/sources_screen.dart"},"region":{"startLine":1060}}}],"partialFingerprints":{"codehealthFindingId/v1":"07de91bef9c1972b67a238bcf9c1d5aea4f0c0930d5415f9b27a8dd77de58915"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key == LogicalKeyboardKey.gameButtonA || key == LogicalKeyboardKey.enter || key == LogicalKeyboardKey.space\u0060 appears character-identically in 6 files \u2014 lib/features/game_detail/widgets/variant_picker_overlay.dart, lib/features/library/widgets/game_list_overlay.dart, lib/features/library/widgets/shelf_picker_dialog.dart, lib/features/library/widgets/system_selector_overlay.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe7250acacb38efa2a013d7a63b51af1b611baea2ecbe1cbab33829a59d5376"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key == LogicalKeyboardKey.gameButtonB || key == LogicalKeyboardKey.escape || key == LogicalKeyboardKey.backspace\u0060 appears character-identically in 6 files \u2014 lib/features/game_detail/widgets/variant_picker_overlay.dart, lib/features/library/widgets/game_list_overlay.dart, lib/features/library/widgets/shelf_picker_dialog.dart, lib/features/library/widgets/system_selector_overlay.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/variant_picker_overlay.dart"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae036f49dbd7b69ed17f499269f6c7b9f3bde5aa437a958114d9fe97fbe35f78"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key == LogicalKeyboardKey.gameButtonB || key == LogicalKeyboardKey.escape || key == LogicalKeyboardKey.goBack\u0060 appears character-identically in 9 files \u2014 lib/core/input/searchable_screen_mixin.dart, lib/features/onboarding/widgets/ra_onboarding_screen.dart, lib/features/onboarding/widgets/romm_legacy_login_screen.dart, lib/features/pairing/manual_pairing_screen.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/core/input/searchable_screen_mixin.dart"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9782388dac6c41e15dc6ede3309068f2d85b5a650d296e59bf4da9ef5e3340"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060next != null \u0026\u0026 (prev == null || prev.timestamp != next.timestamp)\u0060 appears character-identically in 2 files \u2014 lib/widgets/add_to_queue_toast.dart, lib/widgets/download_overlay.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/widgets/add_to_queue_toast.dart"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb642864bbfb6ed5e2456755b018429de6eb82012088e961504788f666ed58d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060s.host == p.host \u0026\u0026 s.share == p.share \u0026\u0026 s.port == p.port\u0060 appears character-identically in 2 files \u2014 lib/services/source_resolver.dart, lib/services/sources_notifier.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/source_resolver.dart"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa9bde27993e75429ebc135d18172418e80b1f339e9278544cfa7b473110dfd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060saved?.selectedIndex != null \u0026\u0026 saved!.selectedIndex! \u003E 0\u0060 appears character-identically in 2 files \u2014 lib/features/game_list/game_list_screen.dart, lib/features/library/library_screen.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_list/game_list_screen.dart"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18f1fea93e64a11de163b85109a51658a0b688352a7ae83be1d37f4eaa37da6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060source.type != SourceType.romm \u0026\u0026 source.type != SourceType.web\u0060 appears character-identically in 2 files \u2014 lib/services/config_parser.dart, lib/services/sources_notifier.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/config_parser.dart"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"e410785c3e41f3d43110a2a0ee3289199e20343fd68b8d7e0c08636540f2f65a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060system.multiFileExtensions != null \u0026\u0026 system.multiFileExtensions!.isNotEmpty\u0060 appears character-identically in 2 files \u2014 lib/services/download_service.dart, lib/utils/game_merge_helper.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/download_service.dart"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"07b48b8c1105573b6aebfb832e850c07c05cce79f8f6e57247ef842d19379c60"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060variantCount != null \u0026\u0026 variantCount! \u003E 1\u0060 appears character-identically in 2 files \u2014 lib/features/game_detail/widgets/action_buttons_row.dart, lib/features/game_detail/widgets/download_action_button.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/action_buttons_row.dart"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"14eeb7f855ea240bd36f8588e412a3b2f6a0da6f36cad014dcf6e498b5cb3eaa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060widget.isSectionFocused \u0026\u0026 index == clampedIdx\u0060 appears character-identically in 2 files \u2014 lib/features/game_detail/widgets/other_versions_section.dart, lib/features/game_detail/widgets/screenshots_carousel.dart. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/features/game_detail/widgets/other_versions_section.dart"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1842256769e98d2daa3cc5e60c9d2a1dcf56f559db5d76cb731880829ed00043"}},{"ruleId":"X2","level":"note","message":{"text":"Not all functions that make a request accept a CancelToken: Only 0/13 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 \u2014 a screen navigated away from, a disposed widget, a superseded search. Take a \u0060CancelToken? cancelToken\u0060 and hand it to the request as \u0060cancelToken:\u0060 (or hold one and cancel it in \u0060dispose\u0060); where nothing could ever cancel the call, omitting it is a deliberate choice \u2014 judge against how the function is used."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"767a6f188a93a9fdcf866e430f9755aeab7ca6acdd21a1a80f8ac4ef4cc6cf7c"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: fetchGameList: \u0060fetchGameList\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_api_service.dart"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a623bdb97f6b422a8ba4d001613c2b5c2125b62dc2cf59e292cefff5a0b8aa2"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: fetchGameHashes: \u0060fetchGameHashes\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_api_service.dart"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52e6caf9519052a579c1817f6c2228cb8f60a16466142463c2f716b59da26ad"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: fetchAchievements: \u0060fetchAchievements\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_api_service.dart"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82fb7d08d821a6bd11fbae934f24163185d5463a66074dcbad38a8f360d4722"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: fetchUserProgress: \u0060fetchUserProgress\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_api_service.dart"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cdd528f2e8751557994d5446a3c05ffb99e844d36e2522a978c9c42d2412964"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: lookupGameByHash: \u0060lookupGameByHash\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_api_service.dart"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a80b3eb048bda041958e4cc1223719f4f731994f6873684c9c2879b8cdf6a3a"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: testConnection: \u0060testConnection\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/ra_api_service.dart"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c941e393d1c64a6eb1bb9e7fff2136effffb8dd9ef559b1a92fbe3a7b37c6e"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: _scanWeb: \u0060_scanWeb\u0060 calls \u0060effectiveDio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/remote_folder_scanner.dart"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"a074917e3091b911387892804da59ce5f714faf261769dfb20e4eba0e8f94270"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: fetchPlatforms: \u0060fetchPlatforms\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_api_service.dart"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"539e08187df84b2a61cf95bb6eeed044e0e1b83c4f3fe77ce025769cb6058125"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: fetchRoms: \u0060fetchRoms\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_api_service.dart"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"b56bb61ae524c88e8c16ede39aad677037ca8909bdfad9c862630100f9db845d"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: testConnection: \u0060testConnection\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_api_service.dart"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c0339d25b36c6911b2bb5e121eb9624abe8d5f89f8775b79d044a7c3627f24"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: exchangeCode: \u0060exchangeCode\u0060 calls \u0060_dio.post(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_pairing_service.dart"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b29d98769ad957c85ee0b38ce144c5ae44a8693f2b301ce7c7f5c8226b49c2b"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: probeServer: \u0060probeServer\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_pairing_service.dart"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"6364a0ca1f958765f87ee21831d8ee5568c2da1eb78f19d8246b0611fd740f36"}},{"ruleId":"X2","level":"warning","message":{"text":"Function without a CancelToken: _scanDirectory: \u0060_scanDirectory\u0060 calls \u0060_dio.get(\u2026)\u0060 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 \u0060CancelToken? cancelToken\u0060 and pass it on as \u0060cancelToken: cancelToken\u0060 \u2014 or, in a widget\u0027s State or a notifier, hold one and cancel it in \u0060dispose\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/providers/web_provider.dart"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"882c5ef28d296b7144aca61be9119431990117f5162f0f5c72f0ac92cc4821fd"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (_)\u0060 takes every exception and records none of it \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/services/romm_pairing_service.dart"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca105e7721705b94b500e95100d021aedbc2cef2579118aa9160772f811cb64a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (e)\u0060 takes every exception and records none of it \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/game_metadata_info.dart"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"f51a5af598c78f5821f66b02ec4e5862a7c509a875e6a08315f8d58474bc3072"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060siblingList\u0060 turns every thrown error into \u0060[]\u0060 \u2014 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 \u0060catch\u0060 or in the \u0060///\u0060 doc, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"lib/models/game_metadata_info.dart"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be02781c38125f3d1a888dd2e9c39fe5b7051c7a2a2ed6f1ca6fed9bcf856b5"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-290","guid":"379b1e66-a292-7b59-aa1e-a5bb4a6a99e9","name":"Authentication Bypass by Spoofing","shortDescription":{"text":"Authentication Bypass by Spoofing"},"helpUri":"https://cwe.mitre.org/data/definitions/290.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":1,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}