{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"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"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"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":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"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"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"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":"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":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"SpeechRecognizer.beginRecognition (cyclomatic 53): SpeechRecognizer.beginRecognition has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 29 methods over the threshold \u2014 including the worst \u2014 and 81 of the 247 points over it (33%), 2.8\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 29). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"641dd3e4f108498e03c54c8a10cab6a351072363e8829b86db1c7a1ebe74b88b"}},{"ruleId":"D1","level":"warning","message":{"text":"DictationManager.beginRecognition (cyclomatic 38): DictationManager.beginRecognition has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DictationManager.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"098e8a2c2ddee0e7ea08587edee88c1ff3a549d96f035201d04749a8216e89ff"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptMatcher.wordLevelMatch (cyclomatic 38): PromptMatcher.wordLevelMatch has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Speech/PromptMatcher.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee8989ad2d91a8ce18ef0f87324cbd9c6ed26d9a664435f8d1abb785e381a5b"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechRecognizer.wordLevelMatch (cyclomatic 36): SpeechRecognizer.wordLevelMatch 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 29 methods over the threshold \u2014 including the worst \u2014 and 81 of the 247 points over it (33%), 2.8\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 29). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f2dc9c2e95f82bc2a7c0bdbb1586c45b75a369ddb3f4f49251c651e57f6a17e"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechScrollView.body (cyclomatic 30): SpeechScrollView.body has cyclomatic complexity 30 (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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca132f4ec14bd703dd39bf2a45ac47e943f1820546ba92b1732f71e6bf32fe6a"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechRecognizer.restartTask (cyclomatic 27): SpeechRecognizer.restartTask has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 29 methods over the threshold \u2014 including the worst \u2014 and 81 of the 247 points over it (33%), 2.8\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 29). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"091f5241c4e7783167734d41d1224470e66b80174b838da5577112f7531e8796"}},{"ruleId":"D1","level":"warning","message":{"text":"FloatingOverlayView.body (cyclomatic 25): FloatingOverlayView.body 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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"09dd71aa2fd7233f580588ca2da4c575af19e76b428088ab147c54b469942818"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechRecognizer.charLevelMatch (cyclomatic 25): SpeechRecognizer.charLevelMatch has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 29 methods over the threshold \u2014 including the worst \u2014 and 81 of the 247 points over it (33%), 2.8\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 29). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"4534d700902954decf96ae96fc24b8bcfc2c21f1ffd1fad3748059c5ab6014ec"}},{"ruleId":"D1","level":"warning","message":{"text":"Coordinator.update (cyclomatic 24): Coordinator.update has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptTextView.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be3ececec7afd91b40f776f7a746a0f8c1f85628ba2a5e210b4eacc7e29fd2b"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentView.mainContent (cyclomatic 23): ContentView.mainContent has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ContentView.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e77141dba2ac6e3444011d1172ce51b3f2ef2bc5b7225000f6acce8f8c1f38"}},{"ruleId":"D1","level":"warning","message":{"text":"NotchOverlayView.body (cyclomatic 23): NotchOverlayView.body 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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"684dda57553870bdb81f66e347a4d15d876be696a53790260b9f2f97ef4952fa"}},{"ruleId":"D1","level":"warning","message":{"text":"CaptureController.prepare (cyclomatic 23): CaptureController.prepare 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":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e0f5c66fe765460bf4f55ebc2606433edd03afdb61609a40995ca173a8a3c4"}},{"ruleId":"D1","level":"warning","message":{"text":"PPTXNoteXMLParser.parser (cyclomatic 22): PPTXNoteXMLParser.parser has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/PresentationNotesExtractor.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c399b669165fd0a004c4257c134775c8959f3f1ceff9aaff76a8b756d2f560"}},{"ruleId":"D1","level":"warning","message":{"text":"SettingsView.body (cyclomatic 22): SettingsView.body has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SettingsView.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd19b532e811ca77b4b059f2cae70d1562b97fc19d69c5bf2e72ac5b6b5cb011"}},{"ruleId":"D1","level":"warning","message":{"text":"WordFlowLayout.body (cyclomatic 21): WordFlowLayout.body has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d713045877e142d8c19f4274d4f747b7e65d3110eff56446992995ae99b718c"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptMatcher.characterLevelMatch (cyclomatic 21): PromptMatcher.characterLevelMatch 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":"Textream/TextreamiOS/Speech/PromptMatcher.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cfa2965bc1d1fbbfcf234293228bb63c7914bd21ae38d2da705ca3345e4c4fe"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentView.body (cyclomatic 20): ContentView.body 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":"Textream/Textream/ContentView.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"3471808d86b76e6639f28a76f49d1c0312243a9ca9e5a390cf20bf38b0dd41d9"}},{"ruleId":"D1","level":"warning","message":{"text":"NotchOverlayView.prompterView (cyclomatic 20): NotchOverlayView.prompterView 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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"022ee9a099cc8193f4f99d81d3fb09563fa25b2d12bf595213ddfbe2669b5099"}},{"ruleId":"D1","level":"warning","message":{"text":"FloatingOverlayView.floatingPrompterView (cyclomatic 20): FloatingOverlayView.floatingPrompterView 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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"edeac63a11e2db0d1753c6b8e4ad03c36d709acb61a2cd103879c825f17ea741"}},{"ruleId":"D1","level":"warning","message":{"text":"CaptureController.configureAndStart (cyclomatic 20): CaptureController.configureAndStart 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":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"44ba32b304bf18e48eee486ebea0d154712e8d89afdf6d9a6e6cf91553f88b31"}},{"ruleId":"D1","level":"warning","message":{"text":"SettingsView.appearanceTab (cyclomatic 19): SettingsView.appearanceTab has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SettingsView.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"37990aa02ac8c6a168ffd078b7f84255dfba7f7f14d7e29c846411ba5885aa3d"}},{"ruleId":"D1","level":"warning","message":{"text":"ExternalDisplayView.body (cyclomatic 17): ExternalDisplayView.body 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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed8cae6b1a39e8b4c3fc0fcb99ce476f19d706c24ced6d81d054f8d1b86c6c0"}},{"ruleId":"D1","level":"warning","message":{"text":"NotchPreviewContent.body (cyclomatic 17): NotchPreviewContent.body 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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad14e287e34c469b3d8e4ebaaa1d026fa0d1d16736bd1ffabbca32cdc95e855f"}},{"ruleId":"D1","level":"warning","message":{"text":"CaptureController.startRecording (cyclomatic 17): CaptureController.startRecording 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":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"56599cbef5bbaf534878ad500ce99b94993800d3bd4cc3fc3e61864699f7d6b7"}},{"ruleId":"D1","level":"warning","message":{"text":"CaptureController.configureSession (cyclomatic 17): CaptureController.configureSession 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":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"2861fa3283b3f6c153f8ccbb3a4ea6e56ede631ebb0aa15b47758641573b94c5"}},{"ruleId":"D1","level":"warning","message":{"text":"SavedRecordingsStore.loadRecordings (cyclomatic 16): SavedRecordingsStore.loadRecordings has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/SavedRecordingsStore.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"3597d4a7eea4bab7d37cca75cc9377ca0af7caf077054cdcfcce80f60f6a1874"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptSessionController.statusText (cyclomatic 16): PromptSessionController.statusText 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":"Textream/TextreamiOS/Models/PromptSessionController.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"9167102188f8aa82a65091d3bd3035d9e96c528d5b2bf9e4968ec42ba9dddfcf"}},{"ruleId":"D1","level":"warning","message":{"text":"SpeechFollower.beginRecognition (cyclomatic 16): SpeechFollower.beginRecognition has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Speech/SpeechFollower.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a3d2bb8de21ac16bf5692c36f24bbd0f0bdf7cc2415e08400cc772697c3c3e"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptSessionView.body (cyclomatic 16): PromptSessionView.body has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"f44a749a3c4e6da14dfb9003dc137dea175041cd9f6d479636178653b268ddc9"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechRecognizer.beginRecognition (cognitive 86): SpeechRecognizer.beginRecognition has cognitive complexity 86 (threshold 15). Drivers by points: if/else 38 (66 pts), boolean chains 18, error handling 1, loops 1 (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. This file is where this pass\u0027s cognitive complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 32 methods over the threshold \u2014 including the worst \u2014 and 190 of the 511 points over it (37%), 2.5\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 77). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"36423287cbbf83ec1695de7c4e2b5938ef3b7f43d20c04c65f9eda54125c1b85"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechRecognizer.wordLevelMatch (cognitive 73): SpeechRecognizer.wordLevelMatch has cognitive complexity 73 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 14, loops 5 (13 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 32 methods over the threshold \u2014 including the worst \u2014 and 190 of the 511 points over it (37%), 2.5\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 77). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"13cc1859554680f181d14b501c51bfca8f22fa227da47659e21e84b957079447"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptMatcher.wordLevelMatch (cognitive 73): PromptMatcher.wordLevelMatch has cognitive complexity 73 (threshold 15). Drivers by points: if/else 19 (46 pts), boolean chains 14, loops 5 (13 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Speech/PromptMatcher.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d7fe0d244c09e0117bfb58794ff9b171eea0f5e1ac7d677571575ec5eb8275"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechRecognizer.charLevelMatch (cognitive 53): SpeechRecognizer.charLevelMatch has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 32 methods over the threshold \u2014 including the worst \u2014 and 190 of the 511 points over it (37%), 2.5\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 77). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb0f7fbd631277bf24e3877fe1ada32ba5181a9135eb3a622f5d5c40a51d030"}},{"ruleId":"D2","level":"warning","message":{"text":"DictationManager.beginRecognition (cognitive 49): DictationManager.beginRecognition has cognitive complexity 49 (threshold 15). Drivers by points: if/else 27 (36 pts), boolean chains 11, error handling 1, 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":"Textream/Textream/DictationManager.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"18aef829652710665d1ff7929c54ffaba813185946d06ec204abc1458cba4065"}},{"ruleId":"D2","level":"warning","message":{"text":"FloatingOverlayView.floatingPrompterView (cognitive 40): FloatingOverlayView.floatingPrompterView has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 6 (15 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3483773d7890af34d74863845266d2e950d9dbb08a9cbe060110160371777a8"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechRecognizer.restartTask (cognitive 38): SpeechRecognizer.restartTask has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 11 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass\u0027s cognitive complexity CONCENTRATES: Textream/Textream/SpeechRecognizer.swift holds 4 of the 32 methods over the threshold \u2014 including the worst \u2014 and 190 of the 511 points over it (37%), 2.5\u00D7 the next-largest file (Textream/TextreamiOS/Speech/PromptMatcher.swift at 77). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd5caad021ebc4309e9ceda9c9d957b9f3554e53a0262d0bc4d43abfd3a3538c"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechScrollView.body (cognitive 37): SpeechScrollView.body has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 10, ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde726d61bce8bd96ca5cd444dcd94e6e1fe4b1f101c8fb6c98401357d784052"}},{"ruleId":"D2","level":"warning","message":{"text":"NotchOverlayView.prompterView (cognitive 34): NotchOverlayView.prompterView has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (21 pts), ternaries 6 (11 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d47ac53e4be2e1f580c84ec19260e126aa91eebbcf115517eb72c29cd9c58be"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptMatcher.characterLevelMatch (cognitive 34): PromptMatcher.characterLevelMatch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (8 pts), boolean chains 6 (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":"Textream/TextreamiOS/Speech/PromptMatcher.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"5727a4be515a2e62828721a18e18ed839886d8dd4cfde833801293e00495be74"}},{"ruleId":"D2","level":"warning","message":{"text":"CaptureController.prepare (cognitive 32): CaptureController.prepare has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 10, 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":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"336372e3472283ef8ff7359ac3d1cccb0c3762f3bd00ed5c7abed8aa20c9e7b4"}},{"ruleId":"D2","level":"warning","message":{"text":"NotchOverlayView.body (cognitive 31): NotchOverlayView.body has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 5, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"7859ee637ecbee0263271dd2f34973e6585fe5bea5b034fa61cfb8e59521496f"}},{"ruleId":"D2","level":"warning","message":{"text":"FloatingOverlayView.body (cognitive 31): FloatingOverlayView.body has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6, ternaries 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d7db17429467e886e0220850c69a6f2b946dfbe93b447b1d0d854f429b6d31"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.mainContent (cognitive 26): ContentView.mainContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, ternaries 6 (7 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ContentView.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca876b02838d3250a761f84399290ec4be6533f3d0921f63e8646f9540051cb2"}},{"ruleId":"D2","level":"warning","message":{"text":"Coordinator.update (cognitive 25): Coordinator.update has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 17, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptTextView.swift"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a50065d1592762a920bb7561e99fad9f58585ca7dac84a99dd65cdc0955f7bb"}},{"ruleId":"D2","level":"warning","message":{"text":"CaptureController.configureSession (cognitive 23): CaptureController.configureSession has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f3e5bad11709467d51c0ecd9469c44e4f39130b5373cb7b2c79f1220331f74"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentView.body (cognitive 22): ContentView.body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ContentView.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"99d6937ab8e196bc9ac513b1a1345f01f704bd94e2529f86f1893013cc148fdc"}},{"ruleId":"D2","level":"warning","message":{"text":"PPTXNoteXMLParser.parser (cognitive 22): PPTXNoteXMLParser.parser has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/PresentationNotesExtractor.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e5d0feb60b80d05fd253c9858d311433a7820b63de56029dc814c8dfa281ecf"}},{"ruleId":"D2","level":"warning","message":{"text":"CaptureController.configureAndStart (cognitive 22): CaptureController.configureAndStart has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), ternaries 2 (4 pts), error handling 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc065c38453b75ec9dd3625561aec364456abbafa1bd66a94c244b8d87fd346d"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptSessionView.bottomControls (cognitive 21): PromptSessionView.bottomControls has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"e65f8581a6a92affa7c5dcfe842be2b05f5a60be2cfb31b873050fc2aeafe07c"}},{"ruleId":"D2","level":"warning","message":{"text":"WordFlowLayout.body (cognitive 20): WordFlowLayout.body has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6, boolean chains 5, if/else 5, loops 4. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d7884e768b18453106cfae1009ef603ecad491a6d693c5d31eac8e317916e0"}},{"ruleId":"D2","level":"warning","message":{"text":"NotchPreviewContent.body (cognitive 20): NotchPreviewContent.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, ternaries 9, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SettingsView.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"03122e438c841dd91944d7bda32db4cb95898ad932ccdb83a0457dde84e5d1f0"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsView.body (cognitive 20): SettingsView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 2, match/switch 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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fdf3b3642607be6f3d0320699324877d225e6aa404a63c46f8759bc35ae782a"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptSessionController.statusText (cognitive 20): PromptSessionController.statusText has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 8 (9 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Models/PromptSessionController.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8575fb063966976ad7c96f4036f8fe1e63c45bc348fa1d86cb527766723cee"}},{"ruleId":"D2","level":"warning","message":{"text":"ExternalDisplayView.body (cognitive 19): ExternalDisplayView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, 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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f024453188a46d596a9a9699e80edfea68d4858067d0e5a834eceb24590fce2"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptScript.makeAnnotationStyleRanges (cognitive 19): PromptScript.makeAnnotationStyleRanges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Models/PromptTextProcessor.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"f422d129b3739fb49706da086a8dfbe8e6f3dd7030d7aa4491ab0bd118b65f46"}},{"ruleId":"D2","level":"warning","message":{"text":"SettingsView.appearanceTab (cognitive 18): SettingsView.appearanceTab has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 18. 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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6617cf1d3e1018fdf4c0dcba1a41d28bc56dd8e5b054d9773c55e7881c9674a"}},{"ruleId":"D2","level":"warning","message":{"text":"index.html.runDirectorCycle (cognitive 18): index.html.runDirectorCycle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts) (nesting depth added 9). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 3366). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/index.html"},"region":{"startLine":3316}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bffa00cb8b754fdbe7ef1dd730214eccb8f6b49cd0eee6ae55b2a98734e7e0"}},{"ruleId":"D2","level":"warning","message":{"text":"SpeechFollower.beginRecognition (cognitive 17): SpeechFollower.beginRecognition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Speech/SpeechFollower.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"d277676e6d40cb6523b8fb92797d6d8753ea716d2362d83ed8bfb376e20cd672"}},{"ruleId":"D2","level":"warning","message":{"text":"ExternalDisplayView.prompterView (cognitive 16): ExternalDisplayView.prompterView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (6 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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"699a7c0d8da0991ad60ecc7deef47ccd50ff655c7eb2d7aa91de18c2df60d5a8"}},{"ruleId":"D2","level":"warning","message":{"text":"CaptureController.startRecording (cognitive 16): CaptureController.startRecording has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4, error handling 1, loops 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c663e17f6366fded7436961c6956e59a8fd29af0cd0738213657abd304f3b14"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptSessionView.body (cognitive 16): PromptSessionView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc1d42ea434f4cca27b2120b9c9cda9c331f7fb5da0d0d8b47a3496a4f481b9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BrowserServer.generateHTML: MethodTooLong \u2014 generateHTML runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69\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":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"15cadc47e8747509308671730eb501ce5142d92db05244d3c1caf83824ea0284"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Textream/NotchOverlayController.swift: FileTooLong \u2014 1220 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 720 over it, 2.44\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d29946ac46687f13831f3f5cc4a7115ab371946aaa3f4059905466f3fdfd82"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DirectorServer.generateHTML: MethodTooLong \u2014 generateHTML runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DirectorServer.swift"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"583bf67f6b7edc5643bddff9e0dfe37d0a1a29e330a9dede8fc6374991948d66"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Textream/SettingsView.swift: FileTooLong \u2014 1095 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: SettingsView (384-1567). The bar is 500 significant lines; this is 595 over it, 2.19\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b06ee479b6e15a2b3c401723f2639922173432b1d5c70f919539c09383fafd3"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SettingsView: ClassTooLong \u2014 830 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 430 over it, 2.08\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"d937172deaff12a131c7c46621176f8054adc5b21077cb4092d7b253a5ba17cd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PromptSessionView.body: MethodTooLong \u2014 body runs 189 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 89 over it, 1.89\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":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bb05126ed4f364f3e1157f2e60ce5f764bef3325e8682fe66dc54033ff0739"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NotchOverlayView.prompterView: MethodTooLong \u2014 prompterView runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d0725986d4dca3293ecd1255a9205913cdea05c0f003675101f0db2419240e5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SpeechRecognizer.beginRecognition: MethodTooLong \u2014 beginRecognition runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4a56a9a6fded13d9b42c60a907a6487e0bce419621702dc053d1d600d7d3ae"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SpeechRecognizer: ClassTooLong \u2014 659 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 259 over it, 1.65\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fcd72b3e03ca825b7fd1ca4fcbf7697b27dce9097cb52cddbf5e5bc717bd0c5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsView.appearanceTab: MethodTooLong \u2014 appearanceTab runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8804135750b52d3d7e2714a0c0a04a778e497371c61f877261d724a3985dd6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/PromptSessionView.swift: FileTooLong \u2014 775 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: PromptSessionView (4-686). The bar is 500 significant lines; this is 275 over it, 1.55\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":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db449c5f7a6546f54b512aaa4009ba25fc9233cd2e60e4266f799e8e9629a4b6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsView.teleprompterTab: MethodTooLong \u2014 teleprompterTab runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"2756633ad9ad8c549bd12b4b0759ead71627b6d61eb4c7d5c4e87a41c05227d0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SpeechScrollView.body: MethodTooLong \u2014 body runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f49c3fa2808aab189a28eb94380e2360d582e078c020692c81d49ebea74815"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CaptureController: ClassTooLong \u2014 592 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 192 over it, 1.48\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"db463a4e109c5ae6e355f60734092cea31cde5c1fd3a722d33640aaae2812d1c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsView.body: MethodTooLong \u2014 body runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\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":"Textream/TextreamiOS/Views/SettingsView.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"37806a1786daa3742642bf5a03288148d7b5dd08bd709a5aab03299bfa73d362"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Textream/SpeechRecognizer.swift: FileTooLong \u2014 720 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: SpeechRecognizer (101-1119). The bar is 500 significant lines; this is 220 over it, 1.44\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f470044f44be6a63c744cecedd318a3e1cb7be3b9950ce4994864029a972bb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ContentView: ClassTooLong \u2014 561 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 161 over it, 1.40\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b8f5e92aacddde8272300c0d37ab888bd1fe3af43e09d78bb3ec9d7948dc9d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Textream/MarqueeTextView.swift: FileTooLong \u2014 674 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 174 over it, 1.35\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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd03fd7f00a98cb18bf6424ab989a1dd354a4db9b73e9296160a10f2c0a5bb9f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FloatingOverlayView.floatingPrompterView: MethodTooLong \u2014 floatingPrompterView runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"36140eb7eba99147b7005b5a2fd3ed1267e79705253850e1b9ab842916d3f8c4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Capture/CaptureController.swift: FileTooLong \u2014 651 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: CaptureController (82-893). The bar is 500 significant lines; this is 151 over it, 1.30\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":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d5de69ea69d58f541d63fff41d7ae046a704a1e7801418c18cd00b0f1fd31be"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: PromptSessionView: ClassTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 114 over it, 1.29\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":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"45534bb7078f50436a1f776a1a6dec4c09bcb62c9bc57ef4d46a5fa5c9d65f01"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Textream/ContentView.swift: FileTooLong \u2014 641 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: ContentView (12-810). The bar is 500 significant lines; this is 141 over it, 1.28\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6a7246c6da4f27bbee7fa911d0a4b28ccbcf4234c2698fbb3025689a30fc396"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CaptureController: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"b744663e744d424fb133e3391b943ec52153d2fd6afb4a5e77fd5af452b6e5d6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DictationManager.beginRecognition: MethodTooLong \u2014 beginRecognition runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DictationManager.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2832750c547f10d9c9fa8782f3ee2e5e2e96729e42228b912298c310f302f1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/PromptTextView.swift: FileTooLong \u2014 599 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 99 over it, 1.20\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":"Textream/TextreamiOS/Views/PromptTextView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83d7b087e26cc6e3680c3a2fe33ef3a24250b09fa26c0692360c2bec725d38d3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentView.mainContent: MethodTooLong \u2014 mainContent runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d4b40a27c72a22d01018fbd925ae982963725da8dc07d6d417b6306f224bc7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BrowserServer: ClassTooLong \u2014 447 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 47 over it, 1.12\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b759d70d535fc36bf9bdb5df247c192e8ad467c2f303db2e9dc0eb97de4e23d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentView.body: MethodTooLong \u2014 body runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c718109972a6824f264ff916861d2984bb4cf65594021af9683608bcf6a19f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NotchPreviewContent.body: MethodTooLong \u2014 body runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d25a795a0f59a10a28a5fe7fc43c2b0ee6da3d4211f3208165a7d0613d7ec22"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SpeechRecognizer: 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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f37a44b1e597eedbe9d9d3ef55afff00644139baa7e8cbf4218c30e336edb9b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SettingsView.body: MethodTooLong \u2014 body runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SettingsView.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa182fafb02eb792aa422287af126062d2653c1484c12e20ed7b9f833e027f5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NotchOverlayView: ClassTooLong \u2014 410 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 10 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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7e70289dadf9b1fab3fa5de4ece02c6eeb3da1ffffe166a5151976dd87290a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 41 shared lines): Textream/Textream/ExternalDisplayController.swift:239-324 | Textream/Textream/NotchOverlayController.swift:921-1132 | Textream/Textream/NotchOverlayController.swift:1442-1603 \u2014 These 3 members are variants of one another: a block of 41 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\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 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"8930d4e1285026e37a71ae707c5a8e0fe89119fb7c49993896f1776b56ef6287"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (57 shared lines): Textream/Textream/SettingsView.swift:1193-1300 | Textream/Textream/SettingsView.swift:1307-1423 \u2014 These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"124362ce8ea966e643522b65ba1ee0a234f003ebc5b6593e41b0de0c88a8a203"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Textream/Textream/BrowserServer.swift:253-264 | Textream/Textream/ExternalDisplayController.swift:137-148 | Textream/Textream/NotchOverlayController.swift:718-729 | Textream/Textream/NotchOverlayController.swift:1301-1312 \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":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1758f612877f7edd6e4ce2c1ad1a2ce6ca3edd1e484ac97ebd048ffe9a0e81"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (85 corresponding lines): Textream/Textream/SpeechRecognizer.swift:975-1079 | Textream/TextreamiOS/Speech/PromptMatcher.swift:152-236 \u2014 These two members are one piece of code written twice and then edited apart: 85 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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"107634770f7e96f25c0ee63e1d6829a1c29c1678c38570e3b7702db05b3195ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (71 corresponding lines): Textream/Textream/SpeechRecognizer.swift:876-967 | Textream/TextreamiOS/Speech/PromptMatcher.swift:80-150 \u2014 These two members are one piece of code written twice and then edited apart: 71 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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"872d3d40c9f334b7b648fc2dae15b56a7ca12c3bebf2f4c3030c8cdfbb397ffd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 38\u002B corresponding lines): Textream/Textream/ExternalDisplayController.swift:326-363 | Textream/Textream/NotchOverlayController.swift:1211-1250 | Textream/Textream/NotchOverlayController.swift:1682-1730 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"60129d3cbfae8e86bce600eef61d64911ee6227f4c32380f933eea780c045e17"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Textream/Textream/SpeechRecognizer.swift:1081-1098 | Textream/TextreamiOS/Speech/PromptMatcher.swift:238-250 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1081}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f441da1d67a6fefe969d1374e188c32cda09184381312cae6ec67811e64bbd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Textream/TextreamiOS/Views/PromptTextView.swift:572-592 | Textream/TextreamiOS/Views/PromptTextView.swift:598-632 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptTextView.swift"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"273fc47891af429369d75574f5b5789c7c41ba863c111d8c24b63537564c481c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Textream/Textream/MarqueeTextView.swift:32-62 | Textream/TextreamiOS/Models/PromptTextProcessor.swift:16-45 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f61a720b73bb700dd1fbd061807386d68b7c1a40f07a3695924c1e8b054670"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Textream/Textream/SpeechTextAlignment.swift:4-28 | Textream/TextreamiOS/Speech/SpeechTextAlignment.swift:4-21 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"85bd0cdd7faa9100df1bb48f5bccedafc7fefb0e1bb98c2904e582733cbd0a43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Textream/Textream/LanguageDetection.swift:40-59 | Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift:24-42 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/LanguageDetection.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ab9451e68fde9c1dce28d5b53c227da332e0164c0cb9c7c5fe0955bcc9fce12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Textream/Textream/DictationManager.swift:62-88 | Textream/Textream/SpeechRecognizer.swift:213-239 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Textream/Textream/DictationManager.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb35921dc95c041513e5cdb848867df79e19a9e51ef49d86e1e98889cd7cb90e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Textream/Textream/SpeechRecognizer.swift:1100-1113 | Textream/TextreamiOS/Speech/PromptMatcher.swift:252-270 \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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1100}}}],"partialFingerprints":{"codehealthFindingId/v1":"28975870dcd54f28ecb40637cbd0c4c545c1d90fce44eca85b99865e9ab8a39f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Textream/Textream/MarqueeTextView.swift:384-410 | Textream/Textream/MarqueeTextView.swift:412-428 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d58367d58568aa9c0d6c0b2933b91622b23846b592ba2e5c8776d0ff4fe7f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): Textream/Textream/SpeechTextAlignment.swift:30-44 | Textream/TextreamiOS/Speech/SpeechTextAlignment.swift:23-37 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"f36d3b89d3f277db20e40c2e3f1551795f9e02ccc3818add77e0fe6837c0e985"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Textream/TextreamiOS/Views/PromptSessionView.swift:635-645 | Textream/TextreamiOS/Views/PromptSessionView.swift:647-655 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Views/PromptSessionView.swift"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"29d7965d9aabb7aae5a63d691aad1ebec133831d5fe2dfa74bdc39982ac99dd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Textream/Textream/DictationManager.swift:331-343 | Textream/Textream/SpeechRecognizer.swift:359-375 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DictationManager.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ae0394a8b850ccbb8b75ca2937755ffa5e8bfa74442aa86e39e0e3443f7ef5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Textream/Textream/MarqueeTextView.swift:18-27 | Textream/TextreamiOS/Models/PromptTextProcessor.swift:4-13 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"893f005708165ebd204544bc4fc0a2ed12682713cd105ba18fab771b1eb43dcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Textream/Textream/DictationManager.swift:90-105 | Textream/Textream/SpeechRecognizer.swift:250-265 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DictationManager.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e34e010948d128f8d3adae10f0f94580da669912589c88580654d38b3ba07a9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Textream/Textream/TextDirection.swift:11-28 | Textream/TextreamiOS/Models/PromptTextProcessor.swift:51-66 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/TextDirection.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"15067b316410d1e9c91ce619b59010adc55862e5a4389f38c52504a0ab0736ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Textream/Textream/DictationManager.swift:127-145 | Textream/Textream/SpeechRecognizer.swift:324-342 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DictationManager.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"c84b164bc1384ba2617f325e8a19a4949f0a940d2a5f6ce1eef2cf324028b811"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Textream/Textream/BrowserServer.swift:127-132 | Textream/Textream/DirectorServer.swift:144-149 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"28147e7799caf0a58010867e6051f1e4c4946301ec792fad1816ed978634350d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Textream/TextreamiOS/Capture/CaptureController.swift:708-717 | Textream/TextreamiOS/Capture/SavedRecordingsStore.swift:418-426 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7d86ae391ec0c7de382780d1864ecd2b1585291d2e23f56242dc5b52c072fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Textream/TextreamiOS/Capture/CaptureController.swift:845-854 | Textream/TextreamiOS/Speech/SpeechFollower.swift:242-250 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a4df6d7b9a39fc0bc81c5615221beff7179453b1b38c6c1a41361d0b03cbe97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Textream/Textream/MarqueeTextView.swift:858-865 | Textream/Textream/SpeechRecognizer.swift:969-973 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":858}}}],"partialFingerprints":{"codehealthFindingId/v1":"e88c9bd49de31b85b8f11c943214e9de4574407708a33a1ceaa0ce87f2f6bc83"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): Textream/Textream/BrowserServer.swift:57-69 | Textream/Textream/DirectorServer.swift:77-90 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2bf41fe932885ba0f7ec73a466974d5efe65b3821444f611eb7a96833e5ab24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Textream/Textream/NotchOverlayController.swift:175-182 | Textream/Textream/SettingsView.swift:138-145 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"e22563f3b2c1f9bcdd26d633b94b33c01e530c8724a509e19bb32d17c91ef320"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Textream/Textream/DirectorServer.swift:200-208 | Textream/Textream/BrowserServer.swift:169-174 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DirectorServer.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"04baf894f1f45820380949500ee532972e56143d8463ed12cb79da1c9be08337"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Textream/TextreamiOS/Models/PromptSessionController.swift:366-369 | Textream/TextreamiOS/Views/SavedRecordingsGallery.swift:329-332 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Textream/TextreamiOS/Models/PromptSessionController.swift"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"9352df71faf8e65d73bb3fb30e70c0c0cc232a686157ea837ac8206fd724d5ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): Textream/Textream/SpeechTextAlignment.swift:86-95 | Textream/TextreamiOS/Speech/SpeechTextAlignment.swift:62-66 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43c7ae013c044fea6ccb569eb503c3f61b7a25da60e3a107c1abf07af2b2e88"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): Textream/Textream/SpeechRecognizer.swift:1115-1118 | Textream/TextreamiOS/Speech/PromptMatcher.swift:277-279 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1115}}}],"partialFingerprints":{"codehealthFindingId/v1":"464351d762cf90d328f6b6660ffa57d28e6155dee65fe1d0eaa69e05ca2ab281"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (51 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:1039-1089 | Textream/Textream/NotchOverlayController.swift:1547-1597 \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 \u0060Textream/Textream/NotchOverlayController.swift:1039\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d675ca3e37416060c5e99190ad46cb54e35776f46106239c69fc1915fb0ac25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201351 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:554-604 | Textream/Textream/SpeechRecognizer.swift:736-779 \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 \u0060Textream/Textream/SpeechRecognizer.swift:554\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee2755aeb29eeffa49b9d6a44e0e230655b90da864f2ec5ae4f250af91610023"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:1000-1037 | Textream/Textream/NotchOverlayController.swift:1507-1544 \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 \u0060Textream/Textream/NotchOverlayController.swift:1000\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1000}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ef373dade128ccf91c8a76e1aa2e6088520292dcf0f19bef0f3dee958fcdd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201333 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:879-911 | Textream/TextreamiOS/Speech/PromptMatcher.swift:82-110 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechRecognizer.swift\u0060 and \u0060Textream/TextreamiOS/Speech/PromptMatcher.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechRecognizer.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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"7073014da61f2230822a6316501f734487e16314e5b8456d0faf6cf81252a707"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201332 lines \u00D7 2): Textream/Textream/SpeechTextAlignment.swift:46-77 | Textream/TextreamiOS/Speech/SpeechTextAlignment.swift:39-60 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechTextAlignment.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechTextAlignment.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"f598c063dc9987d93963a8a9b94ed11b57f3a06a268e63d58ab58c66283f1f71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:881-910 | Textream/Textream/NotchOverlayController.swift:1411-1440 \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 \u0060Textream/Textream/NotchOverlayController.swift:881\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec1061c1a9a2e07ee81daeb99d4ac479a67160834a8d359c24a254c1422b2e01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:1134-1181 | Textream/Textream/NotchOverlayController.swift:1633-1680 \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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ceb5f522fa6ebec0b73537ed9c682233b319f8a1b9b5be54e195d1fa7e9fa03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): Textream/Textream/ExternalDisplayController.swift:251-276 | Textream/Textream/NotchOverlayController.swift:927-952 | Textream/Textream/NotchOverlayController.swift:1448-1473 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/ExternalDisplayController.swift:251\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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"30903d9499adf4fe9d454f803d5b2c4428667d0155f2e1e30bdc9d3ae2d6e989"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): Textream/Textream/ExternalDisplayController.swift:365-385 | Textream/Textream/NotchOverlayController.swift:1183-1203 | Textream/Textream/NotchOverlayController.swift:1605-1625 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Textream/Textream/NotchOverlayController.swift:1180\u0060 calls \u0060transition\u0060 and \u0060Textream/Textream/NotchOverlayController.swift:1602\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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"0125f4fd24e6674457b480d3aaeba0036bc4f507cfd226db4117af0041370ed6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Textream/Textream/SettingsView.swift:1212-1232 | Textream/Textream/SettingsView.swift:1326-1346 \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 \u0060Textream/Textream/SettingsView.swift:1212\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"13466851bb545dd956d2a90c836ce6f71b1e1141c7bcb5e9415790f953bbb74e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201321 lines \u00D7 2): Textream/Textream/SpeechTextAlignment.swift:97-117 | Textream/TextreamiOS/Speech/SpeechTextAlignment.swift:68-80 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechTextAlignment.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechTextAlignment.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"1659e04d67e31a8ea1db8ebba11dec3ecf2f0c226efff3848957d29ee8a0cdc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201320 lines \u00D7 2): Textream/Textream/LanguageDetection.swift:72-91 | Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift:55-66 \u2014 before extracting anything, compare \u0060Textream/Textream/LanguageDetection.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/LanguageDetection.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"57618adc60d0e92771264b4e4d8692d09d9d100e9465a5e01feddae98c6c1f92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Textream/Textream/BrowserServer.swift:136-153 | Textream/Textream/DirectorServer.swift:153-170 \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":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b20ac38e7e5bdff7fa0294b081b3ebbba7d067225390bfc00760ec168a2cfbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): Textream/Textream/ExternalDisplayController.swift:336-352 | Textream/Textream/NotchOverlayController.swift:1699-1716 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/NotchOverlayController.swift:1699\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u006012\u0060 in one and \u00606\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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32f4a5a998590979873cecc1f92c028f57a853c620b29449fa6c58cd6e7eee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201327 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:980-1006 | Textream/TextreamiOS/Speech/PromptMatcher.swift:156-175 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechRecognizer.swift\u0060 and \u0060Textream/TextreamiOS/Speech/PromptMatcher.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechRecognizer.swift:980\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"30294bda31526df80bbda03a11c45053adfc6adcdd7ff79af64fc2985a141764"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201317 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:863-879 | Textream/Textream/NotchOverlayController.swift:1398-1409 \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 \u0060Textream/Textream/NotchOverlayController.swift:863\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"1be3c7700da9b59a365186c6dbcdd44fc6e7847b71cb6690ee40af3b48e75f83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): Textream/Textream/ContentView.swift:458-473 | Textream/Textream/SettingsView.swift:1225-1240 | Textream/Textream/SettingsView.swift:1339-1354 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00608\u0060 in one and \u006010\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Textream/Textream/SettingsView.swift:1221\u0060 calls \u0060Spacer\u0060 and \u0060Textream/Textream/ContentView.swift:455\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"80929831b44ddbf663830b7faa3606e23e37dede49134db4440ff26beb694f39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Textream/Textream/LanguageDetection.swift:103-118 | Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift:77-92 \u2014 before extracting anything, compare \u0060Textream/Textream/LanguageDetection.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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":"Textream/Textream/LanguageDetection.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cb466de75b2e7a287d24b87e053873db8e2955b9d3c7d0aa7d06b59afe86d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Textream/Textream/ExternalDisplayController.swift:58-72 | Textream/Textream/NotchOverlayController.swift:341-354 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/ExternalDisplayController.swift:58\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 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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dad4b12426c6726a6a1b5feaa255483003af6886b788b53cc050c7f9820025d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:953-967 | Textream/TextreamiOS/Speech/PromptMatcher.swift:137-150 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechRecognizer.swift\u0060 and \u0060Textream/TextreamiOS/Speech/PromptMatcher.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechRecognizer.swift:953\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"946d8d44ceb5268ea7760c64d281ebfd438bc0fb419cef762d034dd442dc5d39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201323 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:1057-1079 | Textream/TextreamiOS/Speech/PromptMatcher.swift:220-236 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechRecognizer.swift\u0060 and \u0060Textream/TextreamiOS/Speech/PromptMatcher.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechRecognizer.swift:1057\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08ce4f848427004bdbbc6ce3ebde330a96c972df26c7767d74bff05954737b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Textream/Textream/BrowserServer.swift:99-112 | Textream/Textream/DirectorServer.swift:116-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9046df194bec333ff49d716313ac92a85bf7708944c15c7151f158662e024c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Textream/Textream/DictationManager.swift:245-258 | Textream/Textream/SpeechRecognizer.swift:528-541 \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 \u0060Textream/Textream/DictationManager.swift:245\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DictationManager.swift"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"b355e6c0435c91fad9fbc8bdf5ebb63d98b5ef9359426cd7503512fd6be9d978"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): Textream/Textream/LanguageDetection.swift:46-59 | Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift:31-42 \u2014 before extracting anything, compare \u0060Textream/Textream/LanguageDetection.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/LanguageDetection.swift:46\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":"Textream/Textream/LanguageDetection.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"8656bcd06b395be802cc1d1075699004d18aee54850f7077bf28d18b45245e27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:1102-1113 | Textream/TextreamiOS/Speech/PromptMatcher.swift:257-270 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechRecognizer.swift\u0060 and \u0060Textream/TextreamiOS/Speech/PromptMatcher.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechRecognizer.swift:1102\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1102}}}],"partialFingerprints":{"codehealthFindingId/v1":"edaf24b5312b69254a23f526d1433499c14217654a129e03479db1a601ced587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Textream/Textream/MarqueeTextView.swift:783-795 | Textream/Textream/MarqueeTextView.swift:806-818 | Textream/Textream/MarqueeTextView.swift:832-844 \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 \u0060Textream/Textream/MarqueeTextView.swift:783\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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"264d72e3a3409e4f42afe8aaccc448ab3fccf229948e58edd88d9809bf92a5f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Textream/Textream/ContentView.swift:849-861 | Textream/Textream/ContentView.swift:863-875 \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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060destination\u0060 to \u0060URL(string: \u0022https://github.com/f/textream\u0022)!\u0060 in one and \u0060URL(string: \u0022https://textream.net/privacy.html\u0022)!\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"a265ebb737112ccc313f1ac65f989515aebe1fc852c3c8fb2796a5faebe66366"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:1238-1250 | Textream/Textream/NotchOverlayController.swift:1718-1730 \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 \u0060Textream/Textream/NotchOverlayController.swift:1238\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00604\u0060 in one and \u00608\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1238}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f55d4c7990ef4dc846b088c4755374a648ce4c57dff92fcd1f5a4f70e1242f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Textream/Textream/SettingsView.swift:1286-1298 | Textream/Textream/SettingsView.swift:1409-1421 \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 \u0060Textream/Textream/SettingsView.swift:1286\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":1286}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f5c4c70c8030dee9f2a5e225d2e03b3327d8ba04dfe9c45afaeebdbc769ad26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): Textream/Textream/SpeechTextAlignment.swift:5-17 | Textream/TextreamiOS/Speech/SpeechTextAlignment.swift:5-15 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechTextAlignment.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechTextAlignment.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechTextAlignment.swift:5\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":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d9b3f3754dd8bd1a054672a318687ce238c0f9b51ebd70695ff65ae953c938"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): Textream/Textream/BrowserServer.swift:253-264 | Textream/Textream/ExternalDisplayController.swift:137-148 | Textream/Textream/NotchOverlayController.swift:718-729 | Textream/Textream/NotchOverlayController.swift:1301-1312 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"f165747bf6f280b46427475a9d84c2d01140cfee5679533bccb47fad2af450f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): Textream/Textream/ExternalDisplayController.swift:151-162 | Textream/Textream/NotchOverlayController.swift:732-743 | Textream/Textream/NotchOverlayController.swift:1315-1326 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"608226754f9997dc9d18503f67f477ce9220d016db3f25bcfd04872694ee1911"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:412-423 | Textream/Textream/NotchOverlayController.swift:483-494 \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 \u0060Textream/Textream/NotchOverlayController.swift:412\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc8a8b1dce89891ebaad3e3d19d001ede6c46af39d4279c5bcb48d7058e0d80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:461-472 | Textream/Textream/SpeechRecognizer.swift:693-704 \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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"737cbeb26b6b9c66bf6f95efb77c27b6f8a35b028a41022ca6014025cbc4039f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:918-929 | Textream/Textream/SpeechRecognizer.swift:933-944 \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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"919f5e6d7a4465e54715b2742e4d4ca7ec8ff18397f59960a95225b3147fc66b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): Textream/Textream/DictationManager.swift:268-276 | Textream/Textream/SpeechRecognizer.swift:552-561 | Textream/Textream/SpeechRecognizer.swift:734-742 \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 \u0060Textream/Textream/DictationManager.swift:268\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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":"Textream/Textream/DictationManager.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"5719861fc3cf845079dd3401a7d3209e0c4e60db9d2f359cbc64e01d945a3a4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Textream/Textream/BrowserServer.swift:114-125 | Textream/Textream/DirectorServer.swift:131-142 \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":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e104997a525e7fc389b88ff37ec7e8829242a3a52327d16bd3e907403438e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Textream/Textream/LanguageDetection.swift:61-70 | Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift:44-53 \u2014 before extracting anything, compare \u0060Textream/Textream/LanguageDetection.swift\u0060 and \u0060Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/LanguageDetection.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"a242e5654219ed32f4503a739875cc6c3d930e6846709bda6d0b7a94ab33ffed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:979-990 | Textream/Textream/NotchOverlayController.swift:1486-1497 \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 \u0060Textream/Textream/NotchOverlayController.swift:979\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, \u0060Textream/Textream/NotchOverlayController.swift:977\u0060 calls \u0060clipped\u0060 and \u0060Textream/Textream/NotchOverlayController.swift:1484\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"848b686b8ada9ce49cd664cdf2cc9c7a7763fa6b63aa4cc34266f16e9af2595c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Textream/Textream/NotchOverlayController.swift:1211-1220 | Textream/Textream/NotchOverlayController.swift:1682-1691 \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 \u0060Textream/Textream/NotchOverlayController.swift:1211\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7b1ccd445018d8f65087f61754688b571511c9e6b6b226a1aa7c7f6e2b2eac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Textream/Textream/SettingsView.swift:619-628 | Textream/Textream/SettingsView.swift:664-673 \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 \u0060Textream/Textream/SettingsView.swift:619\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c692fccd6636a4ed7b9fa517af7d3f48d983af6be2710e29ef1346869912628"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): Textream/Textream/NotchOverlayController.swift:1003-1011 | Textream/Textream/NotchOverlayController.swift:1021-1029 | Textream/Textream/NotchOverlayController.swift:1080-1088 | Textream/Textream/NotchOverlayController.swift:1510-1518 | Textream/Textream/NotchOverlayController.swift:1528-1536 | Textream/Textream/NotchOverlayController.swift:1588-1596 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \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 \u0060Textream/Textream/NotchOverlayController.swift:1003\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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab3b75757c1f478b151c9f41c2ffce3dc87fab92dbba9f4da46a62ea8b09cec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 6): Textream/Textream/SettingsView.swift:870-878 | Textream/Textream/SettingsView.swift:881-889 | Textream/Textream/SettingsView.swift:892-900 | Textream/Textream/SettingsView.swift:1070-1078 | Textream/Textream/SettingsView.swift:1081-1089 | Textream/Textream/SettingsView.swift:1098-1106 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \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 \u0060Textream/Textream/SettingsView.swift:870\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, \u0060Textream/Textream/SettingsView.swift:1091\u0060 calls \u0060Divider\u0060, \u0060Text\u0060, \u0060font\u0060 and \u0060Textream/Textream/SettingsView.swift:880\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b0d6b1fd39d1bfbf8d8d3e1403f6d987fd2eb8f051484ded41a8c9e934e7ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): Textream/Textream/ContentView.swift:300-307 | Textream/Textream/MarqueeTextView.swift:361-369 | Textream/TextreamiOS/Views/PromptSessionView.swift:604-611 \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 \u0060Textream/Textream/ContentView.swift:300\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"7740cd23a97695ca6e5b308b1af76f72e3ab0ad4e71c7478f4a6c8968bf77e72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Textream/Textream/ContentView.swift:564-572 | Textream/Textream/SettingsView.swift:1485-1493 \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 \u0060Textream/Textream/ContentView.swift:564\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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00603\u0060 in one and \u00604\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":"Textream/Textream/ContentView.swift"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fdbdad1517096c822cdbf500d5bb1c0b6a8bb79bcc0ccece288ca00812fb3f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Textream/Textream/ExternalDisplayController.swift:331-339 | Textream/Textream/NotchOverlayController.swift:1218-1226 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/ExternalDisplayController.swift:331\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef6259bd5637b7be9cbbe57cdc03bcdd34d235a9597ff118de900e780f01062a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Textream/Textream/SettingsView.swift:1276-1284 | Textream/Textream/SettingsView.swift:1399-1407 \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 \u0060Textream/Textream/SettingsView.swift:1276\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":1276}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b1ce807f47dc8278c41c11774e678cba64e5b09a2e08b8d0af43e596735f0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:67-75 | Textream/Textream/SpeechRecognizer.swift:80-88 \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 \u0060Textream/Textream/SpeechRecognizer.swift:67\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a8bd9781684b9b29759a1362fa0df6af8670c1f22a189a14585323bf3823ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Textream/Textream/ExternalDisplayController.swift:293-300 | Textream/Textream/NotchOverlayController.swift:1497-1504 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/ExternalDisplayController.swift:293\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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b02c9a5735ab7c6231fdc2111caa8cb377f89b9db9fef7f2a3e43060d73d3c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Textream/Textream/MarqueeTextView.swift:20-27 | Textream/TextreamiOS/Models/PromptTextProcessor.swift:6-13 \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 \u0060Textream/Textream/MarqueeTextView.swift:20\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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"637de8104ab30fd2a5815e676e74c03c6dd310516381b75fa56bc195513252ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:1091-1098 | Textream/TextreamiOS/Speech/PromptMatcher.swift:244-250 \u2014 before extracting anything, compare \u0060Textream/Textream/SpeechRecognizer.swift\u0060 and \u0060Textream/TextreamiOS/Speech/PromptMatcher.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Textream/Textream/SpeechRecognizer.swift:1091\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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"f83a43b03dfaba4e22e20a61a756ee0c4aad777ad801d576dbd3218f99393ba5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Textream/Textream/ExternalDisplayController.swift:312-318 | Textream/Textream/NotchOverlayController.swift:1069-1075 | Textream/Textream/NotchOverlayController.swift:1577-1583 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/ExternalDisplayController.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c4db0054ab16376455088e95d2c77f7b1feefcee7ed4cc3a4a920da88435122"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Textream/Textream/ExternalDisplayController.swift:329-335 | Textream/Textream/NotchOverlayController.swift:1216-1222 | Textream/Textream/NotchOverlayController.swift:1687-1693 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"54bc9e75342ce986e3afddf8b5f9682b026edb109710f15b468651fb5ea6b07a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Textream/Textream/ContentView.swift:492-501 | Textream/Textream/SettingsView.swift:1500-1509 \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. 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":"Textream/Textream/ContentView.swift"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e38f7585e8526deaf0c48ef4f8204b286e5973588241da367102b291fc269f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Textream/Textream/SettingsView.swift:630-636 | Textream/Textream/SettingsView.swift:675-681 \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 \u0060Textream/Textream/SettingsView.swift:630\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ebdc88b472ab35b62a7af87cf8a52123d7e30ee135216ffada3107e0acf9ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Textream/Textream/ExternalDisplayController.swift:291-298 | Textream/Textream/NotchOverlayController.swift:988-995 | Textream/Textream/NotchOverlayController.swift:1495-1502 \u2014 before extracting anything, compare \u0060Textream/Textream/ExternalDisplayController.swift\u0060 and \u0060Textream/Textream/NotchOverlayController.swift\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, 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 \u0060Textream/Textream/ExternalDisplayController.swift:291\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":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"799e3946ed34a09a7e2125b1380d3c309b8f520a04888f325549119945a31bdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Textream/Textream/SettingsView.swift:1249-1254 | Textream/Textream/SettingsView.swift:1372-1377 \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 \u0060Textream/Textream/SettingsView.swift:1249\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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b738c5e38e2d19eb4037816a65a005c9e81fa82fe5a3731cd61fce2a180845"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Textream/Textream/MarqueeTextView.swift:395-400 | Textream/Textream/MarqueeTextView.swift:414-419 \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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"b05bccef7ade3a497e33638381a339bf5d2aa490276d3775ef579be4563e29a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Textream/Textream/SpeechRecognizer.swift:812-816 | Textream/TextreamiOS/Speech/SpeechFollower.swift:209-218 \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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"820d80ef51985395041c331a7ced261b070c342f147d06c3c10914811025f9f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Textream/Textream/BrowserServer.swift:178-183 | Textream/Textream/DirectorServer.swift:254-259 \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":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6eab0a9ae46dc2da79bc5fa6169a23dcf34a33c6da8e1ee0a870a40ea7b2b2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Textream/Textream/VoiceActivityDetector.swift:11-21 | Textream/TextreamiOS/Speech/VoiceActivityDetector.swift:95-105 \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":"Textream/Textream/VoiceActivityDetector.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a542a34b3c0308b1e1b0b82ea6802361a45100c0d738520785de0027fa4a789"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Textream/Textream/VoiceActivityDetector.swift:23-35 | Textream/TextreamiOS/Speech/VoiceActivityDetector.swift:107-117 \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":"Textream/Textream/VoiceActivityDetector.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"472457b6edb3f94480a723d14dafd0c46ea40ab554f2757e82c471aca265e231"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 6): AppDelegate\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 6 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":"Textream/Textream/TextreamApp.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"c213ad7657aff4c5b515290a71052630647e33a3a8ef8aa537289f56d66689aa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Textream/Textream/SpeechRecognizer.swift: Textream/Textream/SpeechRecognizer.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in SpeechRecognizer.beginRecognition at line 377. 5 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-09..2026-09-07, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-09 00:29:17 \u002B03:00\u0027 --until=\u00272026-09-07 00:29:17 \u002B03:00\u0027 --full-history --no-merges -- Textream/Textream/SpeechRecognizer.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":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"e328a089b5e4617618ece15b997de538d1d091128950dc6d4f7a7ce27e8a32ca"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Textream/Textream/MarqueeTextView.swift: Textream/Textream/MarqueeTextView.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in SpeechScrollView.body at line 169. 3 of those changes were fix/bug commits, and the other 3 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-09..2026-09-07, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-09 00:29:17 \u002B03:00\u0027 --until=\u00272026-09-07 00:29:17 \u002B03:00\u0027 --full-history --no-merges -- Textream/Textream/MarqueeTextView.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":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"b52ee65bbcc0e002963c10d44b8909e0b5571df050bdac5867007479cfafc5a6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Textream/Textream/NotchOverlayController.swift: Textream/Textream/NotchOverlayController.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in NotchOverlayView.body at line 767. 2 of those changes were fix/bug commits, and the other 5 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-09..2026-09-07, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-09 00:29:17 \u002B03:00\u0027 --until=\u00272026-09-07 00:29:17 \u002B03:00\u0027 --full-history --no-merges -- Textream/Textream/NotchOverlayController.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":"Textream/Textream/NotchOverlayController.swift"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5713276d79f7fc5e4cac0335066bf745b01e049303fa650bd5d02cff7b84929"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Textream/Textream/ContentView.swift: Textream/Textream/ContentView.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ContentView.body at line 503. 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-09..2026-09-07, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-09 00:29:17 \u002B03:00\u0027 --until=\u00272026-09-07 00:29:17 \u002B03:00\u0027 --full-history --no-merges -- Textream/Textream/ContentView.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":"Textream/Textream/ContentView.swift"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee2f27a3415bc5bbfac946b24df538b2fd957c7859da2f60273067b7a72a3638"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Textream/Textream/DictationManager.swift: Textream/Textream/DictationManager.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in DictationManager.beginRecognition at line 147. 1 of those changes was a fix/bug commit, and the other 1 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-09..2026-09-07, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-09 00:29:17 \u002B03:00\u0027 --until=\u00272026-09-07 00:29:17 \u002B03:00\u0027 --full-history --no-merges -- Textream/Textream/DictationManager.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":"Textream/Textream/DictationManager.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"be103f4324d44d0e195d7ef3f35bbc02edd9a6d558ede0ecb626bf4203c48bbe"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Textream/Textream/SettingsView.swift: Textream/Textream/SettingsView.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in NotchPreviewContent.body at line 198. 1 of those changes was a fix/bug commit, and the other 3 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-09..2026-09-07, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-09 00:29:17 \u002B03:00\u0027 --until=\u00272026-09-07 00:29:17 \u002B03:00\u0027 --full-history --no-merges -- Textream/Textream/SettingsView.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":"Textream/Textream/SettingsView.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b63a5f7187e7c12df5fab74903c7613f08032f3ef35d3cd79103be9dccc3f3d"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060Textream/Textream.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e287b3bd16e764b334e67ce5efaa59f476c04c691b13ea48ab868d11175cf23"}},{"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":"5be03ab325ce0dd57044d4e411f1428508ecf7870bea56774afff406be2e7ce3"},"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"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"75369c09bb288495c1ec96550eb2aa9585bb73f2d0abcdd876376a94900b52cc"},"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"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"7adc332f2d68b4a8e35c8868ce3df7038dc1a68ece15e2a5c16dee165f7a002c"},"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"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"64aee044c1f4dd4bb7a77441c8cfb2ad1960dbe2c5bbb6dcc4a3af1fa08e7b62"},"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"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"957b150e90b8de065e3fab913d6db8aa84cc38085b4826b482eaabde0c4cf347"},"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"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"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":"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 1 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":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.isLetter || $0.isNumber || $0.isWhitespace\u0060 appears character-identically in 2 files \u2014 Textream/Textream/SpeechRecognizer.swift, Textream/TextreamiOS/Speech/PromptMatcher.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechRecognizer.swift"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a53c1ebdf7f6194bc89ff2a15299476c4372c473b6abeddd8fd534d60cfe99f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bothProgressed || skippedAnnotation || confirmed || smallStep\u0060 appears character-identically in 2 files \u2014 Textream/Textream/SpeechTextAlignment.swift, Textream/TextreamiOS/Speech/SpeechTextAlignment.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"740459979cb3619a3e87a655fc324a7ef352a223faa57c098c88cc6cb435a3ad"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060detectedScript == nil || selectedScript == nil || detectedScript == selectedScript\u0060 appears character-identically in 2 files \u2014 Textream/Textream/LanguageDetection.swift, Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/LanguageDetection.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f5a382af066092e0e51ee1cdd6fa17d2e10245a1c8c13916e119258aa49649"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isDone \u0026\u0026 (listeningMode == .wordTracking || hasNextPage)\u0060 appears character-identically in 2 files \u2014 Textream/Textream/ExternalDisplayController.swift, Textream/Textream/NotchOverlayController.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d887327abcd795bee93c8b77669296a161ad61367bad366ff6ff43aa0bacce"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isInsideAnnotation \u0026\u0026 word.contains(\u0022]\u0022)\u0060 appears character-identically in 2 files \u2014 Textream/Textream/SpeechTextAlignment.swift, Textream/TextreamiOS/Speech/SpeechTextAlignment.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc8444eb230968703c140d6d372bae4c2d29d9ed9f7ce5272fa9664d5c1bdb83"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060next \u003C characters.count \u0026\u0026 characters[next].isWhitespace\u0060 appears character-identically in 2 files \u2014 Textream/Textream/SpeechTextAlignment.swift, Textream/TextreamiOS/Speech/SpeechTextAlignment.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7d67848ef0b70650213c26b092454c118e0154f223eb283cc5fd1e8cb64795"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status == .authorized || status == .limited\u0060 appears character-identically in 2 files \u2014 Textream/TextreamiOS/Capture/CaptureController.swift, Textream/TextreamiOS/Capture/SavedRecordingsStore.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"0627dccc95baef494129fd55e07dbb673bcfa873b77130d0991ae8f7b558544d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060totalCharCount \u003E 0 \u0026\u0026 effective \u003E= totalCharCount\u0060 appears character-identically in 2 files \u2014 Textream/Textream/BrowserServer.swift, Textream/Textream/DirectorServer.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"a972ad9fe2e256c714c354c4a57f363ffe89cb09d20f73f5e930329517a36e5c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060totalCharCount \u003E 0 \u0026\u0026 effectiveCharCount \u003E= totalCharCount\u0060 appears character-identically in 2 files \u2014 Textream/Textream/ExternalDisplayController.swift, Textream/Textream/NotchOverlayController.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ExternalDisplayController.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4cd99b8cd0b3421d182eb5e42658a97877e84e12cb6bfebedfe5a665297237b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060word.hasPrefix(\u0022[\u0022) \u0026\u0026 closingAtOrAfter[index]\u0060 appears character-identically in 2 files \u2014 Textream/Textream/SpeechTextAlignment.swift, Textream/TextreamiOS/Speech/SpeechTextAlignment.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/SpeechTextAlignment.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"c675cf87dbaf0714cec6d8464596c2928b57d75d0301317b8c19702cecb995f2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060word.hasPrefix(\u0022[\u0022) \u0026\u0026 word.hasSuffix(\u0022]\u0022)\u0060 appears character-identically in 3 files \u2014 Textream/Textream/MarqueeTextView.swift, Textream/Textream/SpeechRecognizer.swift, Textream/TextreamiOS/Speech/PromptMatcher.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/MarqueeTextView.swift"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9e875fc9aaced7b1d49122c1fda096eef0e19bcad44e57b6c318e9ad0d692c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Speech/SpeechLanguageDetection.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"1414e3d472e7a564b3e48d897bcc781fb418e07697de8c875a411707a18eebf4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/TextreamiOS/Capture/CaptureController.swift"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef7d87e7ba6c1281735b433af32a018f3026b33442f82c81ab0c0372fd0a56d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1494a464805ec2bff07599fa71f863452fcd8320c55fa300a35c1a0b8ab625c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/BrowserServer.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"184c8659d4869188c152b6d2a57129777b7a9e215db8ef981fc125c8a0ba787c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/ContentView.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"b69d3b3160d9001f7761770c2560cb620b48b31da33bb212885264477d1dcdfc"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DirectorServer.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa3457ebf8d4e7f26037842d2767fbd51b2cf29c243dc944d4f2ae171fd988e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Textream/Textream/DirectorServer.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a9eb030a2b6ff7519b264c958ec522df6d409f03947f61982393b66b9f7ded"}}],"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-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.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":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"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":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"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":9,"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."]}]}