{"$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":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","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-1395","CWE-937"],"owasp":"A03: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":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08: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":"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":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"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":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"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":"CustomUploader._upload (cyclomatic 31): CustomUploader._upload has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 3 function items inside it that branch (_byRequest, _byUpload, _byUpload::multipartFormDataGen). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Custom/CustomUploader.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"70282836ff58fc0b952ed60620db66325ebf41cc2ae8df8ca2f715e54fb3eec3"}},{"ruleId":"D1","level":"warning","message":{"text":"CommandLineKit.parse (cyclomatic 23): CommandLineKit.parse 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":"uPic/Cli/CommandLineKit/CommandLine.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"aba8047ef805788373e0cda564a9d3bd324af220e3d359c86c23d906c51c115d"}},{"ruleId":"D1","level":"warning","message":{"text":"S3Uploader._upload (cyclomatic 16): S3Uploader._upload 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":"uPic/Models/S3/S3Uploader.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"29bac9ff93f3ec512282b5b843f85d7caceb3ce74df65aec2ac4306aa30af4a7"}},{"ruleId":"D2","level":"warning","message":{"text":"CommandLineKit.parse (cognitive 57): CommandLineKit.parse has cognitive complexity 57 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 6 (18 pts), ternaries 3 (9 pts), boolean chains 3 (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":"uPic/Cli/CommandLineKit/CommandLine.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a9a97635f0899fb83c56b5202d77ec35b7a4c69f568a9c4920d2920376d9eb9"}},{"ruleId":"D2","level":"warning","message":{"text":"CustomUploader._upload (cognitive 47): CustomUploader._upload has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (37 pts), loops 4 (7 pts), match/switch 2, boolean chains 1 (nesting depth added 17). Of this number, 17 points are the body\u0027s own statements and 30 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent 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":"uPic/Models/Custom/CustomUploader.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa24d33f081ee03fe1154be06dede9e211dd086adb209851487b8fc7e83ba61"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.uploadFiles (cognitive 25): AppDelegate.uploadFiles has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/AppDelegate.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"3168395abd15510116b29867c95b5f7cd0b1d9903b01f56af21005b60f3473fa"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.uploadByPasteboard (cognitive 23): AppDelegate.uploadByPasteboard has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/AppDelegate.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"239449ef302800e90446d4b66dc2412ffc0c9eb21e32b0e4f5ae8f4d475139c1"}},{"ruleId":"D2","level":"warning","message":{"text":"BaseUploader.completed (cognitive 23): BaseUploader.completed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/BaseUploader.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"820b7bd57ef3b9d908bd83f53e665e9892e145deba39dc6a8c82b292fb98a7bf"}},{"ruleId":"D2","level":"warning","message":{"text":"HostPreferencesViewController.blurEditingTextField (cognitive 22): HostPreferencesViewController.blurEditingTextField has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/HostPreferencesViewController.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"18cfc0aaf4d3550d925b9645f2b82a2df9316984b447962b918d753e211ea4a4"}},{"ruleId":"D2","level":"warning","message":{"text":"S3Uploader._upload (cognitive 21): S3Uploader._upload has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 1, match/switch 1, ternaries 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":"uPic/Models/S3/S3Uploader.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fb5cb55ca38769f5cb4cf0c4bc8034cddf7b8ed8c0b173980d8c2943c04e46"}},{"ruleId":"D2","level":"warning","message":{"text":"HistoryThumbnailFlowLayout.prepare (cognitive 20): HistoryThumbnailFlowLayout.prepare has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/HistoryRecord/HistoryThumbnailFlowLayout.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b025c076374fb9e445ea199c1de54eb94de8a7f492c4f96c2a442c2254bc45"}},{"ruleId":"D2","level":"warning","message":{"text":"ShareViewController.processSelectedFiles (cognitive 19): ShareViewController.processSelectedFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2, 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":"uPicShareExtension/ShareViewController.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"d333c645735f24a9edf1a793635766f661257ed6aea00ced6d3d2c1b21e15184"}},{"ruleId":"D2","level":"warning","message":{"text":"WeiboUploader._upload (cognitive 18): WeiboUploader._upload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, match/switch 1, ternaries 1 (nesting depth added 2). Of this number, 11 points are the body\u0027s own statements and 7 belong to one function item inside it that branches. 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":"uPic/Models/Weibo/WeiboUploader.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"b249f238f53ade0b59421651c98e5802908e848f1b02883bd87ae8e4c0f373c1"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigManager.importHosts (cognitive 17): ConfigManager.importHosts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Managers/ConfigManager.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9a431767e02b0f0180aa5672c893f72420bc499d0735e0ac9e78f18bef6b9e"}},{"ruleId":"D2","level":"warning","message":{"text":"DiskPermissionManager.startRootSubdirectoriesAccessing (cognitive 16): DiskPermissionManager.startRootSubdirectoriesAccessing has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Managers/DiskPermissionManager.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde0e8f46a32650be9fd690ff03db8b58cfe267e8d5f17b1656a36946b1ef0c0"}},{"ruleId":"D2","level":"warning","message":{"text":"DiskPermissionManager.requestDirectoryPermissions (cognitive 16): DiskPermissionManager.requestDirectoryPermissions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 1 (2 pts), ternaries 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":"uPic/Managers/DiskPermissionManager.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"3904ec2a7a8e00114827ad3cb52434b77759b961a484ef8eca5277ee255d96e6"}},{"ruleId":"D2","level":"warning","message":{"text":"CustomHostUtil.parseResultUrl (cognitive 16): CustomHostUtil.parseResultUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (4 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Custom/CustomHostUtil.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf549e4c3c8e1d9d04e8154f2f5e652a268f2463fe0166531067fc2cedf7ac6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: StatusMenuController: TooManyMethods \u2014 42 methods. The bar is 30 methods; this is 12 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":"uPic/StatusMenuController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae01c8f991c8c2129c533c285391bfc297082247767d007c6cae26df19f4ba9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: S3ConfigView.createView: MethodTooLong \u2014 createView runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86e665a8c2985425fede9a7fff24dcc23f5e58e5620cd192c13a9f67ad7b035"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MimeType: ClassTooLong \u2014 487 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 87 over it, 1.22\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Basic/Swime/MimeType.swift"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d6d16116432b5ef9fde9830ebbc1cfa756b03522fe3d09ff635b944ae4c6b4a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Swime/MimeType.swift: FileTooLong \u2014 548 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: MimeType (79-748). The bar is 500 significant lines; this is 48 over it, 1.10\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":"uPic/Basic/Swime/MimeType.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af973cc87a388082717dd3b3a6d751a4bdf4dd2ddf37711dab4d05a03394b125"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CustomUploader._upload: MethodTooLong \u2014 _upload runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\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":"uPic/Models/Custom/CustomUploader.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab834e0252ac4cace31553a2538dbd9a5f186e547866be7bddc832f0447bc7fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 48 shared lines): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:13-132 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:13-132 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:14-132 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:26-219 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:13-131 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:21-96 \u2014 These 6 members are variants of one another: a block of 48 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 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4590ef320c5f1f77b823cf5d6da6ef9ad8a9da590cdc5d74118b38bd7b010d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 33 shared lines): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:13-132 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:13-132 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:14-132 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:13-131 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:17-150 \u2014 These 5 members are variants of one another: a block of 33 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e48d50a0101dbd2b742d838ec58ce0ad735a783ecec0c5396c482960106763"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 28 shared lines): uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:28-162 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:13-104 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:21-112 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:21-96 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:17-150 \u2014 These 5 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"917f6841969c1c3973fabce922a35cf3ed6ee6d2eb6dc74e8c4d04a226c32715"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (10 members, 50\u002B identical tokens): uPic/Models/Aliyun/AliyunHostConfig.swift:22-41 | uPic/Models/Baidu/BaiduHostConfig.swift:22-41 | uPic/Models/Custom/CustomHostConfig.swift:25-50 | uPic/Models/Gitee/GiteeHostConfig.swift:21-38 | uPic/Models/Github/GithubHostConfig.swift:21-38 | uPic/Models/Qiniu/QiniuHostConfig.swift:22-41 | uPic/Models/S3/S3HostConfig.swift:34-59 | uPic/Models/Tencent/TencentHostConfig.swift:22-41 | uPic/Models/UpYun/UpYunHostConfig.swift:21-38 | uPic/Models/Weibo/WeiboHostConfig.swift:21-38 \u2014 These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \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 10 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 10 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca1ac96abadfbcd1b18d3cc1c34e95d9ee390aa4e706d0582b4a029f69d89c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): uPic/Models/Aliyun/AliyunUploader.swift:18-108 | uPic/Models/Baidu/BaiduUploader.swift:18-103 | uPic/Models/Custom/CustomUploader.swift:18-179 | uPic/Models/Gitee/GiteeUploader.swift:17-76 | uPic/Models/Github/GithubUploader.swift:17-79 | uPic/Models/Qiniu/QiniuUploader.swift:19-92 | uPic/Models/S3/S3Uploader.swift:19-142 | uPic/Models/Tencent/TencentUploader.swift:18-114 | uPic/Models/UpYun/UpYunUploader.swift:21-98 \u2014 These 9 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 9 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 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3dcb590c74566427c30aa7236c7f7699e60777f425548eeab65e75af4cae962"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): uPic/Models/Aliyun/AliyunHostConfig.swift:56-71 | uPic/Models/Baidu/BaiduHostConfig.swift:56-71 | uPic/Models/Qiniu/QiniuHostConfig.swift:56-71 | uPic/Models/S3/S3HostConfig.swift:77-95 | uPic/Models/Tencent/TencentHostConfig.swift:56-72 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8025ed94de4c2f0aa62ecbae33c2a10b2a17469adc7b8cca4e5315b07a280437"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): uPic/Models/BaseUploader.swift:150-188 | uPic/Models/BaseUploader.swift:213-251 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Models/BaseUploader.swift:150\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":"uPic/Models/BaseUploader.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df9e7cc5f0712d5c2b9082732b008482ae71be3f0cfab1f77b7ec8ddcef64b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift:66-91 | uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift:106-131 \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 \u0060uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift:66\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":"uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"142e602407c76a3528adda3abbdc58066103f453bf2cc9e8ea32cf5406d984b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 4): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:42-66 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:42-66 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:43-67 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:42-66 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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 \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:42\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":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1ff0a426b42ded329727f484249596c895976e4f77d47f0170840abd8c0b3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): uPic/Models/Gitee/GiteeUploader.swift:52-76 | uPic/Models/Github/GithubUploader.swift:55-79 \u2014 before extracting anything, compare \u0060uPic/Models/Gitee/GiteeUploader.swift\u0060 and \u0060uPic/Models/Github/GithubUploader.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 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 \u0060uPic/Models/Gitee/GiteeUploader.swift:52\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":"uPic/Models/Gitee/GiteeUploader.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ecbba1a23cc777e31171f60a1899f3521249ce2bacbd2a113bfbf74f748cf85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201324 lines \u00D7 10): uPic/Models/Aliyun/AliyunHostConfig.swift:24-41 | uPic/Models/Baidu/BaiduHostConfig.swift:24-41 | uPic/Models/Custom/CustomHostConfig.swift:27-50 | uPic/Models/Gitee/GiteeHostConfig.swift:23-38 | uPic/Models/Github/GithubHostConfig.swift:23-38 | uPic/Models/Qiniu/QiniuHostConfig.swift:24-41 | uPic/Models/S3/S3HostConfig.swift:44-59 | uPic/Models/Tencent/TencentHostConfig.swift:24-41 | uPic/Models/UpYun/UpYunHostConfig.swift:23-38 | uPic/Models/Weibo/WeiboHostConfig.swift:23-38 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunHostConfig.swift\u0060 and \u0060uPic/Models/Baidu/BaiduHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Models/Aliyun/AliyunHostConfig.swift:24\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":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"025d6650240e214cdfd292491fe74417e0adce9daeabc2565a820154788cd900"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:82-104 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:90-112 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 116 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 \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:82\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":"uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bea19e68ea5a96380d18b0af3af220abb1f91a18b9a306614a4f41fb0edaf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201321 lines \u00D7 4): uPic/Models/Aliyun/AliyunUploader.swift:78-98 | uPic/Models/Baidu/BaiduUploader.swift:74-94 | uPic/Models/S3/S3Uploader.swift:121-124 | uPic/Models/Tencent/TencentUploader.swift:84-104 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 \u0060uPic/Models/Aliyun/AliyunUploader.swift:78\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 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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d5769a83f390e7c566f4c35229e5ead7bacce0de4690c6ccbcc4328c4415a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 5): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:110-127 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:110-127 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:111-126 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:195-212 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:110-125 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db5cced2445b50911ddfd8213e39593e7bd4bb385d2742904591ebe1b336ff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 6): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:115-131 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:115-131 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:116-130 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:200-216 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:115-130 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:79-94 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39a25fef616013777b4df149ccb0c05272fb23c1fa3b7323adf4963a2e1f022"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:150-167 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:116-131 \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 \u0060uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:150\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":"uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b261847940ec4cbb973ff770dca183064c40cea2ee99d5e50ff5fe59cf67ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:90-104 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:90-104 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:91-105 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:175-189 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1d1a9e74bb87b6f9f5fe78127ad13f63d8e246731234963eef224fd5e44f77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 3): uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:67-80 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:149-163 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:115-127 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"507300b89f415b62fb1d5ee01f8aff4225107e36259cc82c87e22e45b1296728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): uPic/Models/Gitee/GiteeUploader.swift:27-41 | uPic/Models/Github/GithubUploader.swift:27-41 \u2014 before extracting anything, compare \u0060uPic/Models/Gitee/GiteeUploader.swift\u0060 and \u0060uPic/Models/Github/GithubUploader.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 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":"uPic/Models/Gitee/GiteeUploader.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb92a7dd76c3251fce5acb5043d8f6075d888a7ab4e613c21539bfb8f7fe2ca6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): uPic/Models/Gitee/GiteeHostConfig.swift:54-66 | uPic/Models/Github/GithubHostConfig.swift:54-67 \u2014 before extracting anything, compare \u0060uPic/Models/Gitee/GiteeHostConfig.swift\u0060 and \u0060uPic/Models/Github/GithubHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 \u0060uPic/Models/Gitee/GiteeHostConfig.swift:54\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":"uPic/Models/Gitee/GiteeHostConfig.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bec625cf7cd81da6ad95be5ca3cf7094b48cf982583936872c8974e466c066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:45-58 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:53-66 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 116 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":"uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"c18b8d716f55eacae2c5a92b8afe24afc9b8836a967d49e80079e2c21d49d126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): uPic/Models/Aliyun/AliyunUploader.swift:39-51 | uPic/Models/Tencent/TencentUploader.swift:40-52 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Tencent/TencentUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060uPic/Models/Tencent/TencentUploader.swift:38\u0060 calls \u0060computeHost\u0060 and \u0060uPic/Models/Aliyun/AliyunUploader.swift:37\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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb1407799cc22a9ca1b5f1f72a71577a8784e9a4984ad57ebc53789c76c01a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:27-39 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:35-47 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 116 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":"uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"e80149190f82014170263dec46ed7b83c706435b96528a938a43b904ca6c9c04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:64-76 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:72-84 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 116 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":"uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"1368d173d56ecaf7fc86e57bbcc335e2399fa55f0929ec14b630ebfe31076435"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): uPic/Models/Aliyun/AliyunHostConfig.swift:43-54 | uPic/Models/Baidu/BaiduHostConfig.swift:43-54 | uPic/Models/Qiniu/QiniuHostConfig.swift:43-54 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunHostConfig.swift\u0060 and \u0060uPic/Models/Baidu/BaiduHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"879884a3a780ff3743ed9bfc4c48ca6917a726a20dc8800b8a9fa1b0fc79386e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): uPic/Models/Aliyun/AliyunUploader.swift:50-61 | uPic/Models/Baidu/BaiduUploader.swift:50-59 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"c279c7257bb6510650bfc2401fbd6d7530317b7f6b41a9a01eab95288826c0f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): uPic/Models/BaseUploaderUtil.swift:177-188 | uPic/Models/BaseUploaderUtil.swift:227-238 \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 \u0060uPic/Models/BaseUploaderUtil.swift:177\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":"uPic/Models/BaseUploaderUtil.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad725975540f8f06594deaf6175f32b844b30c3e5b657226fa34fae572116ef5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 6): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:72-82 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:72-82 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:73-83 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:124-131 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:72-82 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:35-45 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f219973f70828127f30c22b16ee5e356103a602e73ae1b1b9824777cf4fd80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): uPic/Models/Baidu/BaiduUploader.swift:40-49 | uPic/Models/Qiniu/QiniuUploader.swift:39-49 | uPic/Models/S3/S3Uploader.swift:51-60 \u2014 before extracting anything, compare \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 and \u0060uPic/Models/Qiniu/QiniuUploader.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Models/Baidu/BaiduUploader.swift:40\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":"uPic/Models/Baidu/BaiduUploader.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6c25197488258f9a4329f324abd2f85a11308cd902352a494f4be8220cccc3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): uPic/Models/Gitee/GiteeHostConfig.swift:40-50 | uPic/Models/Github/GithubHostConfig.swift:40-50 \u2014 before extracting anything, compare \u0060uPic/Models/Gitee/GiteeHostConfig.swift\u0060 and \u0060uPic/Models/Github/GithubHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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":"uPic/Models/Gitee/GiteeHostConfig.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"82731a91ed15f52161b130a3ee6c2172fe967accf49264807506e07b2f3946e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:95-104 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:95-104 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:96-105 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:180-189 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:95-104 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"246022ac885d129005a8953c9055dac2ee47834c4ba3002c0eb9f11b94877125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 19): uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift:149-157 | uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:67-75 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:67-75 | uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:37-45 | uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:130-138 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:22-30 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:40-48 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:59-67 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:30-38 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:48-56 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:67-75 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:68-76 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:119-127 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:67-75 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:30-38 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:48-56 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:48-56 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:85-93 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:133-141 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"b880fdef7f958dc5b909d8e24101dd0307cf1e2a3abb65f3d13c6846fb75f795"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 15): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:85-93 | uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:105-113 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:85-93 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:105-113 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:77-85 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:85-93 | uPic/Views/PreferencesWindow/ConfigView/Views/ImgurConfigView.swift:27-35 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:86-94 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:106-114 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:170-178 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:190-198 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:85-93 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:105-113 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:68-76 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:66-74 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da7fb8077a2fb711b4a3516cfd24a30c6775fe54e9a95caf23ac49ec6a3117f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 5): uPic/Models/Aliyun/AliyunUploader.swift:46-53 | uPic/Models/Baidu/BaiduUploader.swift:46-53 | uPic/Models/Qiniu/QiniuUploader.swift:45-53 | uPic/Models/Tencent/TencentUploader.swift:47-54 | uPic/Models/UpYun/UpYunUploader.swift:41-48 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 \u0060uPic/Models/Aliyun/AliyunUploader.swift:46\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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d40ad79d03fdbe9089ba15d57326ddeb82512dfd96aeae37adda9d00ee94b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:23-31 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:23-31 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:25-33 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:23-31 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7bcfbdba13aacfc9963436c64c5cacd5a1b0942c63b6e32dcbc1be7006d0ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): uPic/Models/Aliyun/AliyunHostConfig.swift:59-67 | uPic/Models/Baidu/BaiduHostConfig.swift:59-67 | uPic/Models/Qiniu/QiniuHostConfig.swift:59-67 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunHostConfig.swift\u0060 and \u0060uPic/Models/Baidu/BaiduHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Models/Aliyun/AliyunHostConfig.swift:59\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":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce73d2b97f7a6e5cd70579d9c0ba39a41c9439658ca9f787a06072ca33fb583"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:50-58 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:58-66 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:58-67 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 116 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":"uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c99c2ef64c73f81067c7c5106d27ada6f6c99f57c0b1d7407b01ff29d81394"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): uPic/Models/BaseUploaderUtil.swift:159-167 | uPic/Models/BaseUploaderUtil.swift:202-210 \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 \u0060uPic/Models/BaseUploaderUtil.swift:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060uPic/Models/BaseUploaderUtil.swift:211\u0060 calls \u0060toBase64\u0060 and \u0060uPic/Models/BaseUploaderUtil.swift:168\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":"uPic/Models/BaseUploaderUtil.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"352888dadd12f20f89560a0db7ad3fc44ca5bdec6ad7e96e1d1ed3a683658d2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): uPic/Models/Qiniu/QiniuUploader.swift:62-69 | uPic/Models/UpYun/UpYunUploader.swift:68-76 \u2014 before extracting anything, compare \u0060uPic/Models/Qiniu/QiniuUploader.swift\u0060 and \u0060uPic/Models/UpYun/UpYunUploader.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 45 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 \u0060uPic/Models/Qiniu/QiniuUploader.swift:62\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":"uPic/Models/Qiniu/QiniuUploader.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"5454a789ecc4e28d15bd12264e0b925340619c61b92da2125a64d68e8f6a2329"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 12): uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:32-39 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:51-58 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:69-76 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:40-47 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:59-66 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:77-84 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:40-47 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:59-67 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:40-47 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:58-65 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:95-102 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:125-132 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 116 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":"uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec82cd859f6291aad49f4c5efb1da9e35f00ae55fe62a5b3f0e0ab01c431134"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 9): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:59-66 | uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:77-84 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:59-66 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:77-84 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:60-67 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:78-85 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:161-169 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:59-66 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:77-84 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"34a4c28d371650dc4256426e66d8abbb6b8d9ade6fe028fd744b454a40f035c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 4): uPic/Models/Aliyun/AliyunHostConfig.swift:58-64 | uPic/Models/Baidu/BaiduHostConfig.swift:58-64 | uPic/Models/Qiniu/QiniuHostConfig.swift:58-64 | uPic/Models/Tencent/TencentHostConfig.swift:58-65 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunHostConfig.swift\u0060 and \u0060uPic/Models/Baidu/BaiduHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"877441aecf498a99ca9fd1df4213ab4f42f5f5f45ef82df84c7cd6ba5e3c234c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 4): uPic/Models/Baidu/BaiduUploader.swift:44-50 | uPic/Models/Qiniu/QiniuUploader.swift:43-50 | uPic/Models/S3/S3Uploader.swift:55-61 | uPic/Models/UpYun/UpYunUploader.swift:39-45 \u2014 before extracting anything, compare \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 and \u0060uPic/Models/Qiniu/QiniuUploader.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Baidu/BaiduUploader.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4902006956d03453cdae7a54f3463de45056a8c954fd455520d1bde8053798b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift:200-207 | uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift:222-229 \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":"uPic/Views/PreferencesWindow/ConfigView/CustomConfigSheetController.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf6b5da16b6c1cd7214b8392e58a4e4c81730fa0610eba56ae06740fba71100"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 14): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:61-67 | uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:79-85 | uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:98-105 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:61-67 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:79-85 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:98-105 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:62-68 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:80-86 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:99-106 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:163-170 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:183-190 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:61-67 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:79-85 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:98-105 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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, \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:97\u0060 calls \u0060addRevealToggle\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:60\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":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc45c8e2b107e9efbb099b98ac938999cabbbb8f6654da3256551815dbd55aac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:32-38 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:17-23 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:25-31 | uPic/Views/PreferencesWindow/ConfigView/Views/ImgurConfigView.swift:21-28 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:25-31 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:21-28 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:32\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":"uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"da55ef95640c06975c9c0914eab3ce8837345c48b79786c5012f8400ce7eaeb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): uPic/Models/Baidu/BaiduUploader.swift:45-51 | uPic/Models/Custom/CustomUploader.swift:37-43 | uPic/Models/Qiniu/QiniuUploader.swift:44-51 | uPic/Models/S3/S3Uploader.swift:56-62 | uPic/Models/UpYun/UpYunUploader.swift:40-46 \u2014 before extracting anything, compare \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 and \u0060uPic/Models/Qiniu/QiniuUploader.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Models/Baidu/BaiduUploader.swift:45\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":"uPic/Models/Baidu/BaiduUploader.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a87faef3f54952bb05feb1a1d3808d279ca0e50852519919c2bf6635a3fec0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:17-23 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:17-23 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:18-25 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:30-36 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:17-23 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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 \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:17\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":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"bde129064ae77fc3b2f3ec0f05ae975b675a8d4e9bb56c05406d4cd03b5f9736"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): uPic/Models/Aliyun/AliyunUploader.swift:45-51 | uPic/Models/Gitee/GiteeUploader.swift:36-42 | uPic/Models/Github/GithubUploader.swift:36-42 | uPic/Models/Tencent/TencentUploader.swift:46-52 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Tencent/TencentUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060uPic/Models/Aliyun/AliyunUploader.swift:45\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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"db74d6bc752251a2d3bf1a8897c7a20baa9e8c52104b6ce9fca755fe4b97fa00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): uPic/Models/Custom/CustomUploader.swift:91-97 | uPic/Models/Custom/CustomUploader.swift:139-145 \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 \u0060uPic/Models/Custom/CustomUploader.swift:91\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":"uPic/Models/Custom/CustomUploader.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e88ff1cdfc757d2db3ab11b6aa9749d8db0bbb17fa469e2c485a303ac1e0bac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): uPic/Models/Imgur/ImgurUploader.swift:34-40 | uPic/Models/Weibo/WeiboUploader.swift:49-55 \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":"uPic/Models/Imgur/ImgurUploader.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e1f38ae4043235a446abca64a88c82ca24fde110c4cc47b3d799dd4b3ab2bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 14): uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:125-130 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:34-40 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:53-59 | uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:71-77 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:42-48 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:61-67 | uPic/Views/PreferencesWindow/ConfigView/Views/GithubConfigView.swift:79-85 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:42-48 | uPic/Views/PreferencesWindow/ConfigView/Views/UpYunConfigView.swift:61-68 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:42-48 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:60-66 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:79-85 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:97-103 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:127-133 \u2014 there are 14 copies across 5 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 14 sites; resolving a subset leaves the remainder to drift apart. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:78\u0060 calls \u0060addRevealToggle\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/GiteeConfigView.swift:33\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":"uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc56caa027a1426c19b4bedf6076f18cb1e348f8e18f8797c519ce6de86aea37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:22-27 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:22-27 | uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:24-29 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:22-27 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:103-108 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb26810f2b1b087a296ca40dc00c9335e48659f941f5764c5494115c9fd5577"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): uPic/Models/Aliyun/AliyunUploader.swift:78-83 | uPic/Models/Baidu/BaiduUploader.swift:74-79 | uPic/Models/Smms/SmmsUploader.swift:50-55 | uPic/Models/Tencent/TencentUploader.swift:84-89 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 \u0060uPic/Models/Aliyun/AliyunUploader.swift:78\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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"043ac496d43609ab465c9c0e03aa8a7daa745364d5083ec77d0c1cdf5eb64bc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 3): uPic/Models/Qiniu/QiniuUploader.swift:76-80 | uPic/Models/Smms/SmmsUploader.swift:58-62 | uPic/Models/UpYun/UpYunUploader.swift:82-87 \u2014 before extracting anything, compare \u0060uPic/Models/Qiniu/QiniuUploader.swift\u0060 and \u0060uPic/Models/UpYun/UpYunUploader.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 45 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 \u0060uPic/Models/Qiniu/QiniuUploader.swift:76\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 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":"uPic/Models/Qiniu/QiniuUploader.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd43076ed882ffd25554e6ae2df69cec86e256024f4a4823239e73efc34c5fd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): uPic/Cli/Cli.swift:95-100 | uPic/Models/OutputFormatModel.swift:52-57 \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":"uPic/Cli/Cli.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f59ab26badec2c97a216a11be29dddb1c2958d923088c124ca83c0224d9eba9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): uPic/Models/Aliyun/AliyunUploader.swift:67-72 | uPic/Models/Baidu/BaiduUploader.swift:64-69 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunUploader.swift\u0060 and \u0060uPic/Models/Baidu/BaiduUploader.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 \u0060uPic/Models/Aliyun/AliyunUploader.swift:67\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":"uPic/Models/Aliyun/AliyunUploader.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"597d7a841c5f55a027ae238975c5c797d2fc196ee0297dbb0758c2809c3722cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): uPic/Models/Custom/CustomUploader.swift:72-77 | uPic/Models/Custom/CustomUploader.swift:114-119 \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 \u0060uPic/Models/Custom/CustomUploader.swift:72\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":"uPic/Models/Custom/CustomUploader.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"a770df556395eaf3e2dbdeef6898f9816d18ae48c7810463c21e4ff510c2ae20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): uPic/Models/Qiniu/QiniuHostConfig.swift:66-71 | uPic/Models/Tencent/TencentHostConfig.swift:67-72 \u2014 before extracting anything, compare \u0060uPic/Models/Qiniu/QiniuHostConfig.swift\u0060 and \u0060uPic/Models/Tencent/TencentHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 \u0060uPic/Models/Qiniu/QiniuHostConfig.swift:66\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":"uPic/Models/Qiniu/QiniuHostConfig.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6033ecc3745c4a9f7930548800556bf04c5da15cf7760d3d4bbe7c602b51ecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift:154-158 | uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift:198-203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"73bc826c09a48aabdebd823aab2974591166a95a4fff5eb6213af490b9ce21de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:35-40 | uPic/Views/PreferencesWindow/ConfigView/Views/WeiboConfigView.swift:27-32 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e2918ba0ea00e6cfd2b15aa0d66c2fd1586ba06c145e6f25cb0893e91078821"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): uPic/Models/Aliyun/AliyunHostConfig.swift:65-69 | uPic/Models/Baidu/BaiduHostConfig.swift:65-69 | uPic/Models/S3/S3HostConfig.swift:88-92 \u2014 before extracting anything, compare \u0060uPic/Models/Aliyun/AliyunHostConfig.swift\u0060 and \u0060uPic/Models/Baidu/BaiduHostConfig.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunHostConfig.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9d4e7239c690d0d2b199b6adad0eb6d569209afcff012575093829031a89971"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): uPic/Models/Custom/CustomUploader.swift:91-95 | uPic/Models/Gitee/GiteeUploader.swift:52-56 | uPic/Models/Github/GithubUploader.swift:55-59 \u2014 before extracting anything, compare \u0060uPic/Models/Gitee/GiteeUploader.swift\u0060 and \u0060uPic/Models/Github/GithubUploader.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 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 \u0060uPic/Models/Custom/CustomUploader.swift:91\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":"uPic/Models/Custom/CustomUploader.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e21adb9478f2611a7de29b638917118c48117df75a04603a476f3a310071ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): uPic/Models/Qiniu/QiniuUploader.swift:65-69 | uPic/Models/Smms/SmmsUploader.swift:50-54 | uPic/Models/UpYun/UpYunUploader.swift:72-76 \u2014 before extracting anything, compare \u0060uPic/Models/Qiniu/QiniuUploader.swift\u0060 and \u0060uPic/Models/UpYun/UpYunUploader.swift\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 45 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":"uPic/Models/Qiniu/QiniuUploader.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"c603d1cde638ef47f55ee507628ccf5e5e20725b2bc1ee6774b108d378c69966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift:185-189 | uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:109-113 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift:182\u0060 calls \u0060containsKey\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift:107\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":"uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"143e0b4f30fbd0b90811837f84f350391138f12e8b4b3b865c629fe1e4a8375a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): uPic/Models/Aliyun/AliyunRegion.swift:45-64 | uPic/Models/Tencent/TencentRegion.swift:37-56 \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":"uPic/Models/Aliyun/AliyunRegion.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"20b5d51af086c521842da75c880b3c08af37a5726f08f2d4508bde3c1588f829"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): uPic/Models/Imgur/ImgurHostConfig.swift:16-23 | uPic/Models/Smms/SmmsHostConfig.swift:18-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Imgur/ImgurHostConfig.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"2370b72c75e295d1d32e0bda251bfa72fc9af4a697866df0aa0740907136b81f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift:135-139 | uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift:135-139 | uPic/Views/PreferencesWindow/ConfigView/Views/S3ConfigView.swift:228-232 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/BaiduConfigView.swift\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/AliyunConfigView.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"607edf385927330bad378a9116c4b28720e626aca4d0a14f538d3625f0f44f0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift:134-138 | uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift:134-138 \u2014 before extracting anything, compare \u0060uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift\u0060 and \u0060uPic/Views/PreferencesWindow/ConfigView/Views/TencentConfigView.swift\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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":"uPic/Views/PreferencesWindow/ConfigView/Views/QiniuConfigView.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"2546e39f3c09fa4bc98c2b1b32f61502a51a1706c47e72997a4773f206d682a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): uPic/Models/Aliyun/AliyunUtil.swift:35-44 | uPic/Models/Baidu/BaiduUtil.swift:35-43 | uPic/Models/Tencent/TencentUtil.swift:16-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Aliyun/AliyunUtil.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae63adeb109d2e01cf667f9ce2c345e38b54fa53f895201ca8aed91057e35bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): uPic/StatusMenuController.swift:104-109 | uPic/Views/PreferencesWindow/AboutPreferencesViewController.swift:21-26 | uPic/Views/PreferencesWindow/AboutPreferencesViewController.swift:28-33 | uPic/Views/PreferencesWindow/AboutPreferencesViewController.swift:35-40 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/StatusMenuController.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"c39fd8dfa0f13472f65ec13972bf05428ce4a700bbaf43f3139d4fe2cd223140"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: String (LCOM4 19): String\u0027s methods fall into 19 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 19 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":"uPic/Basic/String\u002BCrypto.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f9187c7ec232f75ad471df90f20a769d2f646a17643e720c421db85599369c"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: StatusMenuController (LCOM4 14): StatusMenuController\u0027s methods fall into 14 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 14 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":"uPic/StatusMenuController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d35f00376cf366f104e9539f00a69a188a5d97ee0e7521240be68a7cd0ef3cc"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Data (LCOM4 9): Data\u0027s methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Extensions/Data\u002BExtension.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e9de5f3b11d608009c916c882b62766c1ba83a04cdf704c67a43b984eadaea0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 7): AppDelegate\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/AppDelegate.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"14f9ac74dfee1599b54f35e2bc50834fa21e7e1fe68f17e881e3ed8241d88f73"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ConfigManager (LCOM4 7): ConfigManager\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Managers/ConfigManager.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d9691317667762e4aaf614faa6d4cd61fde76314cf22a680dcdaa8a474cdd2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: HostConfig (LCOM4 7): HostConfig\u0027s methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/HostConfig.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"b31c1b095aadd50de71026e421faa940974c4c4973d80b6a3be9e9907c217058"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Logger (LCOM4 6): Logger\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":"uPic/Logger/Logger.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f54241b2d2d9dd3ca9b130f7b201b62244f3fb2ccb9235d63f0cdcaa48e51a5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CustomConfigView (LCOM4 6): CustomConfigView\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":"uPic/Views/PreferencesWindow/ConfigView/Views/CustomConfigView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdae941bd7039e58f71d12f55b73ea7cde3a3d8f31e91ff34b5809491df12ee"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AboutPreferencesViewController (LCOM4 5): AboutPreferencesViewController\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/AboutPreferencesViewController.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcfe6ba3fc8881c1382eb0843f67067881f9a3eaff4faa8a23fa0aea816a8dde"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AdvancedPreferencesViewController (LCOM4 5): AdvancedPreferencesViewController\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/AdvancedPreferencesViewController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f207917d0dcd337ff8f742be575a3ae0c56dfe3706add5887d74b446266f571"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: GeneralPreferencesViewController (LCOM4 5): GeneralPreferencesViewController\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/GeneralPreferencesViewController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a637c0b0bb111bdc1b4ab9acadc7390b058105cd57532417c74381a86e8b9eb"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ConfigView (LCOM4 5): ConfigView\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/ConfigView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a5b2d1a1bf21356600843c94b3c5c052c29d10d4436f16ebd7d27c758314be"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: DatabaseViewController (LCOM4 4): DatabaseViewController\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/DatabaseWindow/DatabaseViewController.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3fc5ed4906a7c131c7885d4986687bb8afa61f778fe9e43d24798196dcad195"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: HistoryThumbnailFlowLayout (LCOM4 4): HistoryThumbnailFlowLayout\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/HistoryRecord/HistoryThumbnailFlowLayout.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"118f755c550e287f9a6304d4cebaad91ef5e5089d1a7ac1b8faba9bdbe31ef84"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ImgurConfigView (LCOM4 4): ImgurConfigView\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/ConfigView/Views/ImgurConfigView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"442616b220579c2b7af20142362a10bdbccc5e946ee9fcadafb85a788f277fd0"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (XCTest or Swift Testing), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D9","level":"note","message":{"text":"No tests found: No test suite could be collected \u2014 no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (XCTest or Swift Testing) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9bf64cbb5a4ae13d6bcd01fa3bc8d2879d860c73bc67f176ee3c2cecb8adce3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: \u4ECE\u7528\u6237\u914D\u7F6E\u6587\u4EF6\u8BFB\u53D6\u56FE\u5E8A\u4FE1\u606F\u8986\u76D6\u6389\u73B0\u6709\u4FEE\u6539 \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/PreferencesWindow/HostPreferencesViewController.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"d360a912820ff04279760e1e6c677a7725353c10474d23c764fc5986c227cf8b"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: // FIXME: - Workaround \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Host.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"df349b328cc89ccddb9ba740285d1b5dd394c4557118c2aa1fc83b34b9950e6b"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: // FIXME: - Workaround \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/Weibo/WeiboHostConfig.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"a379d887980a11486fe0f164af084421d1dd8c5cf6488a5c1f4dc6cd2256a51f"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (12259 LoC, 156 module-visible types across 33 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D28","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":"dca5a865651288b02c8899d34bf7dc72414dd217bac55a42f22c7ace05e30272"},"properties":{"commitSha":"2b47a37a3b42c960bf06dbf961f7040d610956ef"}},{"ruleId":"D28","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":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D30","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":"1a54483dd06acd303b729bcc0b18c78a3c9e5f29d5250deb5e4f39e6d738b516"},"properties":{"dependency":{"package":"github.com/marmelroy/Zip","version":"2.1.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","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":"8ce874bd924d208accab27512406dedddaad6c0583fc6f551642ee3b3f301e98"},"properties":{"dependency":{"package":"github.com/apple/swift-nio","version":"2.86.2","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","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":"d98f2f2066873e80b6af7c9c10c5405506d21abf2563bf37f92e3344f36437d1"},"properties":{"dependency":{"package":"github.com/apple/swift-nio-http2","version":"1.38.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","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":"8d7b939d60153b7b3eb87fc29832af95adfba9f5eef00ba88ced9bdac3547b64"},"properties":{"dependency":{"package":"github.com/apple/swift-nio-extras","version":"1.29.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 4 of 63 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 63 of the 130 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: uPic/Views/HistoryRecord/HistoryThumbnailFlowLayout.swift, uPic/Views/DatabaseWindow/DatabaseViewController.swift, uPic/Views/HistoryRecord/HistoryThumbnailView.swift, uPic/Views/HistoryRecord/HistoryThumbnailContentView.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/HistoryRecord/HistoryThumbnailFlowLayout.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ee4452811d9695786d79c856dcdb5046e009305c05584b71f24ef8b3073e50"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/DatabaseWindow/DatabaseViewController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff68a1a4f852a1d094236b4a07fdf62fc07a8a09da31d613abcef0e92bdfc81"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/HistoryRecord/HistoryThumbnailView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0df267179e9af50ea0d4679c3518d13fdc1baf159f262774492d4d44035011a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Views/HistoryRecord/HistoryThumbnailContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6f68ab284df041fd0ccfaa599b8c3e75f9929638fae71103614733b67ed8ea6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AppDelegate.swift \u2194 AdvancedPreferencesViewController.swift: \u0060uPic/AppDelegate.swift\u0060 and \u0060uPic/Views/PreferencesWindow/AdvancedPreferencesViewController.swift\u0060 change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060e149c5d9\u0060 refactor: \u91CD\u65B0\u4F7F\u7528 Bookmark \u91CD\u6784\u78C1\u76D8\u5B8C\u5168\u8BBF\u95EE\u6743\u9650; \u0060908b097c\u0060 fix: \u4FEE\u590D macOS 26 \u4E0B\u65E0\u6CD5\u8BF7\u6C42\u5B8C\u5168\u78C1\u76D8\u8BBF\u95EE\u6743\u9650\u7684\u95EE\u9898; \u00604f48d511\u0060 \u72B6\u6001\u680F\u83DC\u5355\u589E\u52A0\u622A\u56FE app \u63D0\u793A \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/AppDelegate.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d699d2679c620ae44328f8df598b3cbf8368941f24cc5bd8e6221f561c814b"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P1","level":"warning","message":{"text":"CI pipeline targets a decommissioned service: The pipeline is well-formed, but the only CI definition is \u0060.travis.yml\u0060, and its \u0060README-cn.md\u0060 build badge still points at \u0060travis-ci.org\u0060 \u2014 a service shut down in June 2021. No other CI is configured in this repository, so nothing has been building or testing changes here since that shutdown \u2014 the steps below describe a gate that is not running. Porting it is mostly mechanical: the build and test commands already written here are what a replacement pipeline would run."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"94fa49939f4e75dfcbfaabad72be66184852fe80bd9db87538e6e15223919a47"}},{"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 411 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Script/AutoGenStrings.py"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"e66ef7fa80508c53264478572885b9dd041403186c9b8675c9f9ab0b27cb522d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Script/AutoGenStrings.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"1036b9ad0465b8379b62ecbeca13097dd44904e69acc42ca69b58bbf5925fd47"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"uPic/Models/BaseUploader.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"a84674782e9f19e9b811c810387e6236f41ba5d5bdc428a805aa5bbdc4e5a15f"}}],"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-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.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-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.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-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.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":"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/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":6,"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."]}]}