{"$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":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"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"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"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":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"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"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"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"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"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":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"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":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"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":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.read (cyclomatic 59): SensorsReader.read has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent 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":"Modules/Sensors/readers.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c560cd8b1a664ba7005fad0bc0a9179091dea41c5364ea8b74a8f9e3fedd60"}},{"ruleId":"D1","level":"warning","message":{"text":"LineChartView.draw (cyclomatic 54): LineChartView.draw has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea5cdd7bcd60c5e8cc2e13694ed231a416684f0e8da3916538fc94364759a07"}},{"ruleId":"D1","level":"warning","message":{"text":"Network.usageCallback (cyclomatic 53): Network.usageCallback has cyclomatic complexity 53 (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":"Modules/Net/main.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9574e43e38b3dd53c83fc742cd8a73d0e6513fbbf6f79916c7fb78643373817"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.renderUsage (cyclomatic 52): Popup.renderUsage has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent 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":"Modules/Net/popup.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1c474e4fc48ca007242a9d628aa1cb7a79353fbc7e78ff87f4250283a6afd6"}},{"ruleId":"D1","level":"warning","message":{"text":"InfoReader.read (cyclomatic 42): InfoReader.read has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c48238682aaa68f784fba183bb53eafaf5c3bb6f6f28a2838a66a5a62a2bc18"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getDiskInfo (cyclomatic 41): SystemKit.getDiskInfo has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"33d82d702cd8533428acd1be3c55e570d9c32d64ead54ce5061895630c14d314"}},{"ruleId":"D1","level":"warning","message":{"text":"SMC.setFanMode (cyclomatic 39): SMC.setFanMode has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"SMC/smc.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5880ab3eda1eaffe300df13acdc48080a639e946be64a8ddead1ad70aa6196c"}},{"ruleId":"D1","level":"warning","message":{"text":"RAM.loadCallback (cyclomatic 37): RAM.loadCallback has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \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":"Modules/RAM/main.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"48e8d1fd1bd4e07182069958a019a1b4394cbf90f04a8022dbfa62ba02573252"}},{"ruleId":"D1","level":"warning","message":{"text":"DevicesReader.read (cyclomatic 36): DevicesReader.read has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Bluetooth/readers.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"556d73b3bc48e88ea0d0b26737c28aa2cedc7aea96badd89e82bade8f87461d8"}},{"ruleId":"D1","level":"warning","message":{"text":"Preview.usageCallback (cyclomatic 36): Preview.usageCallback has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/preview.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"910c843ca9b72c7dce06a607cd448e917a6e583579e5b5ed459bf3e783391cc0"}},{"ruleId":"D1","level":"warning","message":{"text":"i18n.translate (cyclomatic 34): i18n.translate has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"5074a49eca5ea7b33de5792580dd4b85786351727d006dce47dce1bd765839d7"}},{"ruleId":"D1","level":"warning","message":{"text":"widget_t.new (cyclomatic 33): widget_t.new has cyclomatic complexity 33 (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":"Kit/module/widget.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ad70f27280775414fffc208820a103b1242cb3b5d50b113d9e96010e5f9e06"}},{"ruleId":"D1","level":"warning","message":{"text":"SMARTReader.getATASMART (cyclomatic 33): SMARTReader.getATASMART has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"db6807e4f5a8cbed28ffa061a7545e7d71ca2e4b0ba04d6cd61512fe926ae4bf"}},{"ruleId":"D1","level":"warning","message":{"text":"BatteryWidget.draw (cyclomatic 30): BatteryWidget.draw 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":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c263cc0546a36ac1ea705d0ff8c9437a053ca1befafa7a65026684af249014e"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.getDetails (cyclomatic 28): UsageReader.getDetails 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":"Modules/Net/readers.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea65e76c708992106adf014f7f3c8dd053c6180ba394a74630ec4b40ebfee55e"}},{"ruleId":"D1","level":"warning","message":{"text":"BarChart.draw (cyclomatic 27): BarChart.draw 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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f4107dc5edab904d4101eb937fdc370e3e8feb4edb8bb6756a0c025b986ce9"}},{"ruleId":"D1","level":"warning","message":{"text":"Preview.capacityCallback (cyclomatic 27): Preview.capacityCallback 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":"Modules/Disk/preview.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c666a51161dc01f0adedbf5d2d32a098979f715ea240a494baafdaa1fc969b"}},{"ruleId":"D1","level":"warning","message":{"text":"SMC.getValue (cyclomatic 26): SMC.getValue has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \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":"SMC/smc.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"967e4573a63701a36f48457e0ac1cef620a2bc447b8218bf1f6298ab40ae61bf"}},{"ruleId":"D1","level":"warning","message":{"text":"DevicesReader.fetchPmsetAccessoryLevels (cyclomatic 26): DevicesReader.fetchPmsetAccessoryLevels has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Bluetooth/readers.swift"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f75fe7dfe09535fb30e67d544d979547c3de05b3670d42a5ce6a9b24e85fa4"}},{"ruleId":"D1","level":"warning","message":{"text":"CapacityReader.read (cyclomatic 26): CapacityReader.read has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"465ae8dc07e0a37b2b9124b0298fcbe9b37aae53a7e2ad157f64cb551c2a9eba"}},{"ruleId":"D1","level":"warning","message":{"text":"LoadReader.read (cyclomatic 25): LoadReader.read 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":"Modules/CPU/readers.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d653a3036aa33ef910f732af07e56b437b660f911ae3fcf3b299814a335bc5"}},{"ruleId":"D1","level":"warning","message":{"text":"FrequencyReader.read (cyclomatic 25): FrequencyReader.read 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":"Modules/CPU/readers.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a5a3b8ea8a43e9e2711819b036ff8fd07db031c63d94ce3b7a4695ab387904"}},{"ruleId":"D1","level":"warning","message":{"text":"Notifications.usageCallback (cyclomatic 25): Notifications.usageCallback 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":"Modules/Net/notifications.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"136667f45427964391cb7e5c80d7296bc7b5e316f0bc9dae45fe44386b8d0857"}},{"ruleId":"D1","level":"warning","message":{"text":"i18n.scan (cyclomatic 25): i18n.scan 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":"Kit/scripts/i18n.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e3e1e7f44242866394d54dfbed6867616fb67d254a9920f2fa0fabab59c1f5"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getPlatform (cyclomatic 24): SystemKit.getPlatform 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c97d96fc19fe6fcb2290b9b39fcd48d3e30e453352c93556c4a71101cc267f"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.read (cyclomatic 24): UsageReader.read 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":"Modules/Battery/readers.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"94204586c863a489b4e648360b136bb26e8504fed24df2b9294d3e9256ea061c"}},{"ruleId":"D1","level":"warning","message":{"text":"GPU.infoCallback (cyclomatic 24): GPU.infoCallback 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":"Modules/GPU/main.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc6cad9dbb0bea9962b2ddd77450c57b8d9717dc5fa5d23d4f3faa53f7101d4"}},{"ruleId":"D1","level":"warning","message":{"text":"CPU.loadCallback (cyclomatic 23): CPU.loadCallback 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":"Modules/CPU/main.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f1099b95373f63a80a0b121d86730fedff360a421a3fb26c7a4511251f984b"}},{"ruleId":"D1","level":"warning","message":{"text":"Portal.usageCallback (cyclomatic 23): Portal.usageCallback 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":"Modules/Net/portal.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"413d76890a30cc7ac7743556d6e6385e170a03c185cbc8bfa795a3a1423ec6d8"}},{"ruleId":"D1","level":"warning","message":{"text":"Disk.capacityCallback (cyclomatic 22): Disk.capacityCallback 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":"Modules/Disk/main.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc3b84c56673b1e3bc43384950df0e4d33d3096c1ac3e4247b443681a0fc8cd"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.initCalculatedSensors (cyclomatic 22): SensorsReader.initCalculatedSensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c802c1b49486106dbedcabd85f3869ab4de1f277c91be6213a68b601477da72"}},{"ruleId":"D1","level":"warning","message":{"text":"LineChart.draw (cyclomatic 21): LineChart.draw 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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"d062af33814fe8a45e8853a3a9481b00652d5f3bf1a645a42b95f5f1f599acc6"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getCPUCores (cyclomatic 21): SystemKit.getCPUCores 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52dd1078a1547c569df83e1c719561641c9673ec85f72d60cb4c2979a1db498"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.sensors (cyclomatic 21): SensorsReader.sensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd53c77f10de5e9a0597e71091acb7d529b9c238bfebd4801e567af90e92658"}},{"ruleId":"D1","level":"warning","message":{"text":"NetworkChart.draw (cyclomatic 20): NetworkChart.draw 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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d0a4a69fe586a403c3473bc0ca871313ded22ce8949bdde1d92003216df4d0"}},{"ruleId":"D1","level":"warning","message":{"text":"SMARTReader.read (cyclomatic 20): SMARTReader.read 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":"Modules/Disk/readers.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43e6094cf64bd0d1befc5373ecb0470c1db53d96ab33b9f3ae946ac44678062"}},{"ruleId":"D1","level":"warning","message":{"text":"ProcessReader.read (cyclomatic 20): ProcessReader.read 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":"Modules/Net/readers.swift"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"c721e30a49ac8a466dc2db2429942a8d5c0669ca4ec55ea4c0066e2de009d5d0"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard.processorValue (cyclomatic 20): Dashboard.processorValue 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":"Stats/Views/Dashboard.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"969721a14f8227c1adfeab31135aec80987b73d299d1cf5d50c4478d16199dbb"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.renderUsage (cyclomatic 19): Popup.renderUsage 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":"Modules/Battery/popup.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d71387764214e3e63d957842a3df41705ce252cde56e1e50ecd7e34a6fc2b50"}},{"ruleId":"D1","level":"warning","message":{"text":"ActivityReader.read (cyclomatic 19): ActivityReader.read 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":"Modules/Disk/readers.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"e20da346a05db0e88cc1eb1a580dca431ad7fe66b652a13064dd23df27648c61"}},{"ruleId":"D1","level":"warning","message":{"text":"SMJobBlessUtil.setreq (cyclomatic 19): SMJobBlessUtil.setreq has cyclomatic complexity 19 (threshold 15). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/SMJobBlessUtil.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c5ace4f4a10032aba63ed3c01c0b98255ff6370897fb57d2859a30dcba2f6d3"}},{"ruleId":"D1","level":"warning","message":{"text":"WidgetSelectorView.mouseDown (cyclomatic 18): WidgetSelectorView.mouseDown 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":"Kit/module/window.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"73fe4860c9549853413d8ef5d9e47b7746fe2eadecaf6595dce21739f29b6f5b"}},{"ruleId":"D1","level":"warning","message":{"text":"InfoReader.readANEPower (cyclomatic 18): InfoReader.readANEPower has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/reader.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c99881a4b05bfc7770aafbafee9076b47c4f7cde4fcac345837f87b8df4bdf"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.callback (cyclomatic 18): Popup.callback 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":"Modules/Remote/popup.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa78176f7a5a09592e36fd02c43ff78c99a39feea46be1686bfaf52bed50bf6c"}},{"ruleId":"D1","level":"warning","message":{"text":"Popup.setup (cyclomatic 18): Popup.setup 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":"Modules/Sensors/popup.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"56699e3dad5787a99702f6d3d5b070c4e5b8f52d5fe6503c2003d34e53048128"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard.memoryValue (cyclomatic 18): Dashboard.memoryValue 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":"Stats/Views/Dashboard.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea59d15bb309d23f3853e855c425b44a2d2747b5a42e6faa3ab901d551aec47"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.parseArguments (cyclomatic 17): AppDelegate.parseArguments 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":"Stats/AppDelegate.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd670709e25c5af42a98b5b5586813b7ff30361831965d37856b3a54e592470"}},{"ruleId":"D1","level":"warning","message":{"text":"Provider.getTimeline (cyclomatic 17): Provider.getTimeline has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Widgets/UnitedWidget.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c14a688c3af6a44818e5fca9b356b06b45fe3d48ab92bde95f6ecdef2862a9"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemStats.command (cyclomatic 17): SystemStats.command 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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f4f1b3423481b44b663dec73613caa66332d5d0e92407810b92aef6d20dc7c"}},{"ruleId":"D1","level":"warning","message":{"text":"CalendarView.generateDays (cyclomatic 17): CalendarView.generateDays 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":"Modules/Clock/popup.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de976b0d7c3a97ea1f731d1b2749435b9a3b87130df84ac2ffcfdb96b7cd6d9"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.physicalInterface (cyclomatic 17): UsageReader.physicalInterface has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"6053f9fbdb878c83436661c2cccf32e6bcccd90b9f176f16e5f7f03b2e17a08f"}},{"ruleId":"D1","level":"warning","message":{"text":"UsageReader.getWiFiDetails (cyclomatic 17): UsageReader.getWiFiDetails 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":"Modules/Net/readers.swift"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d5b23b0c5fe5d1a0a75cda39fa5f62d6886d7d50a7cd418de396296f15b14ad"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.initHIDSensors (cyclomatic 17): SensorsReader.initHIDSensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"b00f8e5ed992a51dfad6b48cdad8e21ff34f1bf20e192e6d56131a8c37883bd6"}},{"ruleId":"D1","level":"warning","message":{"text":"SensorsReader.IOSensors (cyclomatic 17): SensorsReader.IOSensors 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":"Modules/Sensors/readers.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"f225ff21494a370f9f096303e3bcc83674710dbef924e73541126b77ccddc717"}},{"ruleId":"D1","level":"warning","message":{"text":"SystemKit.getIcon (cyclomatic 16): SystemKit.getIcon has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52a4f7ba8877c70c44ff89044725149523ce0dce11620c79c3104e77c619a86"}},{"ruleId":"D1","level":"warning","message":{"text":"Sensors.usageCallback (cyclomatic 16): Sensors.usageCallback 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":"Modules/Sensors/main.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f43f9d65eb7270084b2a6a029c50f16fb3810a2f808901ce38fa5d57e4467bd7"}},{"ruleId":"D1","level":"warning","message":{"text":"NSTextView.performKeyEquivalent (cyclomatic 16): NSTextView.performKeyEquivalent 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":"Kit/extensions.swift"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b42dd3d305420d999c170fcf6960847ea6551a688936cd68c5f4cb6219e94b4"}},{"ruleId":"D1","level":"warning","message":{"text":"i18n._extract_translation (cyclomatic 16): i18n._extract_translation 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":"Kit/scripts/i18n.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"5698e3d48723736c97675a7460fe5e94aaae0fc5eafe0450d6c83863fb6e7e7e"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getDiskInfo (cognitive 134): SystemKit.getDiskInfo has cognitive complexity 134 (threshold 15). Drivers by points: if/else 28 (115 pts), boolean chains 10, loops 2 (8 pts), error handling 1 (nesting depth added 93). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"999b1dd85d15d00cacee08b443316196759c558bb312d41471397c11b84e0ae6"}},{"ruleId":"D2","level":"warning","message":{"text":"CapacityReader.read (cognitive 98): CapacityReader.read has cognitive complexity 98 (threshold 15). Drivers by points: if/else 21 (93 pts), boolean chains 4, loops 1 (nesting depth added 72). 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":"Modules/Disk/readers.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d563a8aec3f3b5167370dd2fcc68bbaafb0ab1369e344b03f13ac0e7b0894c7"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.read (cognitive 97): SensorsReader.read has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (72 pts), boolean chains 21, loops 3 (4 pts) (nesting depth added 39). 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":"Modules/Sensors/readers.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee3934278a3a6f35f4ae612c8e1529507f8aa192bb5319520a91240d1286591a"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChartView.draw (cognitive 94): LineChartView.draw has cognitive complexity 94 (threshold 15). Drivers by points: if/else 23 (43 pts), ternaries 13 (28 pts), loops 8 (13 pts), boolean chains 10 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"b935fea7326220cd6c79e6c377479f06a5ee3e4fe981e06a489cdc0e765748be"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.renderUsage (cognitive 93): Popup.renderUsage has cognitive complexity 93 (threshold 15). Drivers by points: if/else 41 (79 pts), boolean chains 14 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/popup.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"40847991b93e5946cfc3254e6300e9889b303efb8897833b00ed980c6ae338de"}},{"ruleId":"D2","level":"warning","message":{"text":"InfoReader.read (cognitive 84): InfoReader.read has cognitive complexity 84 (threshold 15). Drivers by points: if/else 31 (72 pts), boolean chains 8, loops 3 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent 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":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a531ecbb4140ab6cf74e2d1caecae49ce9dc1f9ef3d056431a4d9084f75e89"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.translate (cognitive 77): i18n.translate has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (56 pts), boolean chains 7, loops 4 (6 pts), ternaries 2 (6 pts), error handling 1 (2 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4be8c8be9cfd6d73f681e6a250f5d53bf30a7485c0b733d7e7e0d4396d2f10a"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.usageCallback (cognitive 76): Preview.usageCallback has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (63 pts), boolean chains 13 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/preview.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bb62fd4fc3ba52dc973aee98c9a9c708ed6995ebf5e3c7ef1e5a4bc6b1aecf2"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.capacityCallback (cognitive 69): Preview.capacityCallback has cognitive complexity 69 (threshold 15). Drivers by points: if/else 17 (47 pts), ternaries 6 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 42). 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":"Modules/Disk/preview.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ba90af71f17a937a92275eba78c326cdde5a0da4ebb9934d59eb9342e60f36"}},{"ruleId":"D2","level":"warning","message":{"text":"Network.usageCallback (cognitive 58): Network.usageCallback has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 8 (21 pts), if/else 15 (20 pts), ternaries 4 (14 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/main.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffda922537a15bf06741e30a52e8a33764afc9cb5e189c9931e1d20d18c6c743"}},{"ruleId":"D2","level":"warning","message":{"text":"SMARTReader.read (cognitive 57): SMARTReader.read has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (52 pts), boolean chains 4, loops 1 (nesting depth added 37). 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":"Modules/Disk/readers.swift"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"134a07cf78df8cc0853b20272e8423f979fbb42012737d2fc5bd24b1c0ed61f4"}},{"ruleId":"D2","level":"warning","message":{"text":"ActivityReader.read (cognitive 56): ActivityReader.read has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (51 pts), boolean chains 4, loops 1 (nesting depth added 37). 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":"Modules/Disk/readers.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"5609c937a351dac6429c2639b9047031ce0780ed38c53cb56aa9ea7d89893cc2"}},{"ruleId":"D2","level":"warning","message":{"text":"Notifications.usageCallback (cognitive 56): Notifications.usageCallback has cognitive complexity 56 (threshold 15). Drivers by points: if/else 26 (56 pts) (nesting depth added 30). 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":"Modules/Net/notifications.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e0de755582fa16b18962bb8093810c68c71a4e9bd314ed843d6f1ea38803ff"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.scan (cognitive 54): i18n.scan has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 8 (19 pts), error handling 1 (4 pts), boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"66039eea09005c9baf9e4fdddfddd2618c98f6cf36be1980e1bf259741f87d62"}},{"ruleId":"D2","level":"warning","message":{"text":"SMC.setFanMode (cognitive 52): SMC.setFanMode has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 16 (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":"SMC/smc.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"9225d475d4055a7c0c02b56e25eb0e0bcc861c7d5ccca8dd743e763c7f4135b7"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getCPUCores (cognitive 50): SystemKit.getCPUCores has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (32 pts), match/switch 2 (12 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"19614ee730c3167ea47b6595352c66fd8b338b72641cb9576f1d9fdb180fe341"}},{"ruleId":"D2","level":"warning","message":{"text":"LoadReader.read (cognitive 48): LoadReader.read has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 2 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/readers.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"df302ce1247103669946572e8f18098a90dcd47bf5e8e4c5a4a03a8fd95052e9"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.fetchPmsetAccessoryLevels (cognitive 46): DevicesReader.fetchPmsetAccessoryLevels has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 4 (12 pts), loops 5 (7 pts), boolean chains 6 (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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"214e57bca0736b0fd630b3dd6f953558581c0cd32a9da35527da71f7efd4d871"}},{"ruleId":"D2","level":"warning","message":{"text":"CPU.loadCallback (cognitive 46): CPU.loadCallback has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 3 (14 pts), loops 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"de561a08a5b02d0655fa0194a492f2c09ca54b57763d0f1baf25758040301313"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getRamInfo (cognitive 45): SystemKit.getRamInfo has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (37 pts), loops 1 (5 pts), boolean chains 2, error handling 1 (nesting depth added 32). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"6880cc6d94c9cf24cf290ad53147fdb39c4b16e2d3cf75e94d3070ef2adcc735"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.fetchProfilerDevices (cognitive 45): DevicesReader.fetchProfilerDevices has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 4 (18 pts), boolean chains 2, error handling 1 (nesting depth added 31). 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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"049df17581c2ac226984dfc67a881a66e653b8b91ac226e685a7d0caffd1ee52"}},{"ruleId":"D2","level":"warning","message":{"text":"SMARTReader.getATASMART (cognitive 45): SMARTReader.getATASMART has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (32 pts), loops 5 (7 pts), boolean chains 5, ternaries 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":"Modules/Disk/readers.swift"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"74fc247e9eec92263119750fd71f34ed75aef0eab2c38fed0079b94783e084e0"}},{"ruleId":"D2","level":"warning","message":{"text":"BarChart.draw (cognitive 44): BarChart.draw has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 5 (17 pts), if/else 10 (16 pts), loops 3 (5 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d395eedab5fa275c80591f533db13e0491af0c2ba119a16185ac0eb976cfdb"}},{"ruleId":"D2","level":"warning","message":{"text":"BatteryWidget.draw (cognitive 44): BatteryWidget.draw has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 6 (12 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb5506d0cccf00962cf9a85403edef5877d3912a09c978f5633166f5ededd71"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.read (cognitive 42): DevicesReader.read has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 12, loops 1, ternaries 1 (nesting depth added 7). 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":"Modules/Bluetooth/readers.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d812969e66edaa32f96e35d2cb691fa2bc1bfb4767da619c525825ddcf8b73"}},{"ruleId":"D2","level":"warning","message":{"text":"FrequencyReader.read (cognitive 41): FrequencyReader.read has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 5 (7 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/readers.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b572f9b1c7c200c77df46454d2795a2a6175095af7c74f36f6ea24f76c54bd5"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getPlatform (cognitive 39): SystemKit.getPlatform has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28 (39 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb80615e613b8f310fddaa1a4882ef635438c18d00264ffebdba84a19b0e6d29"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.getDetails (cognitive 35): UsageReader.getDetails has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 12, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c576f9affdcb9a1b1c3201150bd15cda7ce897349db46f752dc6f580e621bb1"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.memoryValue (cognitive 35): Dashboard.memoryValue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Dashboard.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b069a2edf51e7cf2dc398bb393a3634051ac5060555514d330e0ee7d355e9b"}},{"ruleId":"D2","level":"warning","message":{"text":"NSTextView.performKeyEquivalent (cognitive 35): NSTextView.performKeyEquivalent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (32 pts), match/switch 1 (3 pts) (nesting depth added 23). 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":"Kit/extensions.swift"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"6616619f0900805717555ae6dec3f8917a1a5ea7a179644950b427121f94e8c1"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getDisplayInfo (cognitive 34): SystemKit.getDisplayInfo has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 7 (14 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":821}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d8a2bcf5ed84279c7285921d39fa857ab9c005792f1cf262577d0e4e16f628d"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.renderUsage (cognitive 33): Popup.renderUsage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 4 (9 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2247008017d3a27e6326ef216b34674e8974f14b35c2505b22ce3e99f68c49"}},{"ruleId":"D2","level":"warning","message":{"text":"Disk.capacityCallback (cognitive 32): Disk.capacityCallback has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 4 (10 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/main.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8d85ce4797b960e036c48359886d1037176e49cf944cd1083845285ea25678"}},{"ruleId":"D2","level":"warning","message":{"text":"Portal.usageCallback (cognitive 32): Portal.usageCallback has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 10 (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":"Modules/Net/portal.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f645a14de864c10f8989e7e1dfcda3e646ed68d69a2e2c4bd4f3d4795d51e8"}},{"ruleId":"D2","level":"warning","message":{"text":"RAM.loadCallback (cognitive 32): RAM.loadCallback has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 5 (12 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/RAM/main.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e677fa5745b1b4dd35eb19edae22c0ce2865b3a2923a01df360b31bb5d87b06"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.processorValue (cognitive 32): Dashboard.processorValue has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 5 (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":"Stats/Views/Dashboard.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d559e0fe2ac523d9ddbceae6ad19460df234f5a63e80d0fbd3253089aae1ced"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChart.draw (cognitive 31): LineChart.draw has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/LineChart.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d70394082d6a8356357c8c1f85f607357a081b047fb853835b192bd972e5d34"}},{"ruleId":"D2","level":"warning","message":{"text":"Portal.callback (cognitive 29): Portal.callback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (8 pts), loops 2 (6 pts), boolean chains 5 (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":"Modules/CPU/portal.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"898485728d3b5b420b0ec7ab667d2b46ba1131345087169e16b74dcfaf3fcdbe"}},{"ruleId":"D2","level":"warning","message":{"text":"BarChart.init (cognitive 28): BarChart.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 1 (nesting depth added 14). 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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a5d97342319e586ce5aa8a803eb4b26b95f9b222e2c940d9fe79ae7e939804"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessReader.read (cognitive 28): ProcessReader.read has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"371a27de4790c0c7c831558db9b14353dc193c0d51187f7fa5abd390bb72e83f"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.initHIDSensors (cognitive 28): SensorsReader.initHIDSensors has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (5 pts), boolean chains 4, 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":"Modules/Sensors/readers.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"719e33c5b8fef1386d3b3a129ac1e0faab2bcca1e8af28f6008a37f466a30989"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.parseArguments (cognitive 27): AppDelegate.parseArguments has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6 (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":"Stats/AppDelegate.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"141fcf47a9d04d6ad8563b96ab0b0431099e9f14a7dbd22abe10d405a71e6e07"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemStats.command (cognitive 27): SystemStats.command has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemStats.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"9febb3ca3f4f4f2aae674941daf8e598bc7a0f41e0791301974497d1ac57ef7b"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.getWiFiDetails (cognitive 27): UsageReader.getWiFiDetails has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d3417b2c5e1dd1261d76f001240085fcdd22788a6f21684814cbb3095fae268"}},{"ruleId":"D2","level":"warning","message":{"text":"WidgetSelectorView.mouseDown (cognitive 26): WidgetSelectorView.mouseDown has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/window.swift"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6f74b56bee6900ee172aa06cdfa4b05f204c7da26aafbe06b26ad48364bb1e"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.read (cognitive 26): UsageReader.read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 7, ternaries 2 (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":"Modules/Battery/readers.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9262a137021202839b6a480f3f0797d9a7bab0f8bdbab8d1e92b530016a1fd93"}},{"ruleId":"D2","level":"warning","message":{"text":"Sensors.usageCallback (cognitive 26): Sensors.usageCallback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, 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":"Modules/Sensors/main.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3e7cd0f77562b2789e456696e9e6edf3ddd17f290e6aa51840346ca8ca24127"}},{"ruleId":"D2","level":"warning","message":{"text":"SMJobBlessUtil.setreq (cognitive 26): SMJobBlessUtil.setreq has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 4 (nesting depth added 8). This file\u0027s own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes \u2014 or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/SMJobBlessUtil.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"c56b75d0fca76d3ffed9aa9e6178f8f044b278e8c250bbd60bb5d59e08815001"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getFrequencies (cognitive 25): SystemKit.getFrequencies has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3, 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d695aaa1b0800237985e6f7bd8e3adf166e96c11e85a11935b6b92a44245cef"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.setup (cognitive 25): Popup.setup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/popup.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44ffc1f59077a9a96d7c287314e7cbda9af1a6b923d7a69734c7764274fdf6b"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.check (cognitive 25): i18n.check has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc5d9cb4c8a40a506b7f9d1d810425b3c950e643b401bb681e639d654e763e1"}},{"ruleId":"D2","level":"warning","message":{"text":"widget_t.new (cognitive 24): widget_t.new has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/widget.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d13ad257bac88b9f30becba209561f4a19df5de8ab266a687a9bf6409991756"}},{"ruleId":"D2","level":"warning","message":{"text":"ModuleSelectorView.mouseDown (cognitive 24): ModuleSelectorView.mouseDown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/AppSettings.swift"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ff68d8d9de3af967cda6da876d5043990075a29806339ad90c6a11746f526d7"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.displaysValue (cognitive 24): Dashboard.displaysValue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Dashboard.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c2cecec2a3eea9e0245a478436653f4a5f96b991dacf5e2be9aa5e78760a74f"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeedWidget.init (cognitive 23): SpeedWidget.init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 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":"Kit/Widgets/Speed.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f6875309517dab9f0580b458c351e484c752044e2363199ab04d365ac90de3"}},{"ruleId":"D2","level":"warning","message":{"text":"ColumnChartView.draw (cognitive 23): ColumnChartView.draw has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (9 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":1277}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b27351df61324fe4751929a90c4a4c68816c6a287b9c9337555b4552d88b9ec"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.callback (cognitive 23): Popup.callback has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, loops 3 (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":"Modules/Remote/popup.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1cfb31f3855604f13db647338fc3c08e91f782fa020c2b7df9c249f43e302c"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.sensors (cognitive 23): SensorsReader.sensors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, loops 2, match/switch 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":"Modules/Sensors/readers.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42276eb4f93ddd3c76311628c3268c7dba7343e5e1c011cb2a7fa5917225175"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.initCalculatedSensors (cognitive 23): SensorsReader.initCalculatedSensors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/readers.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b171103c5823a318cb03bdd69df10c4f2509a9c9961cf24a7008e65d333cde8"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChart.init (cognitive 22): LineChart.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/LineChart.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf400d60c5972c798b913f83426534a3d8a07d6a74751b36408d5d7d38676a74"}},{"ruleId":"D2","level":"warning","message":{"text":"Mini.init (cognitive 22): Mini.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (22 pts) (nesting depth added 12). 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":"Kit/Widgets/Mini.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a578bbe4b9aa52bb02d061600970a8cfb8b9a38a75eb5f8082c45b42c4b6d65"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkChart.draw (cognitive 22): NetworkChart.draw has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 8, loops 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8472bcca4c95fdd65a9efa1abfbf5e323172a66a9c116e90005506f0218735d"}},{"ruleId":"D2","level":"warning","message":{"text":"module_c.init (cognitive 22): module_c.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/module.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"f396e156f3e3a71d4c467407ed7637c847ba6f9faddd43cf566fd911cfde9325"}},{"ruleId":"D2","level":"warning","message":{"text":"GPU.infoCallback (cognitive 22): GPU.infoCallback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (5 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/main.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0849bdaaadbc9f975eac8cee24e51eb111550519c56022c095b1ba12284de08"}},{"ruleId":"D2","level":"warning","message":{"text":"FanView.update (cognitive 22): FanView.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 10). 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":"Modules/Sensors/popup.swift"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b585aa9349b7dfaf2f894ec434b0e31a4e0ed12b5da33bac3847c6d2ee9bb8"}},{"ruleId":"D2","level":"warning","message":{"text":"StackWidget.draw (cognitive 21): StackWidget.draw has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Stack.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a08abc282ab643eb593e392f2b3bef9f82c59be077b1346e57139a63507c90e"}},{"ruleId":"D2","level":"warning","message":{"text":"Module.listenForModuleToggle (cognitive 21): Module.listenForModuleToggle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). 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":"Kit/module/module.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"f427f2d4d37c091917dfed06c4b85b57196ad192b054ce8e6ed0c8a29747c00d"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.smartCallback (cognitive 21): Preview.smartCallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (9 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/preview.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ee0611b4656cbd2c7b848366ca78fb6657cd43c8fa6a5a11c4364498ece48c"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.physicalInterface (cognitive 21): UsageReader.physicalInterface has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (9 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"42af532a8357cc2eb8becfe40910621cec7fb9870801a691d3e404bb06b66872"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard.graphicsValue (cognitive 20): Dashboard.graphicsValue has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Dashboard.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd063988dd26f6bf55360b335ca8730a798d2fb953bd7c4223b6c2b83918a5c"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n._extract_translation (cognitive 20): i18n._extract_translation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"a178c90d9dadd429fdbd8918e1d0aa7ddbddd921b1c9369743f460bd5aa2fb16"}},{"ruleId":"D2","level":"warning","message":{"text":"i18n.dictionary (cognitive 20): i18n.dictionary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/scripts/i18n.py"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee972f599188cdf9928e83c88c3ab02305f914d236c589995a2d5301cf87b368"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteAuth.pollForToken (cognitive 19): RemoteAuth.pollForToken has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9f97f8daaee3bb63c8bb13bc5c93f91fac83a7a9b472458a6aa969144b47d4"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.renderLoad (cognitive 19): Popup.renderLoad has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 5, boolean chains 4, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/popup.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"194eebaf4ed1ff2ae76147aaf8bc276a927b3f9c636d5397d70cfcd0b7e683c3"}},{"ruleId":"D2","level":"warning","message":{"text":"CalendarView.generateDays (cognitive 19): CalendarView.generateDays has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 4 (6 pts), ternaries 4, boolean chains 3 (nesting depth added 3). 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":"Modules/Clock/popup.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"73ebf18f04bf588e405d2075983a4eeeee361dced8f26c7400afe941511642e5"}},{"ruleId":"D2","level":"warning","message":{"text":"SMCHelper.install (cognitive 18): SMCHelper.install has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (5 pts), match/switch 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":"Kit/helpers.swift"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe3cf132701009a1ceca204c5e54a2989b93d35973e26e15690e78b7fb6d328"}},{"ruleId":"D2","level":"warning","message":{"text":"Module.listenForPopupToggle (cognitive 18): Module.listenForPopupToggle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/module.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b54566ed4ef5c3ebab5ba9de39b8d89017dc9c1c2bf226001c64658d729c764"}},{"ruleId":"D2","level":"warning","message":{"text":"DevicesReader.cacheDevices (cognitive 18): DevicesReader.cacheDevices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Bluetooth/readers.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cad73b0b3b1ce1ca3dcf3c5fbe8b2ec91cc1e836ea8747f3fcfad447663ce59"}},{"ruleId":"D2","level":"warning","message":{"text":"CapacityReader.diskSpaceInBytes (cognitive 18): CapacityReader.diskSpaceInBytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, error handling 2 (nesting depth added 7). 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":"Modules/Disk/readers.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bddd3ed40b181a720737b2d372d251b0a019ee016fc029f4618d0f40e313b4f"}},{"ruleId":"D2","level":"warning","message":{"text":"SensorsReader.IOSensors (cognitive 18): SensorsReader.IOSensors has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, loops 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":"Modules/Sensors/readers.swift"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef347e61102187182ff5182c2a504bb79477c8d2e70a8b96fe3072b257a7a17"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryWidget.init (cognitive 17): MemoryWidget.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (17 pts) (nesting depth added 10). 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":"Kit/Widgets/Memory.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbd77a3bf54b20f756bd1a974c88585dfb547e4606cd7f32598fed3eddf6e7f"}},{"ruleId":"D2","level":"warning","message":{"text":"LineChartView.addValue (cognitive 17): LineChartView.addValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 4, loops 1 (3 pts), ternaries 3 (nesting depth added 3). 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":"Kit/plugins/Charts.swift"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f731abc810d4098878d14ba8b86291de8660ae3be69f6467f1a26c75780c43"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemKit.getGPUInfo (cognitive 17): SystemKit.getGPUInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts), error handling 1 (nesting depth added 10). 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"5329ce74e1f241ac4b2b86ce3657e9f3af551f0741bb654c2748be1765708499"}},{"ruleId":"D2","level":"warning","message":{"text":"Notifications.callback (cognitive 17): Notifications.callback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Bluetooth/notifications.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cb69bb1a90868709b96d65b10bc8dd843b45752116030cf0590871d392f8f8"}},{"ruleId":"D2","level":"warning","message":{"text":"Preview.loadCallback (cognitive 17): Preview.loadCallback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/preview.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"9634818e15d5cdbe961c8bef3287fb052854c1ea1440eb2130ad781e7c18b222"}},{"ruleId":"D2","level":"warning","message":{"text":"InfoReader.readANEPower (cognitive 17): InfoReader.readANEPower has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent 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":"Modules/GPU/reader.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"da472789f6c0d8f5a97a5d45058169ef8ed14290b60f2ff1cb77afc7e4b4fa82"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageReader.getPublicIP (cognitive 17): UsageReader.getPublicIP has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"267722e1499a1744faebb646332054678bcf518b81602c18bce9ff9a3743174b"}},{"ruleId":"D2","level":"warning","message":{"text":"ProcessReader.read (cognitive 17): ProcessReader.read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 2, error handling 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, 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":"Modules/RAM/readers.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3bae5e97cccbf59eae7a8fefbd710dd8a85e306993a301c099eec5f2823995"}},{"ruleId":"D2","level":"warning","message":{"text":"Provider.getTimeline (cognitive 16): Provider.getTimeline has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Widgets/UnitedWidget.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"f579bc067b9fe9fa62afdb4817c3b39d2f8f1d5d8b0f6713f344a4938cf186bb"}},{"ruleId":"D2","level":"warning","message":{"text":"GaugeChartView.draw (cognitive 16): GaugeChartView.draw has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 4 (5 pts), boolean chains 3, loops 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":"Kit/plugins/Charts.swift"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06c7237babd2249000d4ff9ac91284884f1279b8e79964aba0b4e70d4a5f248"}},{"ruleId":"D2","level":"warning","message":{"text":"Updater.install (cognitive 16): Updater.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (4 pts), 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":"Kit/plugins/Updater.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d698c16e0b1a8784e3abe37209006f46f7d3118607315b9eeab5bd2c710102"}},{"ruleId":"D2","level":"warning","message":{"text":"BatteryView.draw (cognitive 16): BatteryView.draw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 1 (2 pts), ternaries 1 (2 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":"Modules/Battery/popup.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f73573c98116053d01a0fcb3351694cbf9d485aaac9e3524230af8f74ca9bf"}},{"ruleId":"D2","level":"warning","message":{"text":"TemperatureReader.read (cognitive 16): TemperatureReader.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6 (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":"Modules/CPU/readers.swift"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b195346a2a89e8568cc044810d001d786241ff96bfcd3b3473a79315f17d3fa"}},{"ruleId":"D2","level":"warning","message":{"text":"Popup.toggleInterfaceDetails (cognitive 16): Popup.toggleInterfaceDetails has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/popup.swift"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"5884a7491ffb2a99ec07eeef257d9e990c387b744ef67647f0d229e94d125562"}},{"ruleId":"D2","level":"warning","message":{"text":"NetworkWidget.body (cognitive 16): NetworkWidget.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/widget.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d2de216e3f089ea11a685ea1d60b082a2d499218f3c9d827ceeedf3c0f6e339"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteList.update (cognitive 16): RemoteList.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/settings.swift"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a1fd21fc582dcaaa676e5d8d463f577210e4336ab03cc7015e82cb26c94bd7"}},{"ruleId":"D2","level":"warning","message":{"text":"FanView.setupControls (cognitive 16): FanView.setupControls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/popup.swift"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0c1d409b27e22ae2cadd208b6e3d598b429890a96bfa6466c8a36177272af4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Kit/helpers.swift: FileTooLong \u2014 1664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1164 over it, 3.33\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":"Kit/helpers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd235e868d0267dc23007a893290dd993468ada08a2d2d070787d13d08566bb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugins/Charts.swift: FileTooLong \u2014 1091 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 591 over it, 2.18\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":"Kit/plugins/Charts.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"669a9ad3743d70a362ec37e4483d15b0bbd748d497acad9825738320910fd232"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LineChartView.draw: MethodTooLong \u2014 draw runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02\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":"Kit/plugins/Charts.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"78776b7ece548e92eccfb7ba5cbb72cf056852da12fd541b0f40a1ce8d68df3c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugins/SystemStats.swift: FileTooLong \u2014 938 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 438 over it, 1.88\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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cfdf1a2ff64317adb469ab3d651b5efc4bd4a9f6ad5d7988a066cd4bed31151"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Sensors/popup.swift: FileTooLong \u2014 869 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 369 over it, 1.74\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":"Modules/Sensors/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a94681e7c110a37f013ad4f245336d7154e9532801b2509bfa0ff8a89785bd"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Popup: ClassTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 244 over it, 1.61\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":"Modules/Net/popup.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"4329f2c5f5324597b251989d16b5f7fcf6061ba8440f88830c8a1e4994f1701a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BatteryWidget.draw: MethodTooLong \u2014 draw runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8000f6115e4261d61de3e0d6efeef1a93683cd7fcaade93cfb62e193b301f6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Net/readers.swift: FileTooLong \u2014 797 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 297 over it, 1.59\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":"Modules/Net/readers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd71ef6787178369af132a3199736e4112c5f4307cc5b4b50d6290840bccc74a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: plugins/SystemKit.swift: FileTooLong \u2014 703 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: SystemKit (216-875). The bar is 500 significant lines; this is 203 over it, 1.41\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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"48dc6cea3d4e6a40e4b1bbe5ec9c5e1cae8ef8d9d1deb4f55d3fedd020d0f0d1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Clock/popup.swift: FileTooLong \u2014 698 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 198 over it, 1.40\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":"Modules/Clock/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8871b778445b5a6489f5b02cc4c824e56b2631ac3faf28a971a246ac2bc5d6a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Net/popup.swift: FileTooLong \u2014 646 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Popup (16-928). The bar is 500 significant lines; this is 146 over it, 1.29\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":"Modules/Net/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de664dd3186696c9e4eac490ad7f9f0b91cab2bafee1e798351c80de6347bc3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Kit/extensions.swift: FileTooLong \u2014 643 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 143 over it, 1.29\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":"Kit/extensions.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b8b4271f93cc03edfa04b7d5b964fab820d48dd503967ed22a4d6c0535af70"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Popup.renderUsage: MethodTooLong \u2014 renderUsage runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\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":"Modules/Net/popup.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb2845c4a0df992103a259f12e356f0d01b948bf8c6ac9f70025e85f48678f4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SpeedWidget: ClassTooLong \u2014 494 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 94 over it, 1.24\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":"Kit/Widgets/Speed.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf8dad2b18835892b45cd825d5484b27df6f78c161932f2a09f109ee8490587"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Popup: ClassTooLong \u2014 488 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 88 over it, 1.22\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":"Modules/CPU/popup.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53a43b7683155a6c5bfc830448fc42f30ac004c7045f73ee9feecd334f4c5d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Disk/popup.swift: FileTooLong \u2014 604 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 104 over it, 1.21\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":"Modules/Disk/popup.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"606559c080c5906c75355b92ff0a8f1b58c82efc608808ec04c9a4960acfefd7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ApplicationSettings.init: MethodTooLong \u2014 init 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":"Stats/Views/AppSettings.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9904f96563b9776a45ee5549783641602e9dda51b7750ede5e681615467672a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Popup: TooManyMethods \u2014 35 methods. The bar is 30 methods; this is 5 over it, 1.17\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":"Modules/CPU/popup.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a2b612535f5a975c9bb693f3c41ff791c5a5a672bc90bb826e1b348a98eb2c6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SystemKit: ClassTooLong \u2014 457 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 57 over it, 1.14\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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e0212b76656c8f5c4378bb131ea6384a9a403a43ab209ef914e93c94e918f63"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Popup: TooManyMethods \u2014 34 methods. The bar is 30 methods; this is 4 over it, 1.13\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":"Modules/Net/popup.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"345e5a4805979b3b991c0d67687496399397c0e1080436f778ae06aa902a6ad2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NetworkChart.draw: MethodTooLong \u2014 draw 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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5efe0d5f7322a019592e5534e31b9f2c3531159d13557c4bdd15642514965cab"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: scripts/i18n.py: FileTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 56 over it, 1.11\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":"Kit/scripts/i18n.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc4cf52d45b27f3590ebd57b18a290821b489a1c194aab332140260e9933533"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ApplicationSettings: TooManyMethods \u2014 32 methods. The bar is 30 methods; this is 2 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":"Stats/Views/AppSettings.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ebdc40d507586de0934353e0ad6afb68eee400a38d5be3ff499383e7b68659"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: InfoReader.read: MethodTooLong \u2014 read 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":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a172ec1a86269035537248f5fd92c0dbd7d51a316bbc10685901819c0dd8350"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: FanView: ClassTooLong \u2014 418 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 18 over it, 1.05\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":"Modules/Sensors/popup.swift"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26c4b946709ae4a4005466644c8c8ba40dcce1b2ac451d955cc6b3d1494cc42"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SystemStats: 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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"84206164c84192b194ad71ce31dcb3bb0b89d918d577e7aaa47bd22e67720b96"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LineChartView: ClassTooLong \u2014 413 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 13 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":"Kit/plugins/Charts.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"4588a54db2fa94a9f2a7beed433aeb2d6ac6d81923e32b3eed6f3c5ddfcc7986"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Disk/readers.swift: FileTooLong \u2014 512 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 12 over it, 1.02\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":"Modules/Disk/readers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"069dc060144d96de3aa08d3a1fdb00d690791e4a379f24e95492803724d69f60"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/AppSettings.swift: FileTooLong \u2014 512 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: ApplicationSettings (15-575). The bar is 500 significant lines; this is 12 over it, 1.02\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd58666be9d61717773ce7cbf05a996187882d5e08e6648855323668f78d44b6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Preview.usageCallback: MethodTooLong \u2014 usageCallback runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\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":"Modules/Net/preview.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84bbab90b1e6360fe69861ab2686efbc782bfc845125271ce615e3524788298"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (26 shared lines): Modules/Disk/readers.swift:180-234 | Modules/Disk/readers.swift:497-556 \u2014 These two members are variants of one another: 26 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb00ef898ae9894121a9073574088d4a995eef458275b14a2e7890091a699bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Modules/Sensors/values.swift:178-194 | Modules/Sensors/values.swift:195-211 \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":"Modules/Sensors/values.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"8143079e0afef31ff27e78958487c5953b67904d9c9b9078c3d04f434b7f675b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Modules/Battery/popup.swift:152-165 | Modules/Battery/popup.swift:167-253 | Modules/Battery/popup.swift:255-269 | Modules/Net/popup.swift:251-280 | Modules/Net/popup.swift:282-322 | Modules/Net/popup.swift:324-360 \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":"Modules/Battery/popup.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e8ea2d7f1c8954a83b2556139554fc61ae75359320547192b51add98ac1c287"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Modules/CPU/preview.swift:92-164 | Modules/Disk/preview.swift:113-231 | Modules/Net/preview.swift:107-136 | Modules/RAM/preview.swift:75-155 | Modules/RAM/preview.swift:173-210 | Modules/RAM/preview.swift:212-243 \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":"Modules/CPU/preview.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c86d17d81ef6406290948a8524fbe1a1d9d5a43fafbc7c4b86c9c5301ae79d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Modules/Battery/popup.swift:271-289 | Modules/CPU/popup.swift:368-389 | Modules/Disk/popup.swift:84-103 | Modules/Net/popup.swift:362-381 | Modules/RAM/popup.swift:225-241 \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":"Modules/Battery/popup.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"87a1f1ed6e46235648f087afbc4bd1a69d4d44eb6a828f54aa5654c77e2672b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Modules/CPU/popup.swift:548-621 | Modules/Clock/popup.swift:88-112 | Modules/Disk/popup.swift:220-261 | Modules/Net/popup.swift:656-718 | Modules/RAM/popup.swift:299-359 \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":"Modules/CPU/popup.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"20906917eef688dceb5e64597daaa84f0b5f7681ec5a6da42fe85e8b93bab308"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Modules/CPU/widget.swift:64-119 | Modules/Disk/widget.swift:63-117 | Modules/GPU/widget.swift:63-120 | Modules/Net/widget.swift:72-139 | Modules/RAM/widget.swift:80-139 \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":"Modules/CPU/widget.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"77137ad32e3158e7fc0522c523972f6247fa6c6eb8ec57b3bfaec3bb0760a144"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Stats/Views/Setup.swift:184-217 | Stats/Views/Setup.swift:258-279 | Stats/Views/Setup.swift:439-460 | Stats/Views/Setup.swift:513-534 | Stats/Views/Setup.swift:597-658 \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":"Stats/Views/Setup.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e8f407ceeb25122cb61138d42dff37da20c939ea5473e6c96c2bcb8425fd84"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Kit/Widgets/BarChart.swift:30-101 | Kit/Widgets/Label.swift:38-58 | Kit/Widgets/LineChart.swift:62-135 | Kit/Widgets/NetworkChart.swift:56-107 \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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e74840a50338e61116c0f0d8f699ed7cb8de1e0ed7084fae1f44cd699f52fd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/Battery/settings.swift:39-59 | Modules/CPU/settings.swift:63-128 | Modules/Disk/settings.swift:84-155 | Modules/Net/settings.swift:136-263 \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":"Modules/Battery/settings.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb21660749eed374265ed681236e088f2b9d059d10fcfbb6e3e50c19db31daa"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/CPU/notifications.swift:37-127 | Modules/Disk/notifications.swift:21-41 | Modules/GPU/notifications.swift:21-42 | Modules/RAM/notifications.swift:37-106 \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":"Modules/CPU/notifications.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"880ba32963ec16e880737a203b9e309603239694f7122690885600104373907a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/CPU/settings.swift:130-135 | Modules/GPU/settings.swift:129-134 | Modules/RAM/settings.swift:148-153 | Modules/Sensors/settings.swift:170-175 \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":"Modules/CPU/settings.swift"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"935f63fd96bf224286e90df113b2a17c5f230085ff725b29c427d74cb0f88ca8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Modules/Disk/main.swift:309-381 | Modules/GPU/main.swift:168-231 | Modules/Net/main.swift:242-348 | Modules/RAM/main.swift:149-251 \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":"Modules/Disk/main.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f34a612871a03e9229e99c0aecf682e75b185677f0d26e9b631a7152db6eb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 2): Kit/module/window.swift:479-527 | Stats/Views/AppSettings.swift:627-675 \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 \u0060Kit/module/window.swift:479\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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Kit/module/window.swift:478\u0060 calls \u0060firstIndex\u0060 and \u0060Stats/Views/AppSettings.swift:626\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":"Kit/module/window.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e064776a4df52271ec7a4a49c9dd3bc36c33956fc194192673c41a012bac6d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): Modules/CPU/popup.swift:592-616 | Modules/RAM/popup.swift:330-354 \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 \u0060Modules/CPU/popup.swift:592\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":"Modules/CPU/popup.swift"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc9a1deccc0f62c90ea035118816b856b4efa419ab0be39bdfc5a41efbeb06e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Modules/CPU/readers.swift:201-223 | Modules/RAM/readers.swift:137-159 \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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/readers.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b838f112a96cac36aa3305f08a91b66e0bdc0fb2aba3b26679c6392998530e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201322 lines \u00D7 2): Modules/CPU/readers.swift:454-475 | Modules/Sensors/readers.swift:516-535 \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 \u0060Modules/CPU/readers.swift:454\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":"Modules/CPU/readers.swift"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bd688c4b530cfe4ca7937cbbcd7a9e1a087c5f683de59f361db9e92f58b7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): Kit/Widgets/BarChart.swift:266-284 | Kit/Widgets/LineChart.swift:274-292 | Kit/Widgets/NetworkChart.swift:279-297 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/BarChart.swift:266\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, \u0060Kit/Widgets/NetworkChart.swift:298\u0060 calls \u0060PreferencesRow\u0060, \u0060localizedString\u0060 and \u0060Kit/Widgets/LineChart.swift:293\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"572501b7e0e2e22edeb4418946380c5b9ce65222d8613da249f6a2a2b7698640"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Modules/Bluetooth/notifications.swift:36-53 | Modules/Bluetooth/settings.swift:44-61 \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 \u0060Modules/Bluetooth/notifications.swift:36\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":"Modules/Bluetooth/notifications.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f762b1dc095b455a1a94760ff8f7f4cbb148801ee6f4cdf27e3fcd6afaacb2fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Kit/Widgets/Stack.swift:451-467 | Modules/Clock/popup.swift:958-974 \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 \u0060Kit/Widgets/Stack.swift:451\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, \u0060Kit/Widgets/Stack.swift:450\u0060 calls \u0060getList\u0060 and \u0060Modules/Clock/popup.swift:956\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc097ea332e9a243b33bb866507dd01071f27b8cf5be80c800c7339965dd8acc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): Modules/CPU/widget.swift:104-119 | Modules/Disk/widget.swift:102-117 | Modules/GPU/widget.swift:105-120 | Modules/Net/widget.swift:124-139 | Modules/RAM/widget.swift:124-139 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/GPU/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/widget.swift:104\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":"Modules/CPU/widget.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"96cb496d88448412a05a0737c54a606cd85be638fafd9c94d68259f4a463789e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Kit/Widgets/Speed.swift:164-179 | Kit/Widgets/Speed.swift:184-199 \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 \u0060Kit/Widgets/Speed.swift:164\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":"Kit/Widgets/Speed.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16c9caff944ad82fb1e705bf08ecc82b82fc0975c56d388f4938580955ff698"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Modules/CPU/preview.swift:102-117 | Modules/Disk/preview.swift:123-138 \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 \u0060Modules/CPU/preview.swift:102\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":"Modules/CPU/preview.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e9650f8019a1def5da43bd94a1152c79bfcb6d6ebc08b58517a81678a91ae6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): Modules/Disk/settings.swift:174-188 | Modules/Net/settings.swift:266-280 | Modules/RAM/settings.swift:132-146 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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":"Modules/Disk/settings.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac71c45ed496fee0fe4952cc6a629baa3fe2759552bab13cb610a2140f810d37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/LineChart.swift:307-321 | Kit/Widgets/NetworkChart.swift:313-327 \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 \u0060Kit/Widgets/LineChart.swift:307\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 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d22b52a4d689f941e0d5d518769b917783c57f812b739cacf73bc84cedcf96a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/PieChart.swift:92-106 | Kit/Widgets/Tachometer.swift:74-88 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"b36d6538d83fc247bcfc5e3d451c28c9e7e38f545e595165de75881cf049eca4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/PieChart.swift:111-125 | Kit/Widgets/Tachometer.swift:93-107 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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. 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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b3643a794e14a9a7216c110f7b87dd4ca1e596efdb07ae764b71284df16a3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Kit/Widgets/Stack.swift:343-357 | Modules/Clock/popup.swift:835-849 \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 \u0060Kit/Widgets/Stack.swift:343\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"3573247fd3a8661308bb73288700e430de7b743d8e81f4956ea95f8ecbf4f594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): Modules/CPU/popup.swift:123-135 | Stats/Views/Dashboard.swift:199-213 \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":"Modules/CPU/popup.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"777e302a6f408abece3aa376bc57b89a456cf933a761a638fee6915cde4a2dd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Modules/CPU/preview.swift:166-180 | Modules/RAM/preview.swift:157-171 \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":"Modules/CPU/preview.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7066934c52091984fc03033501509f7ae13e704ce310f2a8a979097d84fc87a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Modules/Disk/popup.swift:887-901 | Modules/Disk/preview.swift:410-424 \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 \u0060Modules/Disk/popup.swift:887\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":"Modules/Disk/popup.swift"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ab71ddff221cc3eab6c4910e7748f5653c1e5c0b5f3713dc57ba881d9f1612d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Modules/Disk/portal.swift:65-79 | Modules/Net/portal.swift:73-87 \u2014 \u0060Modules/Disk/portal.swift\u0060 and \u0060Modules/Net/portal.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/portal.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb2108453e135269ee5728a60422543c96457a52e7f84eac31e456ddb14e96d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): Modules/Battery/readers.swift:245-258 | Modules/CPU/readers.swift:548-561 | Modules/CPU/readers.swift:596-609 \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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/readers.swift"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd5218f7f8f1743ff6733399a0c0185d4864a06470fa72b74f4e4d7ee385345d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Kit/Widgets/Battery.swift:283-296 | Kit/Widgets/Battery.swift:602-615 \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 \u0060Kit/Widgets/Battery.swift:283\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f4c240980e2e06c95973526c9f92dd0caa462307aa32bece648498bdef496a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Modules/CPU/settings.swift:66-79 | Modules/RAM/settings.swift:87-100 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/settings.swift:66\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":"Modules/CPU/settings.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f72e29e375fdd02f2ade6692ca15830969152df29a2b543b4dfbd661896e51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Kit/Widgets/BarChart.swift:89-101 | Kit/Widgets/LineChart.swift:123-135 | Kit/Widgets/NetworkChart.swift:95-107 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/BarChart.swift:89\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"431d801cd872ac9bd426fdc564ef9f8ab5755d380e0db6a7e78fba8dc69ef266"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Stats/Views/Setup.swift:267-279 | Stats/Views/Setup.swift:448-460 | Stats/Views/Setup.swift:522-534 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Stats/Views/Setup.swift:267\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":"Stats/Views/Setup.swift"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"1515c304268e264c8bcac366b73071f344c38851fff98330c10524541404f566"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Modules/Disk/readers.swift:54-66 | Modules/Disk/readers.swift:500-512 \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 \u0060Modules/Disk/readers.swift:54\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":"Modules/Disk/readers.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc09f0f38213746a9f722ac20a5e1bf81251af3802a2b62ac342be09c266d13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Kit/Widgets/Battery.swift:270-281 | Kit/Widgets/Battery.swift:589-600 \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 \u0060Kit/Widgets/Battery.swift:270\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 \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":"Kit/Widgets/Battery.swift"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"4caab486ae99c2d9a92ec79e28152076260ea256c03d6583b0a2ece9531a9672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/CPU/popup.swift:411-422 | Modules/CPU/portal.swift:118-129 \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 \u0060Modules/CPU/popup.swift:411\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":"Modules/CPU/popup.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"b24a59ea602945d0dfa91debd9b652674b90371920f10aaf1ee20b8fdef4b350"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Remote/settings.swift:433-444 | Modules/Remote/settings.swift:450-461 \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 \u0060Modules/Remote/settings.swift:433\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":"Modules/Remote/settings.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e42414196ae67944eea96ebf9310c4b61d04e09abfca91ef8689b264294c355"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Remote/settings.swift:425-436 | Modules/Remote/settings.swift:476-487 \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 \u0060Modules/Remote/settings.swift:425\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":"Modules/Remote/settings.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"54646ae551f0a600b4c741e163b2acd318cdfb802678efccf73513b3dc1c236b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Remote/settings.swift:484-495 | Modules/Remote/settings.swift:500-511 \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 \u0060Modules/Remote/settings.swift:484\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":"Modules/Remote/settings.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b7ab8c635426a375665b63f3b49643b288e10b154a50446b5197d4265b34611"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): Modules/CPU/popup.swift:548-558 | Modules/Clock/popup.swift:88-98 | Modules/Disk/popup.swift:220-230 | Modules/Net/popup.swift:656-666 | Modules/RAM/popup.swift:299-309 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/popup.swift:548\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":"Modules/CPU/popup.swift"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"1869dabca0768118cfc30d19dcef0a7e0fd15ac46c58ea528070e752e0d23644"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): Stats/Views/Setup.swift:261-271 | Stats/Views/Setup.swift:442-452 | Stats/Views/Setup.swift:516-526 | Stats/Views/Setup.swift:600-610 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/Setup.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff622968284c4009e71d2ebd90e9f74cc3979f9f1d4b814abb72a402d49172d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201311 lines \u00D7 3): Kit/plugins/Charts.swift:256-266 | Kit/plugins/Charts.swift:1261-1271 | Kit/plugins/Charts.swift:1399-1404 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/plugins/Charts.swift:256\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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060frame\u0060 to \u0060NSRect = NSRect.zero\u0060 in one and \u0060NSRect = .zero\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":"Kit/plugins/Charts.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a9466a7501a5777b9eea60554b8a417bce50addd056fa8e08fdfac3ab94f39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Modules/Battery/popup.swift:389-399 | Modules/Disk/popup.swift:206-216 | Modules/Net/popup.swift:391-401 \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. 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":"Modules/Battery/popup.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc99f2a7910be2123599268c9efa8c14befe427b2a11a20cb9ac8c8c9bd452c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Modules/CPU/preview.swift:98-108 | Modules/Disk/preview.swift:119-129 | Modules/RAM/preview.swift:81-91 \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":"Modules/CPU/preview.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee971094d35e3d07ccbb049295d0f9969e596a3b17043f95c52eb67a0dd2f75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Modules/Disk/readers.swift:57-67 | Modules/Disk/readers.swift:184-194 | Modules/Disk/readers.swift:503-513 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/readers.swift:57\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":"Modules/Disk/readers.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"597573ee8f640d7950fe1397818077af1ee8565bd4f385fd896474318180f204"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Stats/Views/Settings.swift:433-443 | Stats/Views/Setup.swift:637-647 | Stats/Views/Support.swift:129-139 \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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Stats/Views/Settings.swift:433\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":"Stats/Views/Settings.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6035b9db5593065df395eb7d45ba7af4cfdb284a296570c2e56ecbb3ed5bfe1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/Widgets/LineChart.swift:260-270 | Kit/Widgets/Mini.swift:162-172 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"4888410db71141c9d570f0c868c416e230b3ebc815bcabb6925101ede24c507d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/Widgets/Stack.swift:370-380 | Modules/Clock/popup.swift:869-879 \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 \u0060Kit/Widgets/Stack.swift:370\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"5791615e6a7d01f4fa62b6be2218673b6004d9afd1b9b8536bd1500b0a3f2935"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/module/module.swift:320-330 | Stats/Views/CombinedView.swift:159-169 \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 \u0060Kit/module/module.swift:320\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":"Kit/module/module.swift"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb5183a761ba878c4ef9878c458738f5efdcc95a764ac97c88685f91f3a1f759"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Kit/plugins/SystemStats.swift:719-729 | Kit/plugins/SystemStats.swift:744-754 \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 \u0060Kit/plugins/SystemStats.swift:719\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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060completion\u0060 to \u0060@escaping (DeviceResponse?) -\u003E Void\u0060 in one and \u0060@escaping (Error?) -\u003E Void\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":"Kit/plugins/SystemStats.swift"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80d10bac4d05f3d53e4671ee79ed100339145db9fcf832714516578d5adc321"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Modules/Battery/popup.swift:279-289 | Modules/CPU/popup.swift:379-389 \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 \u0060Modules/Battery/popup.swift:279\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 \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":"Modules/Battery/popup.swift"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a10a52bccf8af31fe1667a66e922554f383919e4e5d99dae386cbfb82deb86b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Modules/CPU/popup.swift:21-31 | Modules/CPU/popup.swift:37-47 \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 \u0060Modules/CPU/popup.swift:21\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 \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":"Modules/CPU/popup.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ee5f0759bfda51ca943b9a8add4c7f56cb935275e9f3689ef896a9a2187123"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): Modules/CPU/portal.swift:50-59 | Modules/Disk/portal.swift:50-60 \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":"Modules/CPU/portal.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"10007e6e42eb4c97df254e058f00192f0ac630794da5826214649b6b18033ca4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Modules/Disk/popup.swift:779-789 | Modules/Net/popup.swift:162-172 \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 \u0060Modules/Disk/popup.swift:779\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":"Modules/Disk/popup.swift"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f573ba0768e2a4d5ead93af79211efe2583f75d9ee6ccacee810f885014467"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): Modules/CPU/preview.swift:95-104 | Modules/Disk/preview.swift:116-125 | Modules/Net/preview.swift:110-119 | Modules/RAM/preview.swift:78-87 | Modules/RAM/preview.swift:176-185 | Modules/RAM/preview.swift:215-224 \u2014 there are 6 copies across 4 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 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/preview.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"b25876296272ad7f9bd8a34db4e950442d0f462d9e30560d7ffff77dd5b767e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Kit/Widgets/Stack.swift:350-359 | Modules/Clock/popup.swift:842-851 | Modules/Clock/settings.swift:71-80 \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. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction \u2014 check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Stack.swift"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c068e44c3763ae40189c105e74c1a85e98e5bc378cca8a75ca16aadc7477ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Modules/CPU/portal.swift:70-79 | Modules/Disk/portal.swift:85-94 | Modules/RAM/portal.swift:46-55 \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":"Modules/CPU/portal.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a2c84a1eb24460797fb8987b8ddf7ff9785159ecc5c7d553c6e957a753d171"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Modules/Sensors/readers.swift:167-176 | Modules/Sensors/readers.swift:198-207 | Modules/Sensors/readers.swift:208-217 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Modules/Sensors/readers.swift:163\u0060 calls \u0060filter\u0060, \u0060hasPrefix\u0060 and \u0060Modules/Sensors/readers.swift:195\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":"Modules/Sensors/readers.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e4e05d95ed50240d091e9ad00d912a2856429aeba6d297af912dcfe4e9bf6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Kit/Widgets/BarChart.swift:280-289 | Kit/Widgets/Mini.swift:219-228 \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 \u0060Kit/Widgets/BarChart.swift:280\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"134e6e8ebd59eb48d9bb1235c8ac7d3166002c67cc1124a2601e456a665ba1e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Kit/Widgets/Battery.swift:101-110 | Kit/Widgets/Battery.swift:113-122 \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 \u0060Kit/Widgets/Battery.swift:101\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"279974121b0a3b86a3954c9f4a767d6f94c8298f70513c3f0261cb5a97cd6814"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Battery/popup.swift:371-380 | Modules/RAM/popup.swift:280-289 \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 \u0060Modules/Battery/popup.swift: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef860c67f3f77c8927f957a14e2333382537dbf69467584e6c98c9d6c5b8754f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Disk/main.swift:334-343 | Modules/RAM/main.swift:194-203 \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 \u0060Modules/Disk/main.swift:334\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":"Modules/Disk/main.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a599b1367305f46e4350a436e379105b6b9e6a3b07b26ab6bce402931f7d92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Disk/portal.swift:45-54 | Modules/Net/portal.swift:69-78 \u2014 \u0060Modules/Disk/portal.swift\u0060 and \u0060Modules/Net/portal.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/portal.swift:45\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":"Modules/Disk/portal.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"62cc15df81470769b1df8c418ed1a0dd4635344874c8ef3dbefe060a4aa98373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201310 lines \u00D7 3): Modules/Disk/readers.swift:71-74 | Modules/Disk/readers.swift:201-210 | Modules/Disk/readers.swift:520-529 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/readers.swift:71\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, \u0060Modules/Disk/readers.swift:200\u0060 calls \u0060first\u0060, \u0060index\u0060 and \u0060Modules/Disk/readers.swift:71\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":"Modules/Disk/readers.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b26b8c987b076a8f5e478acb71098167078c12e999bb879202b1ee401ce0d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): Modules/Disk/settings.swift:118-127 | Modules/Net/settings.swift:180-188 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Net/settings.swift:180\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":"Modules/Disk/settings.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"790989952b9d06cb8bedabe6c634f6ec2d5ad9868d71bda4d50d15f4ae85b456"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Net/main.swift:327-336 | Modules/RAM/main.swift:228-237 \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 \u0060Modules/Net/main.swift:327\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, \u0060Modules/RAM/main.swift:239\u0060 calls \u0060setValue\u0060, \u0060pressureColor\u0060 and \u0060Modules/Net/main.swift:338\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":"Modules/Net/main.swift"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"273cc310ad353c0ab92fa660d1b48467e10862100ed1bd0864981f6eb8ceab22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Modules/Sensors/popup.swift:941-950 | Modules/Sensors/popup.swift:953-962 \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 \u0060Modules/Sensors/popup.swift:941\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":"Modules/Sensors/popup.swift"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4203804c7bb4620a98fd37ab7562ebeb861d5a2f50bb1b5204fb9b32c7d9777"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Stats/Views/Support.swift:54-63 | Stats/Views/Update.swift:61-70 \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":"Stats/Views/Support.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"88427d9c14aa1763fd695a5a1f037ad3924bfa74b01620d52a5c44ccd0a9ddea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 4): Modules/CPU/settings.swift:63-70 | Modules/Disk/settings.swift:84-92 | Modules/GPU/settings.swift:66-74 | Modules/RAM/settings.swift:84-91 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/settings.swift:63\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":"Modules/CPU/settings.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"084f1ca1f6ae05628a9cfa0663b20ba46d3fb983fdf1117ce4adfb4cda49473a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): Modules/Disk/main.swift:361-369 | Modules/GPU/main.swift:211-219 | Modules/Net/main.swift:329-337 | Modules/RAM/main.swift:230-238 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/main.swift:361\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, \u0060Modules/RAM/main.swift:239\u0060 calls \u0060setValue\u0060, \u0060pressureColor\u0060 and \u0060Modules/Disk/main.swift:370\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":"Modules/Disk/main.swift"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"17f74015ee02e55092814608f2a4883953cf66aee1ce1f4c64ec7cc63293dbcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20139 lines \u00D7 5): Modules/Battery/popup.swift:277-285 | Modules/CPU/popup.swift:377-385 | Modules/Disk/popup.swift:92-93 | Modules/Net/popup.swift:370-371 | Modules/RAM/popup.swift:230-238 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/popup.swift: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. 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, \u0060Modules/CPU/popup.swift:377\u0060 calls \u0060ProcessesView\u0060 and \u0060Modules/Disk/popup.swift:92\u0060 does not \u2014 after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fca9697d4709aa7d8323df7497e2d73242e1722271f009ca89a61ada483c06d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Modules/Battery/popup.swift:372-380 | Modules/Net/popup.swift:632-640 | Modules/RAM/popup.swift:281-289 \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 \u0060Modules/Battery/popup.swift:372\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":"Modules/Battery/popup.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"4338266a95f9034568846db6a5b53104b4935bd0b43fc859bb6074fa35caa4fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Stats/Views/Settings.swift:421-429 | Stats/Views/Setup.swift:625-633 | Stats/Views/Support.swift:117-125 \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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Stats/Views/Settings.swift:421\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":"Stats/Views/Settings.swift"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af458324bcb8bdf7e0f1112e542bded0368116bc5219dc115d2020111debbbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/BarChart.swift:303-311 | Kit/Widgets/LineChart.swift:329-337 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/BarChart.swift:303\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e2880dac73cce2b4a0d731e216d66a1127ac77c1377c6979d5fe35f01ac7a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/BarChart.swift:316-324 | Kit/Widgets/LineChart.swift:342-350 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/BarChart.swift:316\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"06bcf1c935ddd378310158a5ed62959398eaeffe0fd0147315461bb126774298"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Battery/main.swift:96-104 | Modules/RAM/main.swift:139-147 \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 \u0060Modules/Battery/main.swift:96\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":"Modules/Battery/main.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"9abadf7c09c33776f4dc1182cb2a87361f75de93bcaa857d9a16e8dde2af34cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/CPU/popup.swift:189-197 | Modules/Net/popup.swift:167-175 \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 \u0060Modules/CPU/popup.swift:189\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":"Modules/CPU/popup.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ed2b8895b2aa4e8340a3ccf51494979120ab8067b7703b7439b6a0225724a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/CPU/popup.swift:482-490 | Modules/CPU/preview.swift:323-331 \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":"Modules/CPU/popup.swift"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e22f92a238b820e7d4015e2a41044c8ebb0b564ef5695161163c0294f7889b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Clock/popup.swift:344-352 | Modules/Clock/popup.swift:361-369 \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 \u0060Modules/Clock/popup.swift:344\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 \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":"Modules/Clock/popup.swift"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"af4d64e14360258ee960d024d8e026f31fdb0b6d55e8f8c24d3d0a17110ce2b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Disk/readers.swift:591-599 | Modules/Disk/readers.swift:655-663 \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 \u0060Modules/Disk/readers.swift:591\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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"7362e750510ba384e815b3a0b7978edec869c5e587c4d3037d4b1fd04884762f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Disk/settings.swift:87-95 | Modules/Sensors/settings.swift:51-59 \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 \u0060Modules/Disk/settings.swift:87\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":"Modules/Disk/settings.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e5b5309dd98e4a997ebb92eaa3b8e6c9c1293bd31cc034bf3ef6c8245b6197"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Net/popup.swift:500-508 | Modules/Net/portal.swift:196-204 \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":"Modules/Net/popup.swift"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"5967dd43d04ce2834c03f2dfa855aa06898a6a29cde42e6fe156b1120b88af6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Modules/Net/preview.swift:330-338 | Modules/Net/preview.swift:345-353 \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 \u0060Modules/Net/preview.swift:330\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":"Modules/Net/preview.swift"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4195200e8e2e02a5e29838b0e0249991f521f5719fe586a3b55c78f1dadafe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): SMC/Helper/main.swift:146-154 | SMC/Helper/main.swift:160-168 \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 \u0060SMC/Helper/main.swift:146\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":"SMC/Helper/main.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b572c0c3adc2dbdd96997c8018ffa585b6c468b44dbea53f97e89276f6a1318"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): Modules/CPU/widget.swift:82-89 | Modules/Disk/widget.swift:80-87 | Modules/GPU/widget.swift:80-87 | Modules/RAM/widget.swift:97-104 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/GPU/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/widget.swift:82\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, \u0060Modules/CPU/widget.swift:92\u0060 calls \u0060Rectangle\u0060, \u0060fill\u0060, \u0060frame\u0060 and \u0060Modules/GPU/widget.swift:90\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":"Modules/CPU/widget.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1d9a421303f6b24f5ebefd45d8b2bc79ae1bbdcab82199be4974f01483a1ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Kit/Widgets/Mini.swift:216-223 | Kit/Widgets/PieChart.swift:110-117 | Kit/Widgets/Tachometer.swift:92-99 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/Mini.swift:216\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":"Kit/Widgets/Mini.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de47235c8dd3204339e6f7041c7a542ffa9200a72f3477175c8ef49fa62b1ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20138 lines \u00D7 4): Modules/CPU/popup.swift:368-375 | Modules/Disk/popup.swift:84-91 | Modules/Net/popup.swift:362-369 | Modules/RAM/popup.swift:228-228 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/popup.swift:368\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, \u0060Modules/RAM/popup.swift:226\u0060 calls \u0060NSView\u0060, \u0060NSRect\u0060 and \u0060Modules/CPU/popup.swift:368\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":"Modules/CPU/popup.swift"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca4b6ed182f9ac68783d8eba61842cf17e1fe57a0432fba6b461a3d05c656fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Kit/extensions.swift:516-522 | Modules/GPU/settings.swift:108-115 \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 \u0060Kit/extensions.swift:516\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":"Kit/extensions.swift"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f1f5cff4d033e49516099695c6c2b690b636b12788bfc64d7a0218d823b8cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): SMC/smc.swift:411-418 | SMC/smc.swift:501-508 \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":"SMC/smc.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"8490ade1cf9195586ff82f75f52291fe06315b5cd9e533bc3ef36b67cf56a07f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20138 lines \u00D7 3): SMC/smc.swift:352-353 | SMC/smc.swift:424-431 | SMC/smc.swift:472-479 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060SMC/smc.swift:352\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 \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":"SMC/smc.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"7529cd4766d7b81a02225c65bb63688d98f5d737f29cff69c9fc2979d242a5fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/BarChart.swift:66-73 | Kit/Widgets/Mini.swift:74-81 \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 \u0060Kit/Widgets/BarChart.swift:66\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Kit/Widgets/Mini.swift:82\u0060 calls \u0060fromString\u0060 and \u0060Kit/Widgets/BarChart.swift:74\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bbbabe36b321a66cad2d5b748eeb7b1f803366b3a6296f21fb0588ca924a573"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/Battery.swift:35-42 | Kit/Widgets/NetworkChart.swift:69-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 \u0060Kit/Widgets/Battery.swift:35\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"640a017569254b25a7b5b73288366e7a67203bde098f37dce06d228ac9e6e622"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/Dot.swift:32-39 | Kit/Widgets/Label.swift:25-32 \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 \u0060Kit/Widgets/Dot.swift:32\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":"Kit/Widgets/Dot.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc745e06e05274581eb2bba54abdd1c72990c62434b8d903fa0cc0c9a72ef11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Kit/Widgets/PieChart.swift:77-84 | Kit/Widgets/Tachometer.swift:59-66 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/PieChart.swift:77\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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3c66ab24645403552e6c2a7b93ebcafa2c363ddfd060dd8e9301f90ab605a86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): Kit/plugins/SystemKit.swift:428-435 | Kit/plugins/SystemKit.swift:438-443 \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 \u0060Kit/plugins/SystemKit.swift:428\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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d154412cd723a650e701016a7a82d2616d78357e5a925e1e3d8a2ab6bb40d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/CPU/main.swift:89-96 | Modules/RAM/main.swift:69-76 \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":"Modules/CPU/main.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"615fc52e7d099ec504e2d82c37bfe1d7fb1c5c575c26697123c93570514b2e7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/CPU/popup.swift:425-432 | Modules/CPU/portal.swift:132-139 \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 \u0060Modules/CPU/popup.swift:425\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":"Modules/CPU/popup.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3663039c08d66ecc36a82e868b6eb01415180d28909cdf5c568e1012f27579a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Disk/popup.swift:879-886 | Modules/Disk/preview.swift:402-409 \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 \u0060Modules/Disk/popup.swift:879\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":"Modules/Disk/popup.swift"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"7102dc3f996416279a87e71d1686f89611a99dcb4f7f5270f3f706ba98eb1329"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Remote/main.swift:314-321 | Modules/Remote/main.swift:338-345 \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 \u0060Modules/Remote/main.swift:314\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":"Modules/Remote/main.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"06644696a160c912afc5aaf8f067ae5cabf3910f8b2775c1a40118589e539bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Remote/popup.swift:155-162 | Modules/Remote/settings.swift:422-429 \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":"Modules/Remote/popup.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94cac5737687e32df9953b592fecf85103c87f1973db4af35e996af6a964571"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Remote/popup.swift:164-171 | Modules/Remote/settings.swift:473-480 \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":"Modules/Remote/popup.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9295e04c463021642775fc0d3a7c286ea4124f95f5af08aadbbc3371c2b69e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/Sensors/readers.swift:312-319 | Modules/Sensors/readers.swift:485-492 \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 \u0060Modules/Sensors/readers.swift:312\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":"Modules/Sensors/readers.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"46f0883697a20889b51d936c84ba66103ebc22a93e4233cf2ca408a87ac1d933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Stats/Views/AppSettings.swift:86-93 | Stats/Views/Dashboard.swift:220-227 \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":"Stats/Views/AppSettings.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8b6836b83438eb7e4ffab35d2f1554a2c8c5b67aee6d441838da453da9d127"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Stats/Views/AppSettings.swift:431-438 | Stats/Views/AppSettings.swift:536-543 \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 \u0060Stats/Views/AppSettings.swift:431\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":"Stats/Views/AppSettings.swift"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d62b41c7ed8c0e8cc5b3370ea320109624a04f3762df71d542f00f26be5b297"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Stats/Views/Setup.swift:184-190 | Stats/Views/Setup.swift:258-264 | Stats/Views/Setup.swift:439-445 | Stats/Views/Setup.swift:513-519 | Stats/Views/Setup.swift:597-603 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Stats/Views/Setup.swift:184\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":"Stats/Views/Setup.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e28071b5cc5850aff75801e28fe59fae229bfe626b4d34dec4299940a6493c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): Kit/Widgets/BarChart.swift:89-95 | Kit/Widgets/Label.swift:43-50 | Kit/Widgets/LineChart.swift:123-129 | Kit/Widgets/NetworkChart.swift:95-101 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"3353509c3d0ea5d580df6a3c510598c075cf35d2f9761fc6a54b69f66d3a0af0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Kit/Widgets/BarChart.swift:68-74 | Kit/Widgets/LineChart.swift:91-97 | Kit/Widgets/NetworkChart.swift:71-77 \u2014 before extracting anything, compare \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/BarChart.swift:68\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":"Kit/Widgets/BarChart.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"760cb781fd010f2cb5dd15a33b9f14aa0f7d7dbb641125bfc07ab9dd8fb0928d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Kit/Widgets/Battery.swift:34-40 | Kit/Widgets/Battery.swift:500-506 | Kit/Widgets/NetworkChart.swift:68-74 \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 \u0060Kit/Widgets/Battery.swift:34\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":"Kit/Widgets/Battery.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffea5583653b86d2b87647aaae51835658336b377e09c5636f690d55da457b04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Modules/Battery/popup.swift:374-380 | Modules/CPU/popup.swift:498-504 | Modules/RAM/popup.swift:283-289 \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 \u0060Modules/Battery/popup.swift:374\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":"Modules/Battery/popup.swift"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eefa9f0220f169487d33fc9ee70812f5404e3d43f5e8054db13c80b650e4721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Modules/Disk/settings.swift:149-155 | Modules/Net/settings.swift:257-263 | Modules/RAM/settings.swift:123-129 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/settings.swift:149\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":"Modules/Disk/settings.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"553b56dcb4c08dd3e07af15d5fa6e4f56383a7fa5f53858c2eb2812b157ef73a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Kit/Widgets/Dot.swift:17-23 | Kit/Widgets/Memory.swift:24-30 \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 \u0060Kit/Widgets/Dot.swift:17\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":"Kit/Widgets/Dot.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2650e2aa3059c4d7302c96be21240ef25580401773f258f0bfe2534bfb88732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Kit/module/popup.swift:259-265 | Kit/module/popup.swift:320-326 \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":"Kit/module/popup.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b58c3e7cd6b741c7668d72ccb97a6442a4ad346fec6c3a45bac339a9edd547e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Kit/module/window.swift:462-468 | Kit/module/window.swift:530-537 \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":"Kit/module/window.swift"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d035fcd8c7dd886fc8d66ce59a81c568d71b71725358470cde249df16463c7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/CPU/main.swift:172-178 | Modules/Net/main.swift:198-204 \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":"Modules/CPU/main.swift"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b303b7cc21ce3bbab095b69075086b1fb29893ea53ea6c4a42fd2805495d40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/CPU/popup.swift:692-698 | Modules/RAM/popup.swift:417-423 \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":"Modules/CPU/popup.swift"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d6971e362216843e510dbb4393a86aa3ead83b4f8a6d809b6c4b1b6ee90629d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Clock/popup.swift:281-287 | Modules/Clock/popup.swift:293-299 \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":"Modules/Clock/popup.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5c19e42bc3425befd50d9822e080e3fa735e78002e3a2f79cf414d13973342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Clock/settings.swift:221-227 | Modules/Clock/settings.swift:230-236 \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":"Modules/Clock/settings.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a7999f43b73f970da843c204c7705effa0e448eea239c5689265bf4c6721bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Disk/portal.swift:109-115 | Modules/Net/portal.swift:95-101 \u2014 \u0060Modules/Disk/portal.swift\u0060 and \u0060Modules/Net/portal.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/portal.swift:109\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":"Modules/Disk/portal.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"da371967074154fc7ac5eae971e509459b7abe0b63cc7dab24c53ebee162fa2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Disk/preview.swift:176-182 | Modules/Disk/preview.swift:183-189 \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":"Modules/Disk/preview.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f2d872bfc98534bd003e2ad250136ff5800d56217de591c7d34edebf6856aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Disk/settings.swift:246-252 | Modules/RAM/settings.swift:179-185 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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":"Modules/Disk/settings.swift"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de99f9711046a0353511ffd69da85827512b61c89ae385124ada89d178f4cf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Net/readers.swift:384-390 | Modules/Net/readers.swift:738-744 \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":"Modules/Net/readers.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5bbd05c28a38cf54e6dc6cfb2d47ca90b7f0471380c42aff6c31052503cda6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Remote/popup.swift:433-439 | Modules/Remote/popup.swift:485-491 \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":"Modules/Remote/popup.swift"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"0416f09fc22c2a18f66240371cee4e85d8e71f02420cf2c23346ffb1a0e92c6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Stats/Views/Dashboard.swift:152-158 | Stats/Views/Dashboard.swift:169-175 \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 \u0060Stats/Views/Dashboard.swift:152\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":"Stats/Views/Dashboard.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"247f4d47df4fd26f0ee8e42464fac7f687b5ccab9aaeeb2f0d5dc27d2be9136b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Kit/Widgets/Stack.swift:370-375 | Kit/extensions.swift:708-713 | Modules/Clock/popup.swift:869-874 \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 \u0060Kit/Widgets/Stack.swift:370\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":"Kit/Widgets/Stack.swift"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"c352abdde7efa1c940aaed6cec36866f203ecbcb3cdf9aeab7a6777c18b013a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Modules/Disk/widget.swift:72-77 | Modules/GPU/widget.swift:72-77 | Modules/RAM/widget.swift:89-94 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/GPU/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/widget.swift:72\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":"Modules/Disk/widget.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6c456fcf928dff8f71610a759fea1145a6406233a7efdfb80b6a29efddcdac2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 6): Modules/Battery/popup.swift:153-155 | Modules/Battery/popup.swift:168-170 | Modules/Battery/popup.swift:256-258 | Modules/Net/popup.swift:252-257 | Modules/Net/popup.swift:283-288 | Modules/Net/popup.swift:325-330 \u2014 there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Net/popup.swift:252\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":"Modules/Battery/popup.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"29fe8c69495e8a15164161e04cabc3181689dc938fdd8a55a68b8ece4cb2ffa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/process.swift:178-183 | Stats/Views/Setup.swift:688-693 \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 \u0060Kit/process.swift:178\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":"Kit/process.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c8b3cb5c8a94c81e3017f826eca80dcb9a551a894a721c94320f16db440448"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/Battery.swift:196-201 | Kit/Widgets/Battery.swift:206-211 \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":"Kit/Widgets/Battery.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"791f752611dd0cba10d6d7c4fa4ce2dbf79b719b33f2f2fba54812f7b53c1049"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/LineChart.swift:293-298 | Kit/Widgets/Speed.swift:556-561 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4985b3641e7a54b67d518aa60a579c6f0ab7945fca3138dbd69b6cd83e7978"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/module/popup.swift:379-384 | Kit/module/popup.swift:405-410 \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, \u0060Kit/module/popup.swift:411\u0060 calls \u0060iconFromSymbol\u0060 and \u0060Kit/module/popup.swift:385\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":"Kit/module/popup.swift"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c70702a67f1ec7ed126c62648503efd696c990a8cecb425c955ceec0782b05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/plugins/Updater.swift:217-222 | Kit/plugins/Updater.swift:246-251 \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 \u0060Kit/plugins/Updater.swift:217\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 \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":"Kit/plugins/Updater.swift"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"155136a7557ba387c8dedc50623d84f0034dc64a32eba37c33640dfa7168e160"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Battery/settings.swift:39-44 | Modules/Net/settings.swift:136-141 \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 \u0060Modules/Battery/settings.swift:39\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":"Modules/Battery/settings.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3f456fc71a8154fa02ac6ecbaa3eb4877dba06f3698ec906a6aca5c1ffcdf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Clock/settings.swift:150-155 | Modules/Clock/settings.swift:162-167 \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 \u0060Modules/Clock/settings.swift:150\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":"Modules/Clock/settings.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"b089e6a57c135ef0828e8c3ce46a5a79ee10117d2172eed7e435510f06576051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Disk/readers.swift:581-586 | Modules/Disk/readers.swift:645-650 \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":"Modules/Disk/readers.swift"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5c4711c36c6f5d30835fcba133b8a5ff3e08d05e7c89344e3ef6fe92687f7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Remote/popup.swift:142-147 | Modules/Remote/settings.swift:120-125 \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 \u0060Modules/Remote/popup.swift:142\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":"Modules/Remote/popup.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"f66ef155b962a22b46f000cbf9c10b173eda7ef4e4d5f035f0e5086f83069163"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Remote/settings.swift:414-419 | Modules/Remote/settings.swift:465-470 \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":"Modules/Remote/settings.swift"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d0157fbeb2aa59eae90d95abebf2f5f81b58c1c91fd3ef340fc7ac63c99538"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Sensors/main.swift:64-69 | Modules/Sensors/main.swift:75-80 \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 \u0060Modules/Sensors/main.swift:64\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":"Modules/Sensors/main.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e2b657aa860dfd8335768bf5261bebe98d6a8543ffaea36c3a4ff97fdbb9292"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Modules/Sensors/popup.swift:624-629 | Modules/Sensors/popup.swift:636-641 \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 \u0060Modules/Sensors/popup.swift:624\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":"Modules/Sensors/popup.swift"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2c91b48d9a1c8a17db8ad647ccc7f0e2b5562c331a38261aaf20aa893188e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Modules/Battery/settings.swift:44-48 | Modules/CPU/settings.swift:81-85 | Modules/Disk/settings.swift:97-101 | Modules/Net/settings.swift:141-145 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Battery/settings.swift:44\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":"Modules/Battery/settings.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad73d3cedf2d0e9a87ea59c639bf7f2618e0b2022838be2833e28d757c21c8e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Modules/CPU/settings.swift:131-135 | Modules/GPU/settings.swift:130-134 | Modules/RAM/settings.swift:149-153 | Modules/Sensors/settings.swift:171-175 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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":"Modules/CPU/settings.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d176d4fdde8e29ec6e9feff2002483a6f26df55757d76d69c5d0ace1c418ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Modules/Remote/popup.swift:142-146 | Modules/Remote/popup.swift:148-152 | Modules/Remote/settings.swift:120-124 | Modules/Remote/settings.swift:126-130 \u2014 there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Remote/popup.swift:142\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":"Modules/Remote/popup.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7c6548e5a6af5b1aac1b598d3eb552e701373762f843886ecb9178530205a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Kit/Widgets/Dot.swift:32-36 | Kit/Widgets/Label.swift:25-29 | Kit/Widgets/Text.swift:20-24 \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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Kit/Widgets/Dot.swift:32\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":"Kit/Widgets/Dot.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4baff390de4b1403522ac92b3f0dc1b0ba9c4da559142b7bcae587f2b519c307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Modules/CPU/readers.swift:129-133 | Modules/CPU/readers.swift:135-139 | Modules/CPU/readers.swift:141-145 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/readers.swift:129\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":"Modules/CPU/readers.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3877cff5ea3bb65dd280b855e88954a87b6c6e702dbfa025943fb1eb133752b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/types.swift:265-269 | Kit/types.swift:273-277 \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 \u0060Kit/types.swift:265\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":"Kit/types.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"8996002873dc73de659fdbfef4be38ca26130d212682117f7bf63a32a4636973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/Battery.swift:299-303 | Kit/Widgets/Battery.swift:618-622 \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 \u0060Kit/Widgets/Battery.swift:299\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 \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":"Kit/Widgets/Battery.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc684906c991356f289b054fbbed701e1fb1642d890fc41a362570b9c04396cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/LineChart.swift:323-327 | Kit/Widgets/Mini.swift:246-250 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"dee02bb88aa3a2c36884c1685d52e09c553a081c58fc3a1aed7aba909de4f0ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/NetworkChart.swift:230-234 | Kit/Widgets/NetworkChart.swift:242-246 \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":"Kit/Widgets/NetworkChart.swift"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f08304705f7bea98b13434f8a05999d4ffbb1f29c956a518345ef6738a345d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/PieChart.swift:67-71 | Kit/Widgets/Tachometer.swift:49-53 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Kit/Widgets/PieChart.swift:67\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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8596fabd3974ef195f295347599d529992c25a9cfdf64eb4e4b218c2717e674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/Speed.swift:213-217 | Kit/Widgets/Speed.swift:233-237 \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 \u0060Kit/Widgets/Speed.swift:213\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":"Kit/Widgets/Speed.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"772252f46df9a5b95d48959cfd56193bcee26809d61d933ae88861e73f83411c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/plugins/SystemKit.swift:365-369 | Kit/plugins/SystemKit.swift:500-504 \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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"76957e4bbd916db37c5a502bc09f01f3c383c8e0076a26b2c61b5d556f36e62e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/plugins/SystemKit.swift:642-646 | Kit/plugins/SystemKit.swift:734-738 \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 \u0060Kit/plugins/SystemKit.swift:642\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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7af8ebf49f6fba903de03aa6671c4cd8bc1846419437bcf068db69cc51eed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Bluetooth/popup.swift:38-42 | Modules/Clock/popup.swift:82-86 \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 \u0060Modules/Bluetooth/popup.swift:38\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":"Modules/Bluetooth/popup.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"5adfeefe5741afa5385e575eec77dc2a1e083d0fd4e03531a2c65b29d80d38c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/settings.swift:138-142 | Modules/RAM/settings.swift:155-159 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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":"Modules/CPU/settings.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e76b6ecd68d3256eedd50aa554a73f27cd501ace5486610ca62ef0420cac43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/preview.swift:93-97 | Modules/Net/preview.swift:87-91 \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":"Modules/Disk/preview.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d22b19bda0262925196957f6cb4a0ad2a15d98f955decb0fb64ffa2f66102be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/readers.swift:443-447 | Modules/Net/readers.swift:814-818 \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 \u0060Modules/Disk/readers.swift:443\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":"Modules/Disk/readers.swift"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"52cbb64295443b0e1cebb2dac33b59cbb52980f3631a01b5dce08e1d7fc339ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/GPU/popup.swift:67-71 | Modules/Sensors/popup.swift:221-225 \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 \u0060Modules/GPU/popup.swift:67\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":"Modules/GPU/popup.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf5ec92ccf9927ac8948fc95831ab68badae41c34011c2e834801852469aa1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Remote/popup.swift:441-445 | Modules/Remote/popup.swift:451-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/popup.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3f1484edbe7ce366f13a9fb058ce999a1d4a70114d4469eba6744414540e18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Sensors/values.swift:190-194 | Modules/Sensors/values.swift:207-211 \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 \u0060Modules/Sensors/values.swift:190\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":"Modules/Sensors/values.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee600d466cc91633da325777a073bbfceb5f72de23f49dd273c481082d5d90c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201321 lines \u00D7 16): Modules/CPU/notifications.swift:40-42 | Modules/CPU/notifications.swift:43-44 | Modules/CPU/notifications.swift:48-50 | Modules/CPU/notifications.swift:51-52 | Modules/CPU/notifications.swift:56-58 | Modules/CPU/notifications.swift:59-60 | Modules/CPU/notifications.swift:65-67 | Modules/CPU/notifications.swift:68-69 | Modules/CPU/notifications.swift:73-75 | Modules/CPU/notifications.swift:76-77 | Modules/Disk/notifications.swift:21-41 | Modules/GPU/notifications.swift:21-42 | Modules/RAM/notifications.swift:40-42 | Modules/RAM/notifications.swift:43-44 | Modules/RAM/notifications.swift:48-50 | Modules/RAM/notifications.swift:51-52 \u2014 there are 16 copies across 4 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 16 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/CPU/notifications.swift:40\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 after the matched lines, \u0060Modules/CPU/notifications.swift:42\u0060 calls \u0060Double\u0060, \u0060set\u0060 and \u0060Modules/CPU/notifications.swift:52\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":"Modules/CPU/notifications.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7f047f9c14b085c86be176f853b8bd1880377c9702d0ca4cd0832712915356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Kit/Widgets/LineChart.swift:41-54 | Kit/Widgets/NetworkChart.swift:27-40 \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":"Kit/Widgets/LineChart.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"6006849ce562458f1ab5491752020417d2070d8e2e94d270b5c10193d82e81a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/Mini.swift:33-38 | Kit/Widgets/Stack.swift:45-50 \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":"Kit/Widgets/Mini.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c1d7cb9e6417fe1a660ff2a0b585430259ce2727da60f634179d1ec421bce1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/Widgets/Stack.swift:429-433 | Modules/Clock/popup.swift:937-941 \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":"Kit/Widgets/Stack.swift"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefac3a9e832f752066594ae13bea52fdfbde21888843ab88c8ad2ba6b3af226"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Kit/Widgets/Stack.swift:435-440 | Modules/Clock/popup.swift:943-948 \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":"Kit/Widgets/Stack.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb8166d0175b8f5badd74d1f88bf670482087f5732399ca8cea1966fad850fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Modules/Battery/popup.swift:403-414 | Modules/GPU/popup.swift:189-200 \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":"Modules/Battery/popup.swift"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"10c057c0709a20d3678150f88d8893f50e848ad0de3dbbf384e2975183b3db82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Modules/Battery/settings.swift:61-67 | Modules/CPU/settings.swift:144-150 | Modules/Disk/settings.swift:190-196 | Modules/Net/settings.swift:295-301 | Modules/RAM/settings.swift:160-166 \u2014 \u0060Modules/CPU/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 5 separate duplicated blocks between them, totalling at least 40 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/settings.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37fc5f2fa1bc8e92329acf04cd14e996c0749d8cf40c181e1537082dbae5335"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Modules/Disk/popup.swift:468-472 | Modules/Disk/preview.swift:463-467 | Modules/Disk/preview.swift:548-552 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/popup.swift"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1fc5759928c2719d1c76e4d645747e27a5e1d793ef3bd470d2bfa469288d2d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/settings.swift:224-228 | Modules/Net/settings.swift:372-376 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec01d423a8b8ee66ad7c77821d8d4db92499ff4fd44e5dbf85e32a118312b479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/GPU/portal.swift:24-30 | Modules/RAM/portal.swift:38-44 \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":"Modules/GPU/portal.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9c54b3abfb55d10467c5593444e934983b58a9156cf012ba57eefdb1240d0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Net/popup.swift:104-110 | Modules/Net/preview.swift:55-61 \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":"Modules/Net/popup.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"2893227a2a037ec5ff9020d35ed5704ca44e159f45fff73b30654573299b4921"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/Net/popup.swift:112-118 | Modules/Net/preview.swift:63-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. The matched lines also transfer control out of the body holding them, 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":"Modules/Net/popup.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97e77859eae1117be3221b3c4bae5db3626c103f8de47e5c01295b57c44c047"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 8): Modules/Disk/settings.swift:203-207 | Modules/Disk/settings.swift:234-238 | Modules/Disk/settings.swift:239-243 | Modules/RAM/settings.swift:167-171 | Modules/RAM/settings.swift:172-176 | Modules/Sensors/settings.swift:176-180 | Modules/Sensors/settings.swift:181-185 | Modules/Sensors/settings.swift:190-194 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/RAM/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f64cabea3d5cdb20ccf169868cc1ceb5f93eaa78d55ce74dd4fcf4e7f26e2ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Kit/Widgets/PieChart.swift:127-135 | Kit/Widgets/Tachometer.swift:109-117 \u2014 before extracting anything, compare \u0060Kit/Widgets/PieChart.swift\u0060 and \u0060Kit/Widgets/Tachometer.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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":"Kit/Widgets/PieChart.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"83714e3f34282078a863b3b8028681bb15ffcd4433c519a2bd105f67f362edf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Kit/module/window.swift:583-587 | Stats/Views/AppSettings.swift:709-713 \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":"Kit/module/window.swift"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"35983aeb7a8295226aec2567b2cb156fbafae870abeb991f83a7b413820d8ac0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Battery/readers.swift:269-273 | Modules/CPU/readers.swift:229-233 \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":"Modules/Battery/readers.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"61a5dfac4e3fa19cce485a5652661bd4f0feca37fce01173abded4b820c22e51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Modules/CPU/popup.swift:199-206 | Modules/GPU/popup.swift:73-80 \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 \u0060Modules/CPU/popup.swift:199\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":"Modules/CPU/popup.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"651fdbca61f379dfc34fa5218b557b21a9b55b3f9058be214df26345d085dce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/popup.swift:239-243 | Modules/CPU/popup.swift:258-262 \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 \u0060Modules/CPU/popup.swift:239\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":"Modules/CPU/popup.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"0949d0f890754a5caa8ae4e025db1bb1a1b8b4662f18768c16f59f7b13fb6c5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/popup.swift:641-645 | Modules/RAM/popup.swift:393-397 \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 \u0060Modules/CPU/popup.swift:641\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":"Modules/CPU/popup.swift"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"05362f3de57ae56c71f38b41dced1773fc95cd1d800463d221952f79eb583bfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/CPU/popup.swift:682-686 | Modules/RAM/popup.swift:407-411 \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 \u0060Modules/CPU/popup.swift:682\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":"Modules/CPU/popup.swift"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c4bfccfc6bde7c8e1e67381c6208c77d240f50d875624af6f34217a5c6dc27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/popup.swift:856-860 | Modules/Disk/preview.swift:457-461 \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 \u0060Modules/Disk/preview.swift:457\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":"Modules/Disk/popup.swift"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8100de6246b9e50cbd1cdbed469111841bebdded7b041f3be7f7b67edcbb5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/readers.swift:225-229 | Modules/Disk/readers.swift:545-549 \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 \u0060Modules/Disk/readers.swift:225\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, \u0060Modules/Disk/readers.swift:550\u0060 calls \u0060removeValue\u0060, \u0060remove\u0060 and \u0060Modules/Disk/readers.swift:230\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":"Modules/Disk/readers.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44cdfb7a07b8eb178f34fb1d06f92e198704182df1488c60d819dd0a6c21a5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/settings.swift:229-233 | Modules/Net/settings.swift:377-381 \u2014 \u0060Modules/Disk/settings.swift\u0060 and \u0060Modules/Net/settings.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 7 separate duplicated blocks between them, totalling at least 54 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/settings.swift"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87b118e707d22d7a33dd6e758d72f1780ab7a0504168ed7e0884eaa9faab60f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Modules/Disk/widget.swift:88-92 | Modules/RAM/widget.swift:105-109 \u2014 \u0060Modules/Disk/widget.swift\u0060 and \u0060Modules/RAM/widget.swift\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 4 separate duplicated blocks between them, totalling at least 35 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Modules/Disk/widget.swift:88\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":"Modules/Disk/widget.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c85932f846b156ddb00f5aeaaf9f9918bff6c6469001e9d70be122164b7f29e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Modules/GPU/popup.swift:107-113 | Modules/RAM/popup.swift:188-194 \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":"Modules/GPU/popup.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"04483fb81b43d558e37add4e63c0e428d4963c3a00b6fc4b302ab9dc6b708e55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Stats/Views/Update.swift:187-191 | Stats/Views/Update.swift:261-265 \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":"Stats/Views/Update.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08de7bfd720bb492d7d91898ba23127fbb918cd0c82341a91d402aa35a8d932"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ApplicationSettings (LCOM4 28): ApplicationSettings\u0027s methods fall into 28 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 28 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":"Stats/Views/AppSettings.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9135088b6da4baff28f54d1fb9958d4fa9d3c8991ede41458a9bcd05d13b0e0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SystemKit (LCOM4 9): SystemKit\u0027s methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 9 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":"Kit/plugins/SystemKit.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da9647c6bb57eca2012bde925af56279501ba74233e8d5e963af3daba553b58"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SidebarView (LCOM4 8): SidebarView\u0027s methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 8 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":"Stats/Views/Settings.swift"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf4fe9b430808a31ef41fac90ea0f1341d19796c0e43b537a23c6b09c314af2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SettingsWindow (LCOM4 7): SettingsWindow\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 7 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":"Stats/Views/Settings.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7756c4e85386a151a5b8bf6940ccc28096c68b798fbb3b3cf3afcb0f610f32"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: String (LCOM4 7): String\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 7 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":"Kit/extensions.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a6a45160764dfae3a3dfcdbc8c5cd3a65167511b0a12f64177e3b5ad9764f9"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: NSView (LCOM4 7): NSView\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 7 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":"Kit/extensions.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"3812d69673a2b541908d88a545c0fcec5d4fc91c3f2a7a5e9d4dfab31e23df1e"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: HeaderView (LCOM4 4): HeaderView\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":"Kit/module/popup.swift"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea950e3a910995037b27a6a12050f7c4f28746adbd3a5302605a310c3e97e8f5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CalendarItemView (LCOM4 4): CalendarItemView\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":"Modules/Clock/popup.swift"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d14c1d9a1d1eced71d6e4a82037391036e20c461d044a86dfc5e3aca540d0a6"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: DetailsView (LCOM4 4): DetailsView\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":"Modules/Disk/popup.swift"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"eabbf47bec20f5f665cca6f659857dc0bd00ca2c2055cbd925bf9d76b7a3c6f8"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Helper (LCOM4 4): Helper\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":"SMC/Helper/main.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d5bf3f71f0b51b96a616d662cf993b41015fb8e92c7a9fd774dd60a6f2862c1"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: SetupWindow (LCOM4 4): SetupWindow\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":"Stats/Views/Setup.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f5f7eaea464209f0b82750d71cb2f94cc76894cd958490f758232f57ac949c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Disk/readers.swift: Modules/Disk/readers.swift changed 7 times in last 90 days, max cyclomatic complexity 33 in SMARTReader.getATASMART at line 644. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Disk/readers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/readers.swift"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"728f647021fe221d38b1eda4bcb93d71f36153c44922cfba0b57358d6bd741d1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/readers.swift: Modules/Net/readers.swift changed 8 times in last 90 days, max cyclomatic complexity 28 in UsageReader.getDetails at line 430. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Net/readers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/readers.swift"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"9266d5a8dd819c9fba9653d5259db0b51e7efebb9c72384941a5b38d522e28f2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/popup.swift: Modules/Net/popup.swift changed 4 times in last 90 days, max cyclomatic complexity 52 in Popup.renderUsage at line 413. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Net/popup.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/popup.swift"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0bba738e6d49bf851fd1713b36ca227608fd6de7a017e624b1e240eb2ff541"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Battery/readers.swift: Modules/Battery/readers.swift changed 7 times in last 90 days, max cyclomatic complexity 24 in UsageReader.read at line 60. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Battery/readers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/readers.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc74960f209a0f0a4220388a1d32423551339b34a02a91c1c8981ac22329b06"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/plugins/Charts.swift: Kit/plugins/Charts.swift changed 3 times in last 90 days, max cyclomatic complexity 54 in LineChartView.draw at line 272. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/plugins/Charts.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/Charts.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b36de50006a17cce90e56326c890db50f141e1b5c7abf7d6568f1dc22ee49d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/main.swift: Modules/Net/main.swift changed 3 times in last 90 days, max cyclomatic complexity 53 in Network.usageCallback at line 242. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Net/main.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/main.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"b912713177190690c9edb76f573d1bef5b2d7f4315ee42676b00b09a9f1aef6b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/Widgets/Battery.swift: Kit/Widgets/Battery.swift changed 5 times in last 90 days, max cyclomatic complexity 30 in BatteryWidget.draw at line 64. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/Widgets/Battery.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/Battery.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"40bba432f192fece44c022b4f9e19fcb431312a0b50f50bb2632f0c54cd3415e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/preview.swift: Modules/Net/preview.swift changed 4 times in last 90 days, max cyclomatic complexity 36 in Preview.usageCallback at line 233. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Net/preview.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/preview.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd2025588604c350cf20a56614c42cb04ce02dc50252afbbad916b4f19fbd20"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/module/widget.swift: Kit/module/widget.swift changed 4 times in last 90 days, max cyclomatic complexity 33 in widget_t.new at line 31. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/module/widget.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/module/widget.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74e1c9639e4a099c57ba1f886a4a76effc4181bb4d2042e4fddebe166248070"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/GPU/reader.swift: Modules/GPU/reader.swift changed 3 times in last 90 days, max cyclomatic complexity 42 in InfoReader.read at line 102. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/GPU/reader.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/reader.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe3635e213a94bc5bf09478fb4b19237a0ee17dda9859e5925ad31f8b793e45"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/CPU/readers.swift: Modules/CPU/readers.swift changed 5 times in last 90 days, max cyclomatic complexity 25 in LoadReader.read at line 42. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/CPU/readers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/readers.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"159db1d583bd794eed3d6516e13e753a6e11b900fb0488aef7defe31508a72fd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/plugins/SystemKit.swift: Kit/plugins/SystemKit.swift changed 3 times in last 90 days, max cyclomatic complexity 41 in SystemKit.getDiskInfo at line 540. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/plugins/SystemKit.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemKit.swift"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa189526731350058f93b9c3c67a5090f71a700347df88e6eea595430ff1641"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Sensors/readers.swift: Modules/Sensors/readers.swift changed 2 times in last 90 days, max cyclomatic complexity 59 in SensorsReader.read at line 129. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Sensors/readers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/readers.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"a03564bc36638fdd28bb72ed0725c465ff1065862147494e1668d280d514b15d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Disk/main.swift: Modules/Disk/main.swift changed 5 times in last 90 days, max cyclomatic complexity 22 in Disk.capacityCallback at line 309. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Disk/main.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/main.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18c731e0938249e5e87a4400fb2ba884a03f71073fb1bf6b1869a27b8d3d738"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Disk/preview.swift: Modules/Disk/preview.swift changed 4 times in last 90 days, max cyclomatic complexity 27 in Preview.capacityCallback at line 289. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Disk/preview.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Disk/preview.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"a644fb5bc1f27c9af6b39b44cc8db37c73f22d0769036cc6dc5401bb5f7557e3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/extensions.swift: Kit/extensions.swift changed 6 times in last 90 days, max cyclomatic complexity 16 in NSTextView.performKeyEquivalent at line 734. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/extensions.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/extensions.swift"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"09437e934f5fa6151e43dfb91752779a7c6e308631663ea471c3dbc2c2e620e7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Battery/popup.swift: Modules/Battery/popup.swift changed 5 times in last 90 days, max cyclomatic complexity 19 in Popup.renderUsage at line 295. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Battery/popup.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Battery/popup.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"016ce8b29e972d7b08a2f0f0955a6ee0e9b446244bc8f1b5ab978b3efaff0cd0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/plugins/SystemStats.swift: Kit/plugins/SystemStats.swift changed 5 times in last 90 days, max cyclomatic complexity 17 in SystemStats.command at line 334. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/plugins/SystemStats.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/plugins/SystemStats.swift"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"9393d0af6f17a143aea90c28babee4a5ef2957d4f408f0d987d70b129cdde696"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Stats/Views/AppSettings.swift: Stats/Views/AppSettings.swift changed 5 times in last 90 days, max cyclomatic complexity 15 in ModuleSelectorView.mouseDown at line 624. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Stats/Views/AppSettings.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/AppSettings.swift"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f811ad46f85e953a1bef1b9d2ee6e9bfb00d17f351347a1f000d30c1b99b167"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Bluetooth/readers.swift: Modules/Bluetooth/readers.swift changed 2 times in last 90 days, max cyclomatic complexity 36 in DevicesReader.read at line 111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Bluetooth/readers.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Bluetooth/readers.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89931cb17f74b1ed7e08da301652d87182b034a778fd45b1f35272ff19f7954"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Sensors/popup.swift: Modules/Sensors/popup.swift changed 4 times in last 90 days, max cyclomatic complexity 18 in Popup.setup at line 78. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Sensors/popup.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Sensors/popup.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3eb7c6f3a0ce14e98e862fcf53d659f189da487aee3f367c0460b9359b1d1f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Net/portal.swift: Modules/Net/portal.swift changed 3 times in last 90 days, max cyclomatic complexity 23 in Portal.usageCallback at line 150. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Net/portal.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Net/portal.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3ba57613fa3b2fb4a3ea2e12aaaf8ae120e38d9389870850ace0dc10d68b14a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/Widgets/BarChart.swift: Kit/Widgets/BarChart.swift changed 2 times in last 90 days, max cyclomatic complexity 27 in BarChart.draw at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/Widgets/BarChart.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d588fd424ff02248726b86d132501b6329b9ff4aeef29e1fe4d0c41e4c8fe85a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Clock/popup.swift: Modules/Clock/popup.swift changed 3 times in last 90 days, max cyclomatic complexity 17 in CalendarView.generateDays at line 390. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Clock/popup.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Clock/popup.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa5df1ed8ce3e5da7eea7f37e9a07f770675fa6b9bfd5720b39811cfdbeb2b4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Stats/AppDelegate.swift: Stats/AppDelegate.swift changed 3 times in last 90 days, max cyclomatic complexity 17 in AppDelegate.parseArguments at line 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Stats/AppDelegate.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/AppDelegate.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2519fc05502df3ea348325b2b5de3f35c5a7d6a981c543d9158e7158289ecee"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/GPU/main.swift: Modules/GPU/main.swift changed 2 times in last 90 days, max cyclomatic complexity 24 in GPU.infoCallback at line 168. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/GPU/main.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/GPU/main.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0dfd67e1fe2f2350bbd1a9edffd001d77f339e6b31610d80fc6b65c757cea19"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/CPU/portal.swift: Modules/CPU/portal.swift changed 3 times in last 90 days, max cyclomatic complexity 15 in Portal.callback at line 103. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/CPU/portal.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/portal.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad524c42ad24b0cc1bff0494b7adf7dac988789bed35e0ba058e19abc2b98d91"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Kit/Widgets/LineChart.swift: Kit/Widgets/LineChart.swift changed 2 times in last 90 days, max cyclomatic complexity 21 in LineChart.draw at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Kit/Widgets/LineChart.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/LineChart.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5851288bc01046ad8a779c72c8126e89a5e94d9d51ec103872302084f8623da"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Modules/Remote/popup.swift: Modules/Remote/popup.swift changed 2 times in last 90 days, max cyclomatic complexity 18 in Popup.callback at line 133. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Modules/Remote/popup.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/Remote/popup.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"e875380fb0d2f67e184a6542627bb0a680267055417638ec67d3d690a82fa3ef"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Stats/Views/CombinedView.swift: Stats/Views/CombinedView.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is CombinedView.togglePopup at line 143), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: fixed white block in the menu bar when combined modules separator is enabled (#3564)\u201D; \u201Cfix: fixed separator color in the combined modules (#3534)\u201D; \u201Cfix: fixed wrong module popup opening from the combined view\u201D; \u201Cfix: fixed invisible elements bug when enabling spacer between widgets (#3362)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-24 17:32:21 \u002B02:00\u0027 --until=\u00272026-09-22 17:32:21 \u002B02:00\u0027 --full-history --no-merges -- Stats/Views/CombinedView.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Stats/Views/CombinedView.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f286fdc4b040b498f3fb5a06547ea42d124f667b1c6983df23f494d886ff6d2"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no architecture or design documentation: No architecture/design documentation exists, so the outline entry \u0027Architecture/Docs\u0027 is not referenced. Create an Architecture/Docs markdown file describing the app\u0027s structure (components, layout) and any non-usage design decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"086460f2da112d94904fac5439f54a7780bc7778ff9375a067e428a1cc9a8a4c"}},{"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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D29","level":"error","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":"077cd6c75bdfdff7f09eb06b1402cf28960a49bc12db6c26d7a45395f1f957c4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","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":"4824d7e75baf44ce8896be36ed713517247b173f4b4881c55696cbf2a47eccc5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","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":"a84a248bf92b079aaf9c12193d221780e1ec64490863084dab25b1443b1b459d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","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":"4c4dfada5144b4b5edc296f7ac1ecf4c40a4493de3d493140c8afd4c7109b5d3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","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":"42a5c0f5d750ec300aa94c34750e7c4278dd680776157cc89a8f3832640293b9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","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":"9b92ec6f5584c5dfbeb616e3c6bfa605cd122a828326f258dcb136bbb00c1600"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","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":"a8cb072d4837982781609331716c192b3a4913b40886f97e0abc5409746576f3"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: main.swift \u2194 main.swift: \u0060Modules/CPU/main.swift\u0060 (context CPU) and \u0060Modules/RAM/main.swift\u0060 (context RAM) sit in DIFFERENT parts of the tree yet change together 55% of the time (30 of the 55 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 30 shared commits counted here, the most recent 3 are \u00601c6bac47\u0060 feat: removed segment_color and moved to the ColorValue; \u006052d21619\u0060 feat: changed the default value of \u0060macOS widgets\u0060 to disabled to pre\u2026; \u00601b1a338d\u0060 feat: add option to disable system-widget updates for users experienc\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf60171288d1c31054de76ff765a1e7f283e8971aaa1ee75e29693fd8394429"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: main.swift \u2194 main.swift: \u0060Modules/CPU/main.swift\u0060 (context CPU) and \u0060Modules/GPU/main.swift\u0060 (context GPU) sit in DIFFERENT parts of the tree yet change together 51% of the time (22 of the 43 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are \u00601c6bac47\u0060 feat: removed segment_color and moved to the ColorValue; \u006052d21619\u0060 feat: changed the default value of \u0060macOS widgets\u0060 to disabled to pre\u2026; \u00601b1a338d\u0060 feat: add option to disable system-widget updates for users experienc\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Modules/CPU/main.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa49f7d8ade037c411d2ae1a0adf6d1c359728031d8f489c69d8f6ce3cdb251e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: BarChart.swift \u2194 LineChart.swift: \u0060Kit/Widgets/BarChart.swift\u0060 and \u0060Kit/Widgets/LineChart.swift\u0060 change together 50% of the time (15 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are \u00600b847238\u0060 feat: small improvements in the widgets; \u0060a9f72cda\u0060 fix: fixed line and bar charts title labels; \u006003e37cfc\u0060 feat: removed macOS 10.14* checks \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Kit/Widgets/BarChart.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bac2526ab93046b9fa9ee18717bb79af20923cb2f4302b68ab8d032f358ce8b5"}},{"ruleId":"D36","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":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"}},{"ruleId":"D36","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":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"D36","level":"warning","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":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"D36","level":"warning","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":"9658270ba49f37ed04e99ab1263b6393cd42aed8bdfb7aafd9fa1070f5491895"}},{"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":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"M3","level":"note","message":{"text":"No src/ separation: Production code isn\u0027t grouped under a src/ folder \u2014 it\u0027s spread across several top-level directories, so there\u0027s no one place that says \u0027this is the product\u0027."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: README advertises Docker containerisation, but no Dockerfile/compose file exists \u2014 searched for: \u0060dockerfile\u0060, \u0060docker-compose\u0060, \u0060compose.yaml\u0060, \u0060compose.yml\u0060. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README\u0027s own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read \u2014 a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d116e696b89ee5b5606de54018788ae795afe8387ffcf59a3c5f5c024f4aec80"}},{"ruleId":"M4","level":"note","message":{"text":"README/code drift: README advertises a RAG / ML engine, but no ML/RAG code or dependency exists \u2014 searched for: \u0060rag\u0060, \u0060langchain\u0060, \u0060llamaindex\u0060, \u0060pinecone\u0060, \u0060weaviate\u0060, \u0060qdrant\u0060, \u0060embeddings\u0060. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README\u0027s own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read \u2014 a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"641c12de6a27c56ae4f356e613243d119d1728768480ea36e3ea12271e12b02c"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1118 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":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}}],"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-1104","guid":"4c918cb5-b2a6-6c55-9963-a44ee464305e","name":"CWE-1104","shortDescription":{"text":"CWE-1104"},"helpUri":"https://cwe.mitre.org/data/definitions/1104.html"},{"id":"CWE-1329","guid":"f70f1c3f-4ccf-cb5e-bdd3-03ba4868d36d","name":"CWE-1329","shortDescription":{"text":"CWE-1329"},"helpUri":"https://cwe.mitre.org/data/definitions/1329.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"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":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"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":11,"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."]}]}