{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"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":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"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":"TwoStagePointerAnalyze.analyzeStmtInterProcedure (cyclomatic 30): TwoStagePointerAnalyze.analyzeStmtInterProcedure has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b1b8c5792c7894b5c04830c66613f14bce3640d02ebe07d94ce37e79d202e4"}},{"ruleId":"D1","level":"warning","message":{"text":"TaintPathModeHtmlWriter.genCodeDetail (cyclomatic 25): TaintPathModeHtmlWriter.genCodeDetail has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ui/TaintPathModeHtmlWriter.kt"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff1950ca2744795857aa9bcf745518b211d7ebef7ea4b77cd9b5d602a0c0595b"}},{"ruleId":"D1","level":"warning","message":{"text":"MethodPatch.calcCallbackPatchUnits (cyclomatic 24): MethodPatch.calcCallbackPatchUnits has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodPatch.kt"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0f8a2ec83ccacc44d6899b3eb557a4910aa8850047dff7c5cfbb893032217a"}},{"ruleId":"D1","level":"warning","message":{"text":"TaintRuleSourceSinkCollector.calcSinkPointers (cyclomatic 19): TaintRuleSourceSinkCollector.calcSinkPointers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/TaintRuleSourceSinkCollector.kt"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c6b1b350392c9afb118df4405fc938b75fa47abbc7be36686e0b1be238ca391"}},{"ruleId":"D1","level":"warning","message":{"text":"ObscureRuleHandler.addEdgeByRule (cyclomatic 19): ObscureRuleHandler.addEdgeByRule has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"963f72ef2eb3a96e382b2ec6a8748b3f951721c46eecb438c809d299cabafcca"}},{"ruleId":"D1","level":"warning","message":{"text":"MethodFinder.checkAndParseMethodSigInternal (cyclomatic 17): MethodFinder.checkAndParseMethodSigInternal has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/MethodFinder.kt"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"c34c6a0d44c921c146eb5c47aa24388cea1e4a2eaffc14b38f803b9f63e4d024"}},{"ruleId":"D1","level":"warning","message":{"text":"PLUtils.entryMethod (cyclomatic 17): PLUtils.entryMethod has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/PLUtils.kt"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"192584fa97013cc64ed745b192f84d1e4fb3237bedfc95bf38f804596af68a85"}},{"ruleId":"D1","level":"warning","message":{"text":"TwoStagePointerAnalyze.instanceInvoke (cyclomatic 17): TwoStagePointerAnalyze.instanceInvoke has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"55085e01994374fb087fb4fce2514d24aefb2b6ca9cb71b785c527ddbc7135b7"}},{"ruleId":"D1","level":"warning","message":{"text":"MethodFieldConstCacheVisitor.visitEachStmt (cyclomatic 16): MethodFieldConstCacheVisitor.visitEachStmt 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":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodFieldConstCacheVisitor.kt"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"67731131d7517366f41078d403f562c031a8e7c7bef0274aa1f8b55559fd4a5b"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintPathModeHtmlWriter.genCodeDetail (cognitive 82): TaintPathModeHtmlWriter.genCodeDetail has cognitive complexity 82 (threshold 15). Drivers by points: if/else 21 (65 pts), loops 5 (9 pts), error handling 1 (6 pts), boolean chains 2 (nesting depth added 53). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ui/TaintPathModeHtmlWriter.kt"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e48888f4c286212c1bd5592e482332e3cd0bdde21950739f8fe4c1949707a2"}},{"ruleId":"D2","level":"warning","message":{"text":"DirectModeRule.constStringPatterns (cognitive 62): DirectModeRule.constStringPatterns has cognitive complexity 62 (threshold 15). Drivers by points: if/else 8 (41 pts), loops 5 (21 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/rules/DirectModeRule.kt"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4fa8f5ed37b72a9b697923e1529578f0bdb92ee96aeba1fb94b219cb84e88a4"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidUtils.loadDynamicRegisterReceiver (cognitive 60): AndroidUtils.loadDynamicRegisterReceiver has cognitive complexity 60 (threshold 15). Drivers by points: if/else 10 (54 pts), loops 3 (6 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/android/AndroidUtils.kt"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0fd3752a30ecbea7e6058a812b13106ec0b52813401108616b144a27cacbf5c"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintRuleSourceSinkCollector.calcSinkPointers (cognitive 50): TaintRuleSourceSinkCollector.calcSinkPointers has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (45 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/TaintRuleSourceSinkCollector.kt"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd8603246ee951ef246eb4129d568de91daf9f5bb5509b0190f53578b5d53c3"}},{"ruleId":"D2","level":"warning","message":{"text":"MethodPatch.calcCallbackPatchUnits (cognitive 49): MethodPatch.calcCallbackPatchUnits has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 5 (13 pts), boolean chains 4, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodPatch.kt"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc7cd8aab2b57e8a0aff747397c046af54821a014c5b4a4ccbb3844bb1fa9810"}},{"ruleId":"D2","level":"warning","message":{"text":"MethodFieldConstCacheVisitor.visitEachStmt (cognitive 42): MethodFieldConstCacheVisitor.visitEachStmt has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodFieldConstCacheVisitor.kt"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"b615bd98bd99e8447c622aa40f3e08d12818758c9f6297de2bb6ba96a425f94d"}},{"ruleId":"D2","level":"warning","message":{"text":"MethodFinder.checkAndParseMethodSigInternal (cognitive 41): MethodFinder.checkAndParseMethodSigInternal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (12 pts), boolean chains 3 (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":"src/main/kotlin/net/bytedance/security/app/MethodFinder.kt"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"26ac5b4670b638529ef0e5c879d1f1ab4bcc3368479e330dc61499f54988faf6"}},{"ruleId":"D2","level":"warning","message":{"text":"TwoStagePointerAnalyze.instanceInvoke (cognitive 41): TwoStagePointerAnalyze.instanceInvoke has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"77385ea3fec6829110c12a228ab7f36687f3ffbd0eb350e2166aab843c3e8d6a"}},{"ruleId":"D2","level":"warning","message":{"text":"TwoStagePointerAnalyze.handleInstanceInvoke (cognitive 36): TwoStagePointerAnalyze.handleInstanceInvoke has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 1 (6 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"4319c3822c05bc5dd910e14f9d77c1a5d61920d8b81911dc47520be71d9c6e17"}},{"ruleId":"D2","level":"warning","message":{"text":"Reflection.calcGetMethod (cognitive 35): Reflection.calcGetMethod has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (33 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3ed22e3a5b2442f8280735f043eb053cf99479bfab2f5ceade259e54bbb2f55"}},{"ruleId":"D2","level":"warning","message":{"text":"PLUtils.entryMethod (cognitive 34): PLUtils.entryMethod has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (22 pts), error handling 2 (4 pts), loops 3 (4 pts), match/switch 1 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/PLUtils.kt"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e4f7d77433211e5e53bf9081f6d0325b4b2b73810fd103b9274858076789155"}},{"ruleId":"D2","level":"warning","message":{"text":"Reflection.getReflectionClass (cognitive 34): Reflection.getReflectionClass has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"08f719d52e85b1f50fd4463886318a9595af9549ac4fa968214c39c068b507e2"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintRuleSourceSinkCollector.processSourceReturn (cognitive 34): TaintRuleSourceSinkCollector.processSourceReturn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (21 pts), loops 4 (11 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":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/TaintRuleSourceSinkCollector.kt"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc35797a09493ac81ffd406d52b0db6f8b2bc7b6fa3d8f9b82f96721a7b24555"}},{"ruleId":"D2","level":"warning","message":{"text":"ObscureRuleHandler.addEdgeByRule (cognitive 34): ObscureRuleHandler.addEdgeByRule has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 5 (14 pts), loops 1 (nesting depth added 20). 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":"src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fadc9bade39da98fc55ec055bf4a29e42e14ce94c75d6353e79946088c8dce"}},{"ruleId":"D2","level":"warning","message":{"text":"TwoStagePointerAnalyze.staticInvoke (cognitive 34): TwoStagePointerAnalyze.staticInvoke has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 1 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f7c789564f21a7d97d1e239e058b6c63f92b1ccd153bbb37e53f3ceb750370e"}},{"ruleId":"D2","level":"warning","message":{"text":"ConstModeProcessor.calcAllConstPointers (cognitive 33): ConstModeProcessor.calcAllConstPointers has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 3 (9 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstModeProcessor.kt"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"df279ec666789eca7a5f33b1d900a6d6bb439931081550d2a4b4dff1b4845688"}},{"ruleId":"D2","level":"warning","message":{"text":"Reflection.injectInvokeStmt (cognitive 28): Reflection.injectInvokeStmt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a92c29f3d3e226c0da05963ffa64256f2b5e87059d36cb757b1128cabd6ea10"}},{"ruleId":"D2","level":"warning","message":{"text":"DirectModeProcessor.parseDirectEntry (cognitive 28): DirectModeProcessor.parseDirectEntry has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/DirectModeProcessor.kt"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"1882db950f84b1c9454c1060fe695657ff01bb54bbcbf1518b615326924966f5"}},{"ruleId":"D2","level":"warning","message":{"text":"TwoStagePointerAnalyze.analyzeStmtInterProcedure (cognitive 28): TwoStagePointerAnalyze.analyzeStmtInterProcedure has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (8 pts), loops 1 (5 pts), boolean chains 2 (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":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ccd4ed980da101196decd23341ebe36eb9bd75b99d20ad627a8597429916d3"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintPathFinder.runConstAnalyze (cognitive 27): TaintPathFinder.runConstAnalyze has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintPathFinder.kt"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61f262eab9dbabe361629d60e951fc1c6c2c0c426b40c9d8bc2cc68ee60e348"}},{"ruleId":"D2","level":"warning","message":{"text":"TraceTask.addManifest (cognitive 26): TraceTask.addManifest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/result/TraceTask.kt"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be0966e210330176b4aecef56c3424476b780eee0be06861bbf67523e925b54"}},{"ruleId":"D2","level":"warning","message":{"text":"HelperKt.newFunctionSignature (cognitive 26): HelperKt.newFunctionSignature has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 8 (10 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/util/helper.kt"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5764ef6c781f738adc6a2676a11c216c50dc61902abdea2c1334d87f3169eb0"}},{"ruleId":"D2","level":"warning","message":{"text":"MethodFieldConstCacheVisitor.collectOthers (cognitive 25): MethodFieldConstCacheVisitor.collectOthers has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodFieldConstCacheVisitor.kt"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39d1061475c68dad2f6047c75aac86192167097e05fa94d4f93385061516608"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintPathFinder.isConstStringRuleMatch (cognitive 24): TaintPathFinder.isConstStringRuleMatch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (23 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":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintPathFinder.kt"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dc9102c0b138a6540ae005a7b9a5d5a9d8c239a166ecf9b93e83db3ac8c9d02"}},{"ruleId":"D2","level":"warning","message":{"text":"ConstModeProcessor.constStrArgMatch (cognitive 24): ConstModeProcessor.constStrArgMatch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (23 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":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstModeProcessor.kt"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"601aee6bcaecb0660e5443d59c8a09c1f02dc0d2a6dc64a6c667a77717ece356"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintRuleSourceSinkCollector.processSourceMethodParameter (cognitive 24): TaintRuleSourceSinkCollector.processSourceMethodParameter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (11 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/TaintRuleSourceSinkCollector.kt"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"0752723d6e887e566c0a127819d2bef41f8544188f79cb2b75d8f48d4b347d1a"}},{"ruleId":"D2","level":"warning","message":{"text":"Fragment.findOneStepFragment (cognitive 23): Fragment.findOneStepFragment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 1, 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":"src/main/kotlin/net/bytedance/security/app/Fragment.kt"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d9b02dd72e56cdf5fdf3d23b9a22fc08c6815da6569136febed59a6d1eba43"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidUtils.getDefinedPermissions (cognitive 23): AndroidUtils.getDefinedPermissions has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 2 (8 pts), error handling 2 (7 pts), if/else 4 (7 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/android/AndroidUtils.kt"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b31f32208daae7312b4aa487fcaf2cc74858427bd6f3aac2c8cb40a5d577a8"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintCheckSanitizerParser.calcSanitizePtrSet (cognitive 23): TaintCheckSanitizerParser.calcSanitizePtrSet has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/sanitizer/TaintCheckSanitizerParser.kt"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d7a1dd80b7b8a5a60be5117f28f98b151fdbd22f19437baa37567aa1123ef6"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintFlowEdgeFinder.localToParam (cognitive 22): TaintFlowEdgeFinder.localToParam has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74f0b55a670103516ecbfbba912fba5381b7718a2f2c15ca480f87bf6432dc1"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintFlowEdgeFinder.localToLocalThroughReturn (cognitive 22): TaintFlowEdgeFinder.localToLocalThroughReturn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 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":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"58ef0fdd32f5baa43ea652bab557cf4bdb83c55c34c0dbc74bb390c99503c9ce"}},{"ruleId":"D2","level":"warning","message":{"text":"TaintCheckSanitizer.matched (cognitive 22): TaintCheckSanitizer.matched has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/sanitizer/TaintCheckSanitizer.kt"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1b16764783c3ab6ae94aee579b67a5c32ff9a349b1e014bce9dc37cfa66463"}},{"ruleId":"D2","level":"warning","message":{"text":"AndroidUtils.parseComponent (cognitive 21): AndroidUtils.parseComponent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/android/AndroidUtils.kt"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0671858e834f69f88b66881c29838bbcc5e4bccb21afdb840b51a3f9754cfb"}},{"ruleId":"D2","level":"warning","message":{"text":"MethodFieldConstCacheVisitor.getAllSubClasses (cognitive 21): MethodFieldConstCacheVisitor.getAllSubClasses has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodFieldConstCacheVisitor.kt"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"9447a55c6c753a15b2d3d7166ac9538c6a9a6ae68b7d0bc43ce545059b965158"}},{"ruleId":"D2","level":"warning","message":{"text":"PLUtils.getAllSubCLass (cognitive 20): PLUtils.getAllSubCLass has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/PLUtils.kt"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc0ad9cbc85e9c521cf3ec2f4c0a9b9736c7e22e85d010a85423cf4660505b4"}},{"ruleId":"D2","level":"warning","message":{"text":"CallbackConfig.getOneItem (cognitive 20): CallbackConfig.getOneItem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/engineconfig/CallbackConfig.kt"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b03b09c6455f7fde266157e93bd5ee992f75652335f7cceaaae799df6ece65"}},{"ruleId":"D2","level":"warning","message":{"text":"Reflection.insertClassInstantStmt (cognitive 18): Reflection.insertClassInstantStmt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2cedb4cf4eb5cca190df192bdc146fa3f3539c21c724277542d4d978528006"}},{"ruleId":"D2","level":"warning","message":{"text":"Fragment.queryLayoutIdRecursive (cognitive 17): Fragment.queryLayoutIdRecursive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/Fragment.kt"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f899297339ad2c992e18f889ea0a2256856bed01dcd78b918a89db53568b4e"}},{"ruleId":"D2","level":"warning","message":{"text":"UtilKt.formatJavaCode (cognitive 17): UtilKt.formatJavaCode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (7 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ui/util.kt"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a3954dacaf4b433b35e9d2209df9e3f5de755f742942dbb7b6a8d286201bf23"}},{"ruleId":"D2","level":"warning","message":{"text":"JadxRunner.run (cognitive 16): JadxRunner.run has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (7 pts), if/else 5, boolean chains 2, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/android/JadxRunner.kt"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"4535b80a82db062ad5b0fd750df98ebb7255ac18e58aa4f717c5d6455052e2f7"}},{"ruleId":"D2","level":"warning","message":{"text":"ConstModeProcessor.calcConstValueEntries (cognitive 16): ConstModeProcessor.calcConstValueEntries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstModeProcessor.kt"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"81921203ed5d892523054a52e6ecc26e196aca8a5c55e07dece23cc90db10f76"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TwoStagePointerAnalyze.handleInstanceInvoke: MethodTooLong \u2014 handleInstanceInvoke runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95\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":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a09507c7605555697171d8dd0dc663cfa7c61b0c80116bea4422dd6a41f9ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: taintflow/TwoStagePointerAnalyze.kt: FileTooLong \u2014 548 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: TwoStagePointerAnalyze (33-618). The bar is 500 significant lines; this is 48 over it, 1.10\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd15915989bea6065548765dce1c651562c6413680ce36b213adc55dc23f729c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:287-333 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:339-390 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:397-462 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:467-539 \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":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c6444420d9c392d79cc38f986a928d444e439964fca904c1da7c7955efc6946"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt:305-341 | src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt:633-671 \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":"src/main/kotlin/net/bytedance/security/app/taintflow/TwoStagePointerAnalyze.kt"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c16de70bfbe23b21547c6ef537d83b6db35e4f06f7621dc8da8ca0e68698ca1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:154-190 | src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:242-274 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe509c8fb3d006afaf8f93b7668bcfe74f6673a54025821ba08387b91639da4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): src/main/kotlin/net/bytedance/security/app/pathfinder/TaintPathFinder.kt:161-191 | src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstModeProcessor.kt:176-213 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintPathFinder.kt"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"6acbebf9ee74c35d5a8c4d281b5add2b7bbb220ab51bcdbe604481f5fe480509"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:77-101 | src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:108-138 \u2014 These two members are one piece of code written twice and then edited apart: 25 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":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"1341d249ddfd12cba5aa81f532f1dac3c730e31be273fd3b8ff4bf9d3662d06a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): src/main/kotlin/net/bytedance/security/app/engineconfig/PointerPropagationConfig.kt:45-65 | src/main/kotlin/net/bytedance/security/app/engineconfig/VariableFlowConfig.kt:55-79 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/engineconfig/PointerPropagationConfig.kt"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e08d044040e342680b73984c3024525938c97a9749f1b7cc3f39c8ea80661d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): src/main/kotlin/net/bytedance/security/app/preprocess/CallGraph.kt:202-223 | src/main/kotlin/net/bytedance/security/app/preprocess/CallGraph.kt:286-305 \u2014 These two members are one piece of code written twice and then edited apart: 20 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":"src/main/kotlin/net/bytedance/security/app/preprocess/CallGraph.kt"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ef17c21f2b6867dfbc41f9e2b94ded40ffba964d85502c049669abe430136ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): src/main/kotlin/net/bytedance/security/app/PLUtils.kt:81-92 | src/main/kotlin/net/bytedance/security/app/sanitizer/TaintCheckSanitizer.kt:103-118 \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":"src/main/kotlin/net/bytedance/security/app/PLUtils.kt"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"1652d655c01a1f3edda27dfe0a296ec0dc02e2ee62d301fed1147eb2e0617b72"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): src/main/kotlin/net/bytedance/security/app/taintflow/AnalyzeContext.kt:138-155 | src/main/kotlin/net/bytedance/security/app/taintflow/AnalyzeContext.kt:158-178 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/AnalyzeContext.kt"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4719227165ca21e250862877db910e70622c5fbfea5256bba349bae63fb7e082"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:68-79 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:81-92 \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":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ca60d886585c8a5d2be4aa435ad678ca187e97dd37bc4bfd135826f5eb20dae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:575-590 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:592-606 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:608-623 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"a736a7a94c20e535d1caf88e46264e2f6cf1eee37f0ff6cb397bea1822f132e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt:193-201 | src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt:203-211 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba4e44ccbeccea1ec85b66ef7ce21640c01b34a55a054bbbc99fee4824491be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): src/main/kotlin/net/bytedance/security/app/preprocess/CallGraph.kt:181-196 | src/main/kotlin/net/bytedance/security/app/preprocess/CallGraph.kt:268-280 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/CallGraph.kt"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"0af301ff603699e69e24299cb8e18998c2a94b76f24af43b872b783b7a1783d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): src/main/kotlin/net/bytedance/security/app/rules/Rules.kt:90-106 | src/main/kotlin/net/bytedance/security/app/engineconfig/EngineConfig.kt:97-110 \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":"src/main/kotlin/net/bytedance/security/app/rules/Rules.kt"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0443264e9f5b02ae0636614bd9f867b8afbac6a5b5bff2a1925560204c1d649"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): src/main/kotlin/net/bytedance/security/app/taintflow/DefaultPointerPropagationRule.kt:34-42 | src/main/kotlin/net/bytedance/security/app/taintflow/TaintTweakTaintFlowRule.kt:46-54 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/DefaultPointerPropagationRule.kt"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"475f7b6ac39eb3c2151130f500c9822dcb6adf06e08db1b91d57169904f980b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:229-249 | src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:263-283 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe57442c0f3e1c0178b9c69b71b5f495fa0bff58197af667d06339856cf8ca2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:82-101 | src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:203-222 \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 \u0060src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:82\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c05811f09c539f53530306fd8bcbf0ee967dccfa93c57c8e033cde9b19b804b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 3): src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:316-327 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:372-384 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:442-456 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6ed28b83e1e510bb6cf63c0732dfbb3aedb67d10a5240804cfe5cd47ff6f244"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/engineconfig/PointerPropagationConfig.kt:52-65 | src/main/kotlin/net/bytedance/security/app/engineconfig/VariableFlowConfig.kt:66-79 \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 \u0060src/main/kotlin/net/bytedance/security/app/engineconfig/PointerPropagationConfig.kt:52\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/engineconfig/PointerPropagationConfig.kt"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65a11c11daf25c29f9a4e45a23b7d63593dbb0e929636e7a0663f73503da64b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201313 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:134-141 | src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:222-234 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c7da52141e0acab0ae31e64bc41814adb55bfd9292346910eb90600dc7d9cbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/util/SecureFileIO.kt:160-168 | src/main/kotlin/net/bytedance/security/app/util/SecureFileIO.kt:184-195 \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 \u0060src/main/kotlin/net/bytedance/security/app/util/SecureFileIO.kt:160\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060src/main/kotlin/net/bytedance/security/app/util/SecureFileIO.kt:196\u0060 calls \u0060write\u0060 and \u0060src/main/kotlin/net/bytedance/security/app/util/SecureFileIO.kt:169\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":"src/main/kotlin/net/bytedance/security/app/util/SecureFileIO.kt"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"49212751789d752aed506348d11e70f9f6bd5b63a9c7d8447f5f1a82d09b2f29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:81-90 | src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:111-120 | src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:202-211 \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 \u0060src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:81\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:77\u0060 calls \u0060localToThis\u0060 and \u0060src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt:201\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":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintFlowEdgeFinder.kt"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff9369705590e99d90023438e7deb1208c200bf1a241615f693704758de853b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/pointer/PointerFactory.kt:42-51 | src/main/kotlin/net/bytedance/security/app/pointer/PointerFactory.kt:66-75 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/pointer/PointerFactory.kt"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f808a7bc41ce27820fd7128a1fb5e29deb56e9a58324715e385b17408eb2a74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:312-320 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:368-376 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:517-525 \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 \u0060src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:312\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":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd29076e7da0b50faf0c34beed136b33021b50e649dd48475f23973af37a6a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 3): src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:134-139 | src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:222-228 | src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:307-315 \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 \u0060src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt:134\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":"src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea8d2c1e5aeaa562fc5fa8c7ec40b377223df2ede6093725e77077f05b06594c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/PLUtils.kt:82-89 | src/main/kotlin/net/bytedance/security/app/sanitizer/TaintCheckSanitizer.kt:104-111 \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 \u0060src/main/kotlin/net/bytedance/security/app/PLUtils.kt:82\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060src/main/kotlin/net/bytedance/security/app/sanitizer/TaintCheckSanitizer.kt:112\u0060 calls \u0060endsWith\u0060, \u0060isBitModeMatch\u0060 and \u0060src/main/kotlin/net/bytedance/security/app/PLUtils.kt:90\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/PLUtils.kt"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c595187e747b4326cbe09766c7d1d5339b3febb9e767d22b2ec24f88ca4fe1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt:194-201 | src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt:204-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060argPtr2\u0060 to \u0060PLPointer?\u0060 in one and \u0060PLPointer\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/ObscureRuleHandler.kt"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c880480ac27e5fa7c923640cb9c84e14db0cbab7cdb017dc0d31589dfb1e64f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/rules/DirectModeRule.kt:145-151 | src/main/kotlin/net/bytedance/security/app/rules/DirectModeRule.kt:189-195 \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 \u0060src/main/kotlin/net/bytedance/security/app/rules/DirectModeRule.kt:145\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":"src/main/kotlin/net/bytedance/security/app/rules/DirectModeRule.kt"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"de26b586b2ddde6eef8144ef2df63b04eb09d821a3e387d9886e6b10f135578d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstNumberModeProcessor.kt:35-42 | src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstStringModeProcessor.kt:33-40 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ruleprocessor/ConstNumberModeProcessor.kt"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"2acad1aaa54f2753b4030e8539106e88defc2b8db1052b9d08b3852dcedad028"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:299-311 | src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:355-367 \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 \u0060src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt:299\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":"src/main/kotlin/net/bytedance/security/app/preprocess/Reflection.kt"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf24fb19b55b817422492ef73f2a791bd33e427c2ed2c71429e34975cbd9e0c"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Profiler (LCOM4 8): Profiler\u0027s methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/util/Profiler.kt"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdca5a8bfaf87a0900c7e996cbea29a20f934a303e15fe9e9d490f85e6fb1e5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MethodStmtFieldCache (LCOM4 6): MethodStmtFieldCache\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/preprocess/MethodStmtFieldCache.kt"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2abe3ce1ecd710053d013caf86b2f8381b4f61fb6b0c65d3f2ed3267995cf7"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PreAnalyzeContext (LCOM4 5): PreAnalyzeContext\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/PreAnalyzeContext.kt"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"6221ce14bfa523c8ae29defb56d3be03720ee1da99d2e682baef4ffe0daf3ce4"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src/main/kotlin/net/bytedance/security/app/AnalyzeStepByStep.kt: src/main/kotlin/net/bytedance/security/app/AnalyzeStepByStep.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is AnalyzeStepByStep.initSoot at line 159), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: validate untrusted rule graph before soot\u201D; \u201Cfix: reject linked rules during discovery\u201D; \u201Cfix: confine and bound rule configuration reads\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-18..2026-09-16, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-06-18 13:54:58 \u002B08:00\u0027 --until=\u00272026-09-16 13:54:58 \u002B08:00\u0027 --full-history --no-merges -- src/main/kotlin/net/bytedance/security/app/AnalyzeStepByStep.kt\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/AnalyzeStepByStep.kt"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4962564d72d2f4562c28b0e66f05eae6e119769e235bd303c23f1c6eb7c4df"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo should it be treated as a special case without pointer analysis? \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/ui/TaintPathModeHtmlWriter.kt"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca9b76af644a7479083cdda1739809ddc994bbb43a88efa13c2b28706a11d310"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO some library class fields should be handled as objects \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/taintflow/StmtTransfer.kt"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5603e19fe37371db71884290f90a8c279e8ae9955ebe2310235927e2155632"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: //todo Remember that PLPointer in Analyzer and Sanitizer are different from PLPointer in PointFactory \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/pathfinder/TaintPathFinder.kt"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"805282a6b721bedf8705b138e6d477e2e6e2c847a98da9e5f9f3f1990a33fb68"}},{"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 \u0060build.gradle.kts\u0060 makes this repository a deployable product (line 13)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"build.gradle.kts"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade292efacb92fce772490239fede79f77d6199063763774ec51af66e9b8bedc"}},{"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":"d8e58bc216fb21c2872752331f18d01b59ec09ce8dc4dddd7b2127c44de354fb"},"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":"ae5fb3facc6033cc222c34df8ab137aa8cf83dd73ed42913507b26ac6db26e47"},"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":"982c221b20851b1f544fed6f733715fd4cf08d9914b7af0e013eef7e5153498c"},"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":"2edfe290734f30b0ae68b950a347631be664e69293f104c3299e38e4cc00cdb3"},"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":"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":"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":"P2","level":"warning","message":{"text":"No structured logging: No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page \u2014 but when a run fails on a user\u0027s machine, neither they nor you have anything to read."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9f10d71351c6778ebe84e761f82a90d4f9ed6c64f5e01975ede8fda7e4e2ebc5"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add 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":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/gradle.yml"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060build.gradle.kts\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"build.gradle.kts"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4369de275300dac0d50dbff2ad6a475e44a0d9d95c5ef0a8fa46bbc9b71411d0"}},{"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":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060runInMilliSeconds\u0060 is async and calls runBlocking \u2014 a blocking call inside async code stalls the coroutine\u0027s thread, and every coroutine dispatched to it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/util/TaskQueue.kt"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c195b72f370cf07b657c05313a6ef28bdf61781f2c00d5a7541bb860184c10"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060pattern.startsWith(\u0022*\u0022) \u0026\u0026 pattern.endsWith(\u0022*\u0022)\u0060 appears character-identically in 2 files \u2014 src/main/kotlin/net/bytedance/security/app/PLUtils.kt, src/main/kotlin/net/bytedance/security/app/sanitizer/TaintCheckSanitizer.kt. 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":"src/main/kotlin/net/bytedance/security/app/PLUtils.kt"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"242f6b7d2490924460b3ccbc66216041d44121882574c4c8fc31e29667730cb5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (ex: Exception)\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/util/dataClassToString.kt"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"e47d0346f69b6fe56b6611f095bed0ac2ed70767a2b97174a79a82112022c4e4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch (_: Exception)\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main/kotlin/net/bytedance/security/app/android/JadxRunner.kt"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"30af23ca6774f2aa3ad0d06564256c20efcf1fd4f810b0d06d507f303a8e75ef"}}],"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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-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-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"}]}],"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":5,"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."]}]}