{"$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":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"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":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"GD1","name":"Unfinished \u0026 placeholder code","shortDescription":{"text":"Unfinished \u0026 placeholder code"},"helpUri":"https://codehealth.canine.dev/dimensions/GD1"},{"id":"IC1","name":"Incompleteness \u0026 stubs","shortDescription":{"text":"Incompleteness \u0026 stubs"},"helpUri":"https://codehealth.canine.dev/dimensions/IC1"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"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":"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":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"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":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"MainActivity.onClick (cyclomatic 78): MainActivity.onClick has cyclomatic complexity 78 (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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc89f9a5f0bcc1d17b13460dee034e91f8e079adc4aa6b85eb2c58aac20dbe25"}},{"ruleId":"D1","level":"warning","message":{"text":"PermissionInterceptor.generatePermissionHint (cyclomatic 35): PermissionInterceptor.generatePermissionHint has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/src/main/java/com/hjq/permissions/demo/permission/PermissionInterceptor.java"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"081a5e0c06312b98439347c8c51ee936030bacaa0b1e9e649002eef410b40018"}},{"ruleId":"D1","level":"warning","message":{"text":"AccessMediaLocationPermission.checkSelfByRequestPermissions (cyclomatic 26): AccessMediaLocationPermission.checkSelfByRequestPermissions has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"e22c485146409de5c24e19e2d8a0f51d81d6fe340cbef2724b9a23b2a01dcbc8"}},{"ruleId":"D1","level":"warning","message":{"text":"PermissionRequestMainLogic.getUnauthorizedList (cyclomatic 21): PermissionRequestMainLogic.getUnauthorizedList has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/core/PermissionRequestMainLogic.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd3936dfc6cb179c4de520719c7d35f3f87dcebc1732f5ed8c6ca5884679adf2"}},{"ruleId":"D1","level":"warning","message":{"text":"RequestIgnoreBatteryOptimizationsPermission.getPermissionSettingIntents (cyclomatic 18): RequestIgnoreBatteryOptimizationsPermission.getPermissionSettingIntents has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/RequestIgnoreBatteryOptimizationsPermission.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"5915cbaa7a6916f74c883949ffb4656ba189d6c3b4812cd14e165fdd9e932d78"}},{"ruleId":"D1","level":"warning","message":{"text":"AndroidManifestParser.parseAndroidManifest (cyclomatic 16): AndroidManifestParser.parseAndroidManifest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9db3a1a33a4ccdd76c02c4ceb978727f5b737be4aff24c3e9567df2236a7ae"}},{"ruleId":"D2","level":"warning","message":{"text":"MainActivity.onClick (cognitive 88): MainActivity.onClick has cognitive complexity 88 (threshold 15). Drivers by points: if/else 77 (87 pts), error handling 1 (nesting depth added 10). 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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"881c661f6408ccfb623556d8568eaa4e7598423d1057ab9396b3970f90929911"}},{"ruleId":"D2","level":"warning","message":{"text":"PermissionInterceptor.generatePermissionHint (cognitive 58): PermissionInterceptor.generatePermissionHint has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (47 pts), boolean chains 7, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/src/main/java/com/hjq/permissions/demo/permission/PermissionInterceptor.java"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2ee5a6ebd89dc0933b6fc9341e3d11d17ee33f035142f74ca8c8f4d9c776bb4"}},{"ruleId":"D2","level":"warning","message":{"text":"PermissionRequestMainLogic.getUnauthorizedList (cognitive 43): PermissionRequestMainLogic.getUnauthorizedList has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/core/PermissionRequestMainLogic.java"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"029cbe61d77e5bdb0928bc360d9c79ca48bbc5ad1ad76835bd3f97dbf2e73e5f"}},{"ruleId":"D2","level":"warning","message":{"text":"BindAccessibilityServicePermission.checkSelfByManifestFile (cognitive 31): BindAccessibilityServicePermission.checkSelfByManifestFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d49ce9f405080205357a6df65b06897c960bed794f456359851df1970b5859"}},{"ruleId":"D2","level":"warning","message":{"text":"BindDeviceAdminPermission.checkSelfByManifestFile (cognitive 31): BindDeviceAdminPermission.checkSelfByManifestFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de98c4004acf396f21fa57ef7e4e1c4310da196b70b6d26b2093bc49274f6b9"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidManifestParser.parseAndroidManifest (cognitive 27): AndroidManifestParser.parseAndroidManifest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccddeffd969e7deb27da20b69e9e2c27c6d16f6ce9c8e2330655adeb1408b423"}},{"ruleId":"D2","level":"warning","message":{"text":"AccessMediaLocationPermission.checkSelfByRequestPermissions (cognitive 27): AccessMediaLocationPermission.checkSelfByRequestPermissions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b75f8ffe756984ec0a9a90611cc677d39141a49f685db8c43b2ce11eeb10cdc"}},{"ruleId":"D2","level":"warning","message":{"text":"RequestIgnoreBatteryOptimizationsPermission.getPermissionSettingIntents (cognitive 25): RequestIgnoreBatteryOptimizationsPermission.getPermissionSettingIntents has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5 (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":"library/src/main/java/com/hjq/permissions/permission/special/RequestIgnoreBatteryOptimizationsPermission.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83ea7cd5628dcaa52557913bc0ce91c53bacb265a67e8e1495806291c887804"}},{"ruleId":"D2","level":"warning","message":{"text":"1.run (cognitive 24): 1.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/core/PermissionRequestMainLogic.java"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de04eee45a24f759d8e2cc21f8da46d4ee59b204ed1cd1046ee3d0659438692"}},{"ruleId":"D2","level":"warning","message":{"text":"MainActivity.getAllImagesFromGallery (cognitive 23): MainActivity.getAllImagesFromGallery has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (8 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"26467e716036133789b72afb3749e14a2d92c6ad689270397886d8baf584e252"}},{"ruleId":"D2","level":"warning","message":{"text":"BindNotificationListenerServicePermission.checkSelfByManifestFile (cognitive 22): BindNotificationListenerServicePermission.checkSelfByManifestFile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fbd5afb7ec7e52830819763635ef601309b1d167a3202684d606ad3f81a7a57"}},{"ruleId":"D2","level":"warning","message":{"text":"WriteExternalStoragePermission.checkSelfByManifestFile (cognitive 18): WriteExternalStoragePermission.checkSelfByManifestFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d79af32785a69e7f32723e1ac38282019cf602275c02ab3dd406aaafe51cbda"}},{"ruleId":"D2","level":"warning","message":{"text":"SystemAlertWindowPermission.getPermissionSettingIntents (cognitive 18): SystemAlertWindowPermission.getPermissionSettingIntents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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":"library/src/main/java/com/hjq/permissions/permission/special/SystemAlertWindowPermission.java"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca6b8aa48e23ad8828847380c15df55d3f670730d02b132dc4c69bdaa7fab96"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidManifestParser.parseActivityFromXml (cognitive 17): AndroidManifestParser.parseActivityFromXml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 1, 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":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"17042f7b4400c00bfcd4ee9538789152aa273fa124e1afa3077f734437bbb56d"}},{"ruleId":"D2","level":"warning","message":{"text":"BindNotificationListenerServicePermission.isGrantedPermission (cognitive 17): BindNotificationListenerServicePermission.isGrantedPermission has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a099e0e5e457567908b4f8a7ed6b00993f4f1ed27b2b4560b3a94c17b9ffd9c"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidManifestParser.parseBroadcastReceiverFromXml (cognitive 16): AndroidManifestParser.parseBroadcastReceiverFromXml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 1, 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. This shape REPEATS in the file: one other method here (AndroidManifestParser.parseServerFromXml) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f060d870e5c0514f9b0e50e1515dfb2a106185d52aeacc0f3524cbf36c4d187"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidManifestParser.parseServerFromXml (cognitive 16): AndroidManifestParser.parseServerFromXml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 1, 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. This shape REPEATS in the file: one other method here (AndroidManifestParser.parseBroadcastReceiverFromXml) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fb3256e02661c14fbbb2ff2bed8f18629397b8acb603e54858e3ec42c028db"}},{"ruleId":"D2","level":"warning","message":{"text":"HealthDataBasePermission.checkSelfByManifestFile (cognitive 16): HealthDataBasePermission.checkSelfByManifestFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/HealthDataBasePermission.java"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"1282f5c1b50dc657146d40541cb95d4ca1a54f58312f9ddb27f73c64377380cd"}},{"ruleId":"D2","level":"warning","message":{"text":"BindVpnServicePermission.checkSelfByManifestFile (cognitive 16): BindVpnServicePermission.checkSelfByManifestFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindVpnServicePermission.java"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecfea9afa6d089e02e12a4bbfe93b30c8e065d90e02097f9958e21c217412828"}},{"ruleId":"D2","level":"warning","message":{"text":"PermissionApi.getBestPermissionSettingIntent (cognitive 16): PermissionApi.getBestPermissionSettingIntent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/tools/PermissionApi.java"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff55a07ec0719a2ec538cd63ecdc4f7a89160d84f26025e4a5569618e7a7fbc"}},{"ruleId":"D2","level":"warning","message":{"text":"XXPermissions.request (cognitive 16): XXPermissions.request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (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":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"e174d1f2b70b6b7d806e93c21684ceb4337f16a7eeee9e61d152d6d926f4b4d6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PermissionLists: TooManyMethods \u2014 158 methods. The bar is 30 methods; this is 128 over it, 5.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/PermissionLists.java"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b7f0e615fa2e903f6bd2a79e52eff3baaba01e1c4c4bbee8347647443fbd58b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MainActivity.onClick: MethodTooLong \u2014 onClick runs 427 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 327 over it, 4.27\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"da755459aa8db29c9f7cb61a77ed40c642841eec5bd5b17271b50ad82cb20139"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: permission/PermissionLists.java: FileTooLong \u2014 1097 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 597 over it, 2.19\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/PermissionLists.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d0b848a80248e562eb7e385a71f2582c9c9c52f2ce65039a6e89a369339740c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: XXPermissions: TooManyMethods \u2014 52 methods. The bar is 30 methods; this is 22 over it, 1.73\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":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"316125a8fa88ffde45975199ddfbbce1408906d66f2eac850008a74f4c275624"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MainActivity: ClassTooLong \u2014 606 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 206 over it, 1.52\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e3f38ad0e29a9263e57b0082647c3dabfd10b5b50475e1e9f43bd2771299d4d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: demo/MainActivity.java: FileTooLong \u2014 675 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: MainActivity (78-956). The bar is 500 significant lines; this is 175 over it, 1.35\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3482e97788ea3a23c49202227e18bdb86febfcd695a78029cf189678b7bee2c0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PermissionInterceptor.generatePermissionHint: MethodTooLong \u2014 generatePermissionHint runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/src/main/java/com/hjq/permissions/demo/permission/PermissionInterceptor.java"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9bc569b8dd7959517d26fc14224864c4cb65c80126be6f87087683f2ffe1eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): library/src/main/java/com/hjq/permissions/permission/common/DangerousPermission.java:116-155 | library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:193-219 | library/src/main/java/com/hjq/permissions/permission/special/AccessNotificationPolicyPermission.java:75-121 | library/src/main/java/com/hjq/permissions/permission/special/NotificationServicePermission.java:108-167 | library/src/main/java/com/hjq/permissions/permission/special/PictureInPicturePermission.java:74-104 | library/src/main/java/com/hjq/permissions/permission/special/RequestInstallPackagesPermission.java:68-95 | library/src/main/java/com/hjq/permissions/permission/special/ScheduleExactAlarmPermission.java:80-107 | library/src/main/java/com/hjq/permissions/permission/special/UseFullScreenIntentPermission.java:78-114 | library/src/main/java/com/hjq/permissions/permission/special/WriteSettingsPermission.java:68-95 \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":"library/src/main/java/com/hjq/permissions/permission/common/DangerousPermission.java"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8016341ed301495ef9d65ee645ce7268cd2c822aca2f911fa0f66c4037f606"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:180-225 | library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java:100-191 | library/src/main/java/com/hjq/permissions/permission/dangerous/BodySensorsBackgroundPermission.java:141-171 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataHistoryPermission.java:58-78 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java:88-116 | library/src/main/java/com/hjq/permissions/permission/special/UseFullScreenIntentPermission.java:123-157 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b657df0cd0c0790fc38efcf2c82f0a36eecb0c8722e82962a96b9078d1b52d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): library/src/main/java/com/hjq/permissions/XXPermissions.java:483-497 | library/src/main/java/com/hjq/permissions/XXPermissions.java:507-526 | library/src/main/java/com/hjq/permissions/XXPermissions.java:546-560 | library/src/main/java/com/hjq/permissions/XXPermissions.java:570-589 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"330fdf757074b74afcd473e2cc8b68da39491eb1a429fabd49d726639b1758a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:144-213 | library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java:135-204 | library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java:178-231 | library/src/main/java/com/hjq/permissions/permission/special/BindVpnServicePermission.java:107-155 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d62a3f671c87917acf4abdf90010425608b390d23e9667f8bcfcce4043d88cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:259-289 | library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:292-319 | library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:322-349 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"796cdc3d6c5ec5e0917bbac71dd896b0e61b807288ab282c2924402b9985f34f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothScanPermission.java:100-138 | library/src/main/java/com/hjq/permissions/permission/dangerous/NearbyWifiDevicesPermission.java:91-127 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothScanPermission.java"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08eaf3059e317ae12ac9ead8104c7b0ca4340f1f2796fc6e0ed0e3e1ea3bc9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java:46-80 | library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java:112-154 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5f492b426a20f03bc17922f4df6d756db6aa49e362f11f34afadee4013e199"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): library/src/main/java/com/hjq/permissions/XXPermissions.java:633-648 | library/src/main/java/com/hjq/permissions/core/PermissionRequestMainLogic.java:360-386 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"eadbb512b7742f9ee87b7979521eceb2f514aa614bd6e89b4653fa5171a875fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:265-292 | library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:310-332 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad6b15e0c98b11e5463404de17de282dc773e991cccae5d645b1f97426ebed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): library/src/main/java/com/hjq/permissions/permission/special/ManageExternalStoragePermission.java:93-110 | library/src/main/java/com/hjq/permissions/permission/special/ManageMediaPermission.java:68-85 | library/src/main/java/com/hjq/permissions/permission/special/PackageUsageStatsPermission.java:69-90 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/ManageExternalStoragePermission.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e062b096bd20ae31825fc598a7d4baaaac9cd0525afab70a6b9d09aaf050ba9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): library/src/main/java/com/hjq/permissions/tools/PermissionUtils.java:125-140 | library/src/main/java/com/hjq/permissions/tools/PermissionUtils.java:145-160 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/tools/PermissionUtils.java"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2242eeebd1c5393d1b6870990074ad1bed2bfa31b53e329c5bf1c67cc06d51d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): app/src/main/java/com/hjq/permissions/demo/permission/PermissionConverter.java:218-236 | app/src/main/java/com/hjq/permissions/demo/permission/PermissionConverter.java:269-282 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/src/main/java/com/hjq/permissions/demo/permission/PermissionConverter.java"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"c144f242a425fa67a4db7e485ed2f50af5519ae633ca7cfa228fe1000f28eac1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): library/src/main/java/com/hjq/permissions/tools/PermissionSettingPage.java:66-81 | library/src/main/java/com/hjq/permissions/tools/PermissionSettingPage.java:117-131 | library/src/main/java/com/hjq/permissions/tools/PermissionSettingPage.java:137-151 | library/src/main/java/com/hjq/permissions/tools/PermissionSettingPage.java:157-171 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/tools/PermissionSettingPage.java"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aba465709502fe75c3045ef72e3f9daa402b895c8cb84fbf58288fed70a8e5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java:73-93 | library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java:96-107 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5799ba0b30ef757fb2d7197620a6d34a044b5c17e321a0bf52f808ae898b204"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java:73-80 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java:83-90 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"de43d0be6fa412c4c890c1647516ab7e06a44c784ac1b16554544acf41b9c052"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): library/src/main/java/com/hjq/permissions/tools/PermissionApi.java:192-205 | library/src/main/java/com/hjq/permissions/tools/PermissionApi.java:210-223 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/tools/PermissionApi.java"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb2b9e91cedd101224cf2b2acd2d1210e7cae49276c48097a40ef3d0c135f8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): library/src/main/java/com/hjq/permissions/permission/PermissionLists.java:823-832 | library/src/main/java/com/hjq/permissions/permission/PermissionLists.java:840-849 | library/src/main/java/com/hjq/permissions/permission/PermissionLists.java:885-894 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/PermissionLists.java"},"region":{"startLine":823}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e8b141ea1ca56d79671fbacc4a8526e0e9c77956926540a3895afc0266ae5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:62-73 | library/src/main/java/com/hjq/permissions/permission/dangerous/BodySensorsBackgroundPermission.java:62-69 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1339c0d0967f6c96c0ea012bf46df9c09cf6bbaf0ad0c0a8fc72562581f25df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): library/src/main/java/com/hjq/permissions/permission/special/AccessNotificationPolicyPermission.java:61-71 | library/src/main/java/com/hjq/permissions/permission/special/UseFullScreenIntentPermission.java:64-74 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/AccessNotificationPolicyPermission.java"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"eff4de0607b3ff72c36d7ef7b5db3370cb15381bdb7ac78ed2a6e20c3c34ea5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): library/src/main/java/com/hjq/permissions/tools/PermissionApi.java:47-59 | library/src/main/java/com/hjq/permissions/tools/PermissionUtils.java:221-232 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/tools/PermissionApi.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"086ab371882307329cd559eb1974806eca1c477fe6b328635575ea5c71320574"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java:106-141 | library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java:149-184 \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 \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java:106\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"b90e9199e3e8da6f3d4ea0faa5722d84c461bcdb4a90e63b56d124e8a490e60d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothScanPermission.java:110-138 | library/src/main/java/com/hjq/permissions/permission/dangerous/NearbyWifiDevicesPermission.java:99-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothScanPermission.java:110\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothScanPermission.java:104\u0060 calls \u0060checkPermissionRegistrationStatus\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/NearbyWifiDevicesPermission.java:94\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothScanPermission.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d012be39823ef3838d4ea1ade1fd3a7cffcd698a15e0396e89f4465885004099"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java:47-72 | library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java:113-139 \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 \u0060library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java:47\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":"library/src/main/java/com/hjq/permissions/start/StartActivityAgent.java"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3170a3646f2d827dc1a04acda274c127390fcedfa932d90f0b266aac5bd105"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:93-113 | library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java:111-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 \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:93\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:91\u0060 calls \u0060isClassExist\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java:109\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":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"15793bb90a3dc0d858e44ff81d1e90f7aacc3519882ee560dbf15488fcb030bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java:206-224 | library/src/main/java/com/hjq/permissions/permission/special/BindVpnServicePermission.java:126-143 \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":"library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"935ee3fc6874443797cf63fe37290377fb9c913199df7a913dbb9f0812d410f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:272-289 | library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:302-319 | library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:332-349 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:272\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":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64e08decf47f314454f761afc5053b208b3a8b22aafb1a60cf4cb5ea479c4c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): library/src/main/java/com/hjq/permissions/XXPermissions.java:509-526 | library/src/main/java/com/hjq/permissions/XXPermissions.java:572-589 \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 \u0060library/src/main/java/com/hjq/permissions/XXPermissions.java:509\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":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ec92ff15cf16c993a5cf1eb09d87b91f2854c18cb008992bab4114b80f9d29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 9): library/src/main/java/com/hjq/permissions/permission/common/DangerousPermission.java:139-155 | library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:203-219 | library/src/main/java/com/hjq/permissions/permission/special/AccessNotificationPolicyPermission.java:105-121 | library/src/main/java/com/hjq/permissions/permission/special/NotificationServicePermission.java:151-167 | library/src/main/java/com/hjq/permissions/permission/special/PictureInPicturePermission.java:88-104 | library/src/main/java/com/hjq/permissions/permission/special/RequestInstallPackagesPermission.java:79-95 | library/src/main/java/com/hjq/permissions/permission/special/ScheduleExactAlarmPermission.java:91-107 | library/src/main/java/com/hjq/permissions/permission/special/UseFullScreenIntentPermission.java:98-114 | library/src/main/java/com/hjq/permissions/permission/special/WriteSettingsPermission.java:79-95 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/permission/common/DangerousPermission.java:139\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060library/src/main/java/com/hjq/permissions/permission/special/AccessNotificationPolicyPermission.java:103\u0060 calls \u0060isAndroid6\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/special/RequestInstallPackagesPermission.java:75\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":"library/src/main/java/com/hjq/permissions/permission/common/DangerousPermission.java"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"1936948336989ab0bd729feb4cb1ea47de04de711270578cce136c09087fe166"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): app/src/main/java/com/hjq/permissions/demo/HealthDataPrivacyPolicyActivity.java:34-49 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:93-108 \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 \u0060app/src/main/java/com/hjq/permissions/demo/HealthDataPrivacyPolicyActivity.java:34\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":"app/src/main/java/com/hjq/permissions/demo/HealthDataPrivacyPolicyActivity.java"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf76ee9beda54dab116f590f376b49c21edfde18f713294eecbaa1b5b0bc693a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:167-181 | library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java:158-172 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:167\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":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"76958fc446499540c620ebde55430c27fc3b7e15e1ec373c52c61afbfcced409"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:188-202 | library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java:179-193 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:188\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":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e59d672ae5b24a8a24668755425ca045f86fdbc21ed40e3cebcc5c6b9b77ccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): library/src/main/java/com/hjq/permissions/XXPermissions.java:485-497 | library/src/main/java/com/hjq/permissions/XXPermissions.java:548-560 \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 \u0060library/src/main/java/com/hjq/permissions/XXPermissions.java:485\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":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9e1551962e7c37c9d437a73bf10d3b7a4a9297f411e9d125e3203f01247980f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): library/src/main/java/com/hjq/permissions/XXPermissions.java:635-646 | library/src/main/java/com/hjq/permissions/core/PermissionRequestMainLogic.java:367-379 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/XXPermissions.java:635\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":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"1080368021ad47b5b3fc337ec6695870ea60714a47e509d7c46ef1ceafb22c85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:165-176 | library/src/main/java/com/hjq/permissions/permission/special/BindVpnServicePermission.java:124-135 \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":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"974383df4b8732172cb2935418e6641490dad8af02520d920ca7c3b2ff90ea10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): library/src/main/java/com/hjq/permissions/XXPermissions.java:484-494 | library/src/main/java/com/hjq/permissions/XXPermissions.java:508-518 | library/src/main/java/com/hjq/permissions/XXPermissions.java:547-557 | library/src/main/java/com/hjq/permissions/XXPermissions.java:571-581 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/XXPermissions.java"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"be137eb5e34e224af966ae061d7cbedd6c3d88e3ee756703407288103592a884"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): app/src/main/java/com/hjq/permissions/demo/MainActivity.java:302-311 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:324-333 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:427-436 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:516-525 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:640-649 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:302\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:639\u0060 calls \u0060permission\u0060, \u0060getUseFullScreenIntentPermission\u0060 and \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:515\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cbf2d7639507b5f7df59f1f5a7a1b5e55d071a3770b55361753e93d30a75bd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): app/src/main/java/com/hjq/permissions/demo/MainActivity.java:455-464 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:750-759 \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 \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:455\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:748\u0060 calls \u0060permission\u0060, \u0060getReadCallLogPermission\u0060, \u0060getWriteCallLogPermission\u0060 and \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:454\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"6acdcda08a85c9c1e441bfc308240d1ef7e4d1493a53e07df467fff27f29001c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:268-277 | library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:316-325 \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 \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java:268\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/GetInstalledAppsPermission.java"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"429c951bd06f66d4fa0e593c3fc8a9c1427cc13cbc3c97fcded08333a9738f8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 17): app/src/main/java/com/hjq/permissions/demo/MainActivity.java:161-169 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:177-185 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:194-202 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:339-347 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:442-450 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:456-464 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:470-478 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:495-503 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:546-554 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:560-568 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:574-582 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:588-596 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:602-610 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:616-624 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:657-665 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:671-679 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:751-759 \u2014 all 17 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:161\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:748\u0060 calls \u0060permission\u0060, \u0060getReadCallLogPermission\u0060, \u0060getWriteCallLogPermission\u0060 and \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:454\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"deaf6689d147fa2f9b85a4f15c37d7d28673e2f80a2b2b88819901e1644595d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): app/src/main/java/com/hjq/permissions/demo/MainActivity.java:221-228 | app/src/main/java/com/hjq/permissions/demo/MainActivity.java:685-692 \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 \u0060app/src/main/java/com/hjq/permissions/demo/MainActivity.java:221\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":"app/src/main/java/com/hjq/permissions/demo/MainActivity.java"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"af45acccc518c30b865f6582a0d546725ef23748f3cd7febeddd01e6bd591df7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:200-206 | library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java:107-113 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java:91-97 \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 \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:200\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0d70ba9326e137b3aa57f0669c31ec651d014596efdcbb60fa1925b9d55995"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:294-300 | library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:324-330 \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 \u0060library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java:294\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":"library/src/main/java/com/hjq/permissions/manifest/AndroidManifestParser.java"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ef91cf4f340c483ffa2b2039fd3500ef311268af551a3e7aaf9ebf82ce07dae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:201-206 | library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java:108-113 | library/src/main/java/com/hjq/permissions/permission/dangerous/BodySensorsBackgroundPermission.java:155-160 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataHistoryPermission.java:61-66 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java:92-97 \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 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:201\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ff48cc5a953051e9399874084101ac6a70d8b5d92c54cac8f9112be53462b84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:200-204 | library/src/main/java/com/hjq/permissions/permission/special/UseFullScreenIntentPermission.java:132-136 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java:200\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fb79d9fee65b14db3a117a9b2b3908ea31cf46044743c987f84ef073b6f3959"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (70 lines \u00D7 2): library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragment.java:1-70 | library/src/main/java/com/hjq/permissions/fragment/impl/androidx/PermissionAndroidXFragment.java:1-81 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragment.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/fragment/impl/androidx/PermissionAndroidXFragment.java\u0060 as WHOLE FILES: 84% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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 \u0060library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragment.java:1\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: \u0060Fragment\u0060 names \u0060android.app.Fragment\u0060 in one and \u0060androidx.fragment.app.Fragment\u0060 in another \u2014 different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragment.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4812cd39195b0ebc5be1e9d1475e3e8684aa7194d9d2bdc8b02bbd56d7a9e16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaAudioPermission.java:84-90 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java:102-108 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java:102-108 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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 \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaAudioPermission.java:84\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaAudioPermission.java"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"79414e935da67774bd262f2e8c69d30c86959b6b9ee3c0e0679b8ca489bca1c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaAudioPermission.java:93-101 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java:111-119 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java:111-119 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaAudioPermission.java"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"1177e030423bbce1a8cf19e2354bc75f1c7abdd10817253167746d46fe701cd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java:76-85 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java:76-85 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java\u0060 as WHOLE FILES: 82% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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. 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":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83c0f9f2db63740d21aed02f20ce35086a4546638e18b95c237b7818fd53987"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothAdvertisePermission.java:81-87 | library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothConnectPermission.java:81-87 \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 \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothAdvertisePermission.java:81\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/BluetoothAdvertisePermission.java"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c990cc2d647f5456cb76cc938e7cf2012f5a005735e28defda85e1b86c68e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java:79-85 | library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthRatePermission.java:70-76 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java:79\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":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a40d1409812d3e47cfbaf7903ecb1dceed1e34cc6bafc9683b39867c6dd029"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java:129-137 | library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java:120-128 | library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java:163-171 \u2014 before extracting anything, compare \u0060library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java\u0060 and \u0060library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"1942a8a5fdfc0947a48910504ed5cc99b1c7813f6866d757d7fb3dcbc455d2f7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: :library: :library: abstractness 0.13, instability 0.00, distance 0.87 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ad54f11ef32d4fe8aad80bf0d2921c7c690a25137132b21d9f727ac68f1aad56"}},{"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 (JUnit (with Kotest or MockK on Kotlin)), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D13","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":"1c91fc365ef9edd4cdae2bbd726b1e3fd6061fb34b1287c99e7893ca1d42e53f"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060app/build.gradle\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/build.gradle"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"123dd0e8ffcc36166e0d545fa94752f835564d5aa9b01b1d50abd074628ad295"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060library\u0060 (12665 LoC, 98 module-visible types across 16 directories) overshoots its size bounds. 1 of 2 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/build.gradle"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5f696e0c11c53d75d235e3510b8b3f80afd7c47bff6b9ce22669ce57cf75e93"}},{"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":"eafdd1343a07eae8efa99762c28d5170c8287d9df69d20e6c5689ba25c2ec14d"},"taxa":[{"id":"CWE-321","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1bc74b96b4b3319094a2169e732120da3dce255dc1653cde99696b9d6ff17c03"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bb63397f18fb872024430f816b3d12265b1167a6a6365ded578a1c45c99c22c1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"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":"ba60192f3fcaaaf1d599b4f2268d601decd6eed5de882c66836fa1fe7d37c279"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8e19a2c097a5647f6fe6864b2fe5a247c1cfecd1c734ffb580b7b0d9f4130fd7"},"taxa":[{"id":"CWE-1104","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-1329","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3b0367e7ea9bdd389991714fe83002077989c3eac9db9d8bdc3becd4dd073aee"},"taxa":[{"id":"CWE-926","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b77b5a3f98f3a005dcd47e09cef4052edc1024509c65b0ad78f4997a5fc07263"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"GD1","level":"warning","message":{"text":"Unfinished stub \u2014 empty body under a TODO marker: \u0060onNotificationRemoved\u0060 is a shipped method whose body is empty except for a TODO/FIXME \u2014 scaffolding that was never completed. Implement it or remove it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/src/main/java/com/hjq/permissions/demo/example/ExampleNotificationListenerService.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a5a0a86c3e8ec4134f48369c7be18bc6b39b5081d1fbef3d7d07882c389b10d"}},{"ruleId":"IC1","level":"note","message":{"text":"Blanket warning suppression: \u0060@SuppressWarnings(\u0022all\u0022)\u0060 switches every compiler and analyser warning off for the whole declaration \u2014 hidden debt. Suppress the specific warning on the specific member, with a justification, instead."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/tools/PermissionUtils.java"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0eee22f74f1f9b34c4d9ca3556e39f7a3b4aee507baa5a382a444a0bad41d0"}},{"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":"P10","level":"note","message":{"text":"Implementation type on the public API: 1 public type in \u0060com.hjq.permissions.core\u0060 is marked as implementation by its own namespace, folder or name: \u0060PermissionChannelImpl\u0060 (library/src/main/java/com/hjq/permissions/core/PermissionChannelImpl.java:27, name ends in \u0060Impl\u0060). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/core/PermissionChannelImpl.java"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7fd24ff4ac692294c50d03e9ac01d61a1bf52fe7a83fabf92af736a1f1aa7aa"}},{"ruleId":"P10","level":"note","message":{"text":"Implementation type on the public API: 3 public types in \u0060com.hjq.permissions.fragment.impl.android\u0060 are marked as implementation by their own namespace, folder or name: \u0060PermissionAndroidFragment\u0060 (library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragment.java:19, \u0060impl\u0060), \u0060PermissionAndroidFragmentByRequestPermissions\u0060 (library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragmentByRequestPermissions.java:13, \u0060impl\u0060), \u0060PermissionAndroidFragmentByStartActivity\u0060 (library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragmentByStartActivity.java:14, \u0060impl\u0060). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/fragment/impl/android/PermissionAndroidFragment.java"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d84328dc1962f97345475fbaff13f396ca85a273d59c73d373a906fb2f3ca0"}},{"ruleId":"P10","level":"note","message":{"text":"Implementation type on the public API: 3 public types in \u0060com.hjq.permissions.fragment.impl.androidx\u0060 are marked as implementation by their own namespace, folder or name: \u0060PermissionAndroidXFragment\u0060 (library/src/main/java/com/hjq/permissions/fragment/impl/androidx/PermissionAndroidXFragment.java:18, \u0060impl\u0060), \u0060PermissionAndroidXFragmentByRequestPermissions\u0060 (library/src/main/java/com/hjq/permissions/fragment/impl/androidx/PermissionAndroidXFragmentByRequestPermissions.java:13, \u0060impl\u0060), \u0060PermissionAndroidXFragmentByStartActivity\u0060 (library/src/main/java/com/hjq/permissions/fragment/impl/androidx/PermissionAndroidXFragmentByStartActivity.java:14, \u0060impl\u0060). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/fragment/impl/androidx/PermissionAndroidXFragment.java"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2b3011a2398933c0699e453e35050aae83a6bd3cbae0f877d6662067394f1a"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add spotbugs with find-sec-bugs (or \u0060semgrep --config=auto\u0060, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060app/build.gradle\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"app/build.gradle"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1a09c35b4f2b1744bb172b32265c39a53ec5c2333a182d35314d2fc2dd0d66"}},{"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":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060DeviceOs.isHyperOs() || DeviceOs.isMiui()\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/special/RequestIgnoreBatteryOptimizationsPermission.java, library/src/main/java/com/hjq/permissions/permission/special/UseFullScreenIntentPermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/RequestIgnoreBatteryOptimizationsPermission.java"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"df04f82f1baa27c5cf949c15ca1bb8c02428802f4bf567619c5d4b93a2fffb4c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060DeviceOs.isHyperOs() || DeviceOs.isMiui() || DeviceOs.isMagicOs() || DeviceOs.isHarmonyOs() || DeviceOs.isHarmonyOsNextAndroidCompatible() |\u2026\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/BodySensorsBackgroundPermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessBackgroundLocationPermission.java"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3011ea3a3bd42e0b5d54462a712e1625fcdeb22f85f54d986650cee65a6c321"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060PermissionVersion.isAndroid11() \u0026\u0026 PermissionVersion.getTargetSdkVersion(context) \u003E= PermissionVersion.ANDROID_11\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"fda02db77ef34be137c64a29a359d6c6d4d62ffef693c85b80971a858407df5a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060PermissionVersion.isAndroid13() \u0026\u0026 PermissionVersion.getTargetSdkVersion(context) \u003E= PermissionVersion.ANDROID_13\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/AccessMediaLocationPermission.java"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b23826e893e518fc3cd140a34b808a3ab2d909e2e30b620d7256deb1e2f719"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060PermissionVersion.isAndroid14() \u0026\u0026 !skipRequest\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaVideoPermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadMediaImagesPermission.java"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c81a2254e5438caa00e8ec8ae667c9fdc35878f51bb5f402663a142bdcf5458"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060context.getPackageName().equals(componentName.getPackageName()) \u0026\u0026 serviceClassName.equals(componentName.getClassName())\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java, library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35d0bd88c0a7ef94c2f7f7ceffca8949b22c40332be91ef5f1a5dd9a7acc7ba"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metaDataName.equals(metaDataInfo.name) \u0026\u0026 metaDataInfo.resource != 0\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java, library/src/main/java/com/hjq/permissions/permission/special/BindDeviceAdminPermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"7149186f9c7349f2a8af428cd1cda52d7538469de15362df3086518ccc2cd103"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060otherHealthDataPermissionIndex != -1 \u0026\u0026 otherHealthDataPermissionIndex \u003E thisPermissionIndex\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataHistoryPermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataInBackgroundPermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadHealthDataHistoryPermission.java"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0c195dd2dbb782e0b8a8b0e4f622d8acf9487c207172084ddcf3052846c594"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060permissions == null || permissions.isEmpty()\u0060 appears character-identically in 4 files \u2014 library/src/main/java/com/hjq/permissions/core/PermissionChannelImpl.java, library/src/main/java/com/hjq/permissions/manager/AlreadyRequestPermissionsManager.java, library/src/main/java/com/hjq/permissions/tools/PermissionApi.java, library/src/main/java/com/hjq/permissions/tools/PermissionUtils.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/core/PermissionChannelImpl.java"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"074d4eebd2187f0fa955c9308f2e680390af909b0bb4ec110cc736c67e57c706"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060serviceInfo.permission == null || !PermissionUtils.equalsPermission(this, serviceInfo.permission)\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java, library/src/main/java/com/hjq/permissions/permission/special/BindNotificationListenerServicePermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/special/BindAccessibilityServicePermission.java"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cbe98b7b970778cb6e61703d3f67c2218b8a3a6be94655653a7e60517b387d7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060targetSdkVersion \u003E= PermissionVersion.ANDROID_10 \u0026\u0026 !applicationInfo.requestLegacyExternalStorage \u0026\u0026 !scopedStorage\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ceb9d0804e459a26b6d2039614c82eb5801756516fab4089ed77cdf1d1f6085"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060targetSdkVersion \u003E= PermissionVersion.ANDROID_11 \u0026\u0026 !scopedStorage\u0060 appears character-identically in 2 files \u2014 library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java, library/src/main/java/com/hjq/permissions/permission/dangerous/WriteExternalStoragePermission.java. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"library/src/main/java/com/hjq/permissions/permission/dangerous/ReadExternalStoragePermission.java"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fb5172063e31bd4bd80cde69185d810e188f07a09215de6a94df63703e3dfb"}},{"ruleId":"X5","level":"note","message":{"text":"Java packages are not null-marked everywhere: 0/19 of this repository\u0027s Java package directories are under a non-null default: a \u0060package-info.java\u0060 declaring \u0060@NullMarked\u0060 (JSpecify) or \u0060@NonNullApi\u0060, \u0060@ParametersAreNonnullByDefault\u0060, \u0060@NonNullByDefault\u0060, \u0060@DefaultQualifier(NonNull.class)\u0060; a \u0060module-info.java\u0060 declaring \u0060@NullMarked\u0060; every type in it \u0060@NullMarked\u0060; or a build that runs NullAway with the package in \u0060AnnotatedPackages\u0060, or the Checker Framework\u0027s \u0060NullnessChecker\u0060. Elsewhere every reference admits null and no checker warns on the dereference that throws a \u0060NullPointerException\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"419201f6fc7ba243aef2cfb154378641588a8190e6269cea04a7b48c3d343bd5"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1104","guid":"4c918cb5-b2a6-6c55-9963-a44ee464305e","name":"Use of Unmaintained Third Party Components","shortDescription":{"text":"Use of Unmaintained Third Party Components"},"helpUri":"https://cwe.mitre.org/data/definitions/1104.html"},{"id":"CWE-1329","guid":"f70f1c3f-4ccf-cb5e-bdd3-03ba4868d36d","name":"Reliance on Component That is Not Updateable","shortDescription":{"text":"Reliance on Component That is Not Updateable"},"helpUri":"https://cwe.mitre.org/data/definitions/1329.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-321","guid":"0ce564a5-a44c-3358-b3db-317712e6e019","name":"Use of Hard-coded Cryptographic Key","shortDescription":{"text":"Use of Hard-coded Cryptographic Key"},"helpUri":"https://cwe.mitre.org/data/definitions/321.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-926","guid":"0d9b5579-5549-555a-8a97-f9cc14f3ad4a","name":"Improper Export of Android Application Components","shortDescription":{"text":"Improper Export of Android Application Components"},"helpUri":"https://cwe.mitre.org/data/definitions/926.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/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":12,"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."]}]}